TT CORE SDK
2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
export_value.h
Go to the documentation of this file.
1
/***************************************************************************
2
*
3
* Unpublished Work Copyright (c) 2020
4
* Trading Technologies International, Inc.
5
* All Rights Reserved Worldwide
6
*
7
* * * * S T R I C T L Y P R O P R I E T A R Y * * *
8
*
9
* WARNING: This program (or document) is unpublished, proprietary property
10
* of Trading Technologies International, Inc. and is to be maintained in
11
* strict confidence. Unauthorized reproduction, distribution or disclosure
12
* of this program (or document), or any program (or document) derived from
13
* it is prohibited by State and Federal law, and by local law outside of
14
* the U.S.
15
*
16
***************************************************************************/
17
#pragma once
18
#include <string>
19
20
namespace
ttsdk
{
21
24
struct
ExportValues
25
{
26
public
:
27
static
constexpr
size_t
MAX_EVENTS
= 10;
28
size_t
count
;
29
30
struct
ExportValue
31
{
32
public
:
33
34
ExportValue
();
35
ExportValue
(
const
ExportValue
& other);
36
~ExportValue
();
37
ExportValue
&
operator=
(
const
ExportValue
& other);
38
39
std::string
id
;
40
double
v_double
= NAN;
41
int32_t
v_int
= -2147483648LL;
42
uint64_t
v_timestamp
= 0;
43
bool
v_bool
=
false
;
44
char
*
v_string
=
nullptr
;
45
46
};
47
48
ExportValue
exportValues
[
MAX_EVENTS
];
49
};
50
51
inline
ExportValues::ExportValue::ExportValue
()
52
{
53
}
54
55
inline
ExportValues::ExportValue::ExportValue
(
const
ExportValue
& other)
56
{
57
*
this
= other;
58
}
59
60
inline
ExportValues::ExportValue
&
ExportValues::ExportValue::operator=
(
const
ExportValue
& other)
61
{
62
id
= other.
id
;
63
v_double = other.
v_double
;
64
v_int = other.
v_int
;
65
v_timestamp = other.
v_timestamp
;
66
v_bool = other.
v_bool
;
67
v_string =
nullptr
;
68
if
(other.
v_string
)
69
{
70
size_t
len = strlen(other.
v_string
);
71
v_string =
new
char
[len + 1];
72
strcpy(v_string, other.
v_string
);
73
}
74
return
*
this
;
75
}
76
77
inline
ExportValues::ExportValue::~ExportValue
()
78
{
79
if
(v_string)
80
delete
[] v_string;
81
}
82
}
ttsdk
Definition
account.h:21
ttsdk::ExportValues::ExportValue
Definition
export_value.h:31
ttsdk::ExportValues::ExportValue::id
std::string id
Definition
export_value.h:39
ttsdk::ExportValues::ExportValue::v_timestamp
uint64_t v_timestamp
Definition
export_value.h:42
ttsdk::ExportValues::ExportValue::v_double
double v_double
Definition
export_value.h:40
ttsdk::ExportValues::ExportValue::~ExportValue
~ExportValue()
Definition
export_value.h:77
ttsdk::ExportValues::ExportValue::v_string
char * v_string
Definition
export_value.h:44
ttsdk::ExportValues::ExportValue::operator=
ExportValue & operator=(const ExportValue &other)
Definition
export_value.h:60
ttsdk::ExportValues::ExportValue::ExportValue
ExportValue()
Definition
export_value.h:51
ttsdk::ExportValues::ExportValue::v_bool
bool v_bool
Definition
export_value.h:43
ttsdk::ExportValues::ExportValue::v_int
int32_t v_int
Definition
export_value.h:41
ttsdk::ExportValues
Definition
export_value.h:25
ttsdk::ExportValues::MAX_EVENTS
static constexpr size_t MAX_EVENTS
Max supported export values in one update.
Definition
export_value.h:27
ttsdk::ExportValues::count
size_t count
Definition
export_value.h:28
ttsdk::ExportValues::exportValues
ExportValue exportValues[MAX_EVENTS]
Definition
export_value.h:48
Header Files
export_value.h
Generated by
1.10.0