Skip to content

Commit 8d6b522

Browse files
committed
add Xetra timestamp code
1 parent 4e3cb4d commit 8d6b522

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ project (mFAST VERSION 1.3.0 LANGUAGES CXX)
99
option(BUILD_TESTS "Build tests" ON)
1010
option(BUILD_EXAMPLES "Build examples" ON)
1111
option(BUILD_PACKAGES "Build packages" ON)
12+
option(XETRA_FAST_SPECIFICATION "Xetra Fast 1.2 specification" OFF)
1213

1314
# global options
1415
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
@@ -96,4 +97,5 @@ message(STATUS "BUILD_SHARED_LIBS: " ${BUILD_SHARED_LIBS})
9697
message(STATUS "BUILD_TESTS: " ${BUILD_TESTS})
9798
message(STATUS "BUILD_EXAMPLES: " ${BUILD_EXAMPLES})
9899
message(STATUS "BUILD_PACKAGES: " ${BUILD_PACKAGES})
100+
message(STATUS "XETRA_FAST_SPECIFICATION: " ${XETRA_FAST_SPECIFICATION})
99101
message(STATUS "")

src/mfast/xml_parser/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ if (UNIX)
2222
set_target_properties(mfast_xml_parser_static PROPERTIES OUTPUT_NAME mfast_xml_parser)
2323
endif()
2424

25+
26+
if(XETRA_FAST_SPECIFICATION)
27+
target_compile_definitions(mfast_xml_parser_static PRIVATE XETRA_FAST_SPECIFICATION)
28+
endif(XETRA_FAST_SPECIFICATION)
29+
2530
install(TARGETS mfast_xml_parser_static
2631
EXPORT mFASTTargets
2732
FILE_SET HEADERS)
@@ -40,6 +45,10 @@ if (BUILD_SHARED_LIBS)
4045
set_property(TARGET mfast_xml_parser PROPERTY VERSION ${MFAST_VERSION})
4146
set_property(TARGET mfast_xml_parser PROPERTY SOVERSION ${MFAST_VERSION})
4247

48+
if(XETRA_FAST_SPECIFICATION)
49+
target_compile_definitions(mfast_xml_parser PRIVATE XETRA_FAST_SPECIFICATION)
50+
endif(XETRA_FAST_SPECIFICATION)
51+
4352
install(TARGETS mfast_xml_parser
4453
EXPORT mFASTTargets
4554
FILE_SET HEADERS)

src/mfast/xml_parser/templates_builder.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ templates_builder::templates_builder(dynamic_templates_description *definition,
6767
string_value_storage());
6868
this->member["string"] = &ascii_field_instruction_prototype;
6969

70+
#ifdef XETRA_FAST_SPECIFICATION
71+
static const int64_field_instruction timestamp_field_instruction_prototype(
72+
operator_none, presence_mandatory, 0, nullptr, "", nullptr,
73+
int_value_storage<int64_t>());
74+
this->member["timestamp"] = &timestamp_field_instruction_prototype;
75+
#endif
76+
7077
static const byte_vector_field_instruction
7178
byte_vector_field_instruction_prototype(
7279
operator_none, presence_mandatory, 0, nullptr, "", nullptr,

0 commit comments

Comments
 (0)