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
20namespace ttsdk {
21
25 {
26 public:
27 static constexpr size_t MAX_EVENTS = 10;
28 size_t count;
29
31 {
32 public:
33
35 ExportValue(const ExportValue& other);
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
49 };
50
54
56 {
57 *this = other;
58 }
59
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
78 {
79 if (v_string)
80 delete[] v_string;
81 }
82}
ExportValue & operator=(const ExportValue &other)
static constexpr size_t MAX_EVENTS
Max supported export values in one update.
ExportValue exportValues[MAX_EVENTS]