OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
Bootstrap.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
23#include <cstddef>
24#include <cassert>
25
26#include <OnixS/CME/MDH/Export.h>
28
30#if defined(ONIXS_CMEMDH_COMPILER_IS_MSVC)
31# define ONIXS_CMEMDH_SILENCE_DLLEXPORT ONIXS_CMEMDH_PRAGMA(warning(disable : 4275 4251))
32#else
33# define ONIXS_CMEMDH_SILENCE_DLLEXPORT
34#endif
35
36#define ONIXS_CMEMDH_SILENCE_BEGIN \
37 ONIXS_CMEMDH_DIAG_PUSH \
38 ONIXS_CMEMDH_SILENCE_DLLEXPORT
39
40#define ONIXS_CMEMDH_SILENCE_END \
41 ONIXS_CMEMDH_DIAG_POP
43
44#if defined(_MSC_VER)
45# define ONIXS_CMEMDH_EXPORTED_DECL(entity, typeName) entity ONIXS_CMEMDH_EXPORTED typeName
46#else
47# define ONIXS_CMEMDH_EXPORTED_DECL(entity, typeName) entity typeName
48#endif
49
50#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName) ONIXS_CMEMDH_EXPORTED_DECL(class, typeName)
51#define ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(typeName) ONIXS_CMEMDH_EXPORTED_DECL(struct, typeName)
52#define ONIXS_CMEMDH_INTERNAL_CLASS_DECL(typeName) class typeName
53#define ONIXS_CMEMDH_INTERNAL_STRUCT_DECL(typeName) struct typeName
54
55#if defined(ONIXS_CMEMDH_LTWT_AS_EXPORTED)
56# define ONIXS_CMEMDH_LTWT ONIXS_CMEMDH_EXPORTED
57# define ONIXS_CMEMDH_LTWT_EXPORTED /* Nothing */
58# define ONIXS_CMEMDH_LTWT_CLASS_DECL(name) ONIXS_CMEMDH_EXPORTED_CLASS_DECL(name)
59# define ONIXS_CMEMDH_LTWT_STRUCT_DECL(name) ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(name)
60#else
61# define ONIXS_CMEMDH_LTWT /* Nothing */
62# define ONIXS_CMEMDH_LTWT_EXPORTED ONIXS_CMEMDH_EXPORTED
63# define ONIXS_CMEMDH_LTWT_CLASS_DECL(name) class name
64# define ONIXS_CMEMDH_LTWT_STRUCT_DECL(name) struct name
65#endif // ONIXS_CMEMDH_LTWT_AS_EXPORTED
66
67// A few decorations for better source-code crafting.
68// clang-format off
69#define ONIXS_CMEMDH_NAMESPACE_BEGIN \
70 ONIXS_CMEMDH_SILENCE_BEGIN \
71 namespace OnixS { namespace CME { namespace MDH {
72
73#define ONIXS_CMEMDH_NAMESPACE_END \
74 ONIXS_CMEMDH_SILENCE_END \
75 }}}
76
77#define ONIXS_CMEMDH_MESSAGING_NAMESPACE_BEGIN ONIXS_CMEMDH_NAMESPACE_BEGIN namespace Messaging {
78#define ONIXS_CMEMDH_MESSAGING_NAMESPACE_END ONIXS_CMEMDH_NAMESPACE_END }
79
80#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_BEGIN ONIXS_CMEMDH_MESSAGING_NAMESPACE_BEGIN namespace FIX {
81#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_END ONIXS_CMEMDH_MESSAGING_NAMESPACE_END }
82
83#define ONIXS_CME_MDH_TESTING_NAMESPACE_BEGIN ONIXS_CMEMDH_NAMESPACE_BEGIN namespace Test {
84#define ONIXS_CME_MDH_TESTING_NAMESPACE_END ONIXS_CMEMDH_NAMESPACE_END }
85
86#define ONIXS_CME_MDH_THREADING_NAMESPACE_BEGIN ONIXS_CMEMDH_NAMESPACE_BEGIN namespace Threading {
87#define ONIXS_CME_MDH_THREADING_NAMESPACE_END ONIXS_CMEMDH_NAMESPACE_END }
88
89#define ONIXS_CMEMDH_NAMESPACE OnixS::CME::MDH
90#define ONIXS_CMEMDH_MESSAGING_NAMESPACE ONIXS_CMEMDH_NAMESPACE::Messaging
91#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE ONIXS_CMEMDH_MESSAGING_NAMESPACE::FIX
92#define ONIXS_CME_MDH_TESTING_NAMESPACE ONIXS_CMEMDH_NAMESPACE::Test
93
94#define ONIXS_CMEMDHFIX_NAMESPACE_BEGIN ONIXS_CMEMDH_NAMESPACE_BEGIN namespace FIX {
95#define ONIXS_CMEMDHFIX_NAMESPACE_END ONIXS_CMEMDH_NAMESPACE_END }
96
97// clang-format on