fix8  version 1.4.0
Open Source C++ FIX Framework
Perf_classes.hpp
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------------
2 // *** f8c generated file: DO NOT EDIT! Created: 2016-09-16 11:50:22 ***
3 //-------------------------------------------------------------------------------------------------
4 /*
5 
6 Fix8 is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3.
7 
8 Fix8 Open Source FIX Engine.
9 Copyright (C) 2010-16 David L. Dight <fix@fix8.org>
10 
11 Fix8 is free software: you can redistribute it and / or modify it under the terms of the
12 GNU Lesser General Public License as published by the Free Software Foundation, either
13 version 3 of the License, or (at your option) any later version.
14 
15 Fix8 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
16 even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 You should have received a copy of the GNU Lesser General Public License along with Fix8.
19 If not, see <http://www.gnu.org/licenses/>.
20 
21 *******************************************************************************************
22 * Special note for Fix8 compiler generated source code *
23 * *
24 * Binary works that are the results of compilation of code that is generated by the Fix8 *
25 * compiler can be released without releasing your source code as long as your binary *
26 * links dynamically against an unmodified version of the Fix8 library. You are however *
27 * required to leave the copyright text in the generated code. *
28 * *
29 *******************************************************************************************
30 
31 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO
32 THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
33 COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
34 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
36 THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
37 YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
38 
39 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT
40 HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
41 ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
42 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
43 NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
44 THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
45 HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
46 
47 */
48 
49 //-------------------------------------------------------------------------------------------------
50 #include <fix8/f8config.h>
51 #if defined FIX8_MAGIC_NUM && FIX8_MAGIC_NUM > 16793600L
52 #error Perf_classes.hpp version 1.4.0 is out of date. Please regenerate with f8c.
53 #endif
54 //-------------------------------------------------------------------------------------------------
55 // Perf_classes.hpp
56 //-------------------------------------------------------------------------------------------------
57 #ifndef FIX8_506572665F636C61737365732E687070_
58 #define FIX8_506572665F636C61737365732E687070_
59 
60 #if defined(_MSC_VER) && defined(F8_TEX_API_SHARED)
61  #if defined(BUILD_F8_TEX_API)
62  #define F8_TEX_API __declspec(dllexport)
63  #else
64  #define F8_TEX_API __declspec(dllimport)
65  #endif
66 #else
67  #define F8_TEX_API
68 #endif
69 namespace FIX8 {
70 
71 extern "C"
72 {
73  F8_TEX_API const F8MetaCntx& TEX_ctx();
74 }
75 
76 namespace TEX {
77 
78 //-------------------------------------------------------------------------------------------------
81 F8_TEX_API const F8MetaCntx& ctx();
82 class Perf_Router;
83 
84 //-------------------------------------------------------------------------------------------------
86 class Heartbeat : public Message
87 {
88  static F8_TEX_API const FieldTrait _traits[];
90  static F8_TEX_API const MsgType _msgtype;
91  static F8_TEX_API const unsigned _fieldcnt = 1;
92 
93 public:
94  explicit Heartbeat(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
95  ~Heartbeat() = default;
96  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
97  bool is_admin() const { return true; }
98 
99  static const MsgType& get_msgtype() { return _msgtype; }
100 };
101 
102 //-------------------------------------------------------------------------------------------------
104 class TestRequest : public Message
105 {
106  static F8_TEX_API const FieldTrait _traits[];
107  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
108  static F8_TEX_API const MsgType _msgtype;
109  static F8_TEX_API const unsigned _fieldcnt = 1;
110 
111 public:
112  explicit TestRequest(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
113  ~TestRequest() = default;
114  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
115  bool is_admin() const { return true; }
116 
117  static const MsgType& get_msgtype() { return _msgtype; }
118 };
119 
120 //-------------------------------------------------------------------------------------------------
122 class ResendRequest : public Message
123 {
124  static F8_TEX_API const FieldTrait _traits[];
125  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
126  static F8_TEX_API const MsgType _msgtype;
127  static F8_TEX_API const unsigned _fieldcnt = 2;
128 
129 public:
130  explicit ResendRequest(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
131  ~ResendRequest() = default;
132  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
133  bool is_admin() const { return true; }
134 
135  static const MsgType& get_msgtype() { return _msgtype; }
136 };
137 
138 //-------------------------------------------------------------------------------------------------
140 class Reject : public Message
141 {
142  static F8_TEX_API const FieldTrait _traits[];
143  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
144  static F8_TEX_API const MsgType _msgtype;
145  static F8_TEX_API const unsigned _fieldcnt = 7;
146 
147 public:
148  explicit Reject(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
149  ~Reject() = default;
150  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
151  bool is_admin() const { return true; }
152 
153  static const MsgType& get_msgtype() { return _msgtype; }
154 };
155 
156 //-------------------------------------------------------------------------------------------------
158 class SequenceReset : public Message
159 {
160  static F8_TEX_API const FieldTrait _traits[];
161  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
162  static F8_TEX_API const MsgType _msgtype;
163  static F8_TEX_API const unsigned _fieldcnt = 2;
164 
165 public:
166  explicit SequenceReset(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
167  ~SequenceReset() = default;
168  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
169  bool is_admin() const { return true; }
170 
171  static const MsgType& get_msgtype() { return _msgtype; }
172 };
173 
174 //-------------------------------------------------------------------------------------------------
176 class Logout : public Message
177 {
178  static F8_TEX_API const FieldTrait _traits[];
179  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
180  static F8_TEX_API const MsgType _msgtype;
181  static F8_TEX_API const unsigned _fieldcnt = 3;
182 
183 public:
184  explicit Logout(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
185  ~Logout() = default;
186  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
187  bool is_admin() const { return true; }
188 
189  static const MsgType& get_msgtype() { return _msgtype; }
190 };
191 
192 //-------------------------------------------------------------------------------------------------
194 class ExecutionReport : public Message
195 {
196  static F8_TEX_API const FieldTrait _traits[];
197  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
198  static F8_TEX_API const MsgType _msgtype;
199  static F8_TEX_API const unsigned _fieldcnt = 64;
200 
201 public:
202  explicit ExecutionReport(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
203  ~ExecutionReport() = default;
204  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
205 
206  static const MsgType& get_msgtype() { return _msgtype; }
207 };
208 
209 //-------------------------------------------------------------------------------------------------
211 class Logon : public Message
212 {
213  static F8_TEX_API const FieldTrait _traits[];
214  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
215  static F8_TEX_API const MsgType _msgtype;
216  static F8_TEX_API const unsigned _fieldcnt = 7;
217 
218 public:
219  explicit Logon(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha)
220  {
221  if (deepctor)
222  _groups.insert({384, new NoMsgTypes });
223  }
224  ~Logon() = default;
225  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
226  bool is_admin() const { return true; }
227 
228  static const MsgType& get_msgtype() { return _msgtype; }
229  GroupBase *create_nested_group(unsigned short fnum) const
230  { return fnum == 384 ? new NoMsgTypes : nullptr; }
231 
233  // Logon::NoMsgTypes
234  class NoMsgTypes : public GroupBase // depth: 1
235  {
236  static F8_TEX_API const FieldTrait _traits[];
238  static F8_TEX_API const MsgType _msgtype;
239  static const unsigned _fieldcnt = 2;
240 
241  public:
242  enum { _fnum = 384 };
243 
245  ~NoMsgTypes() = default;
246  MessageBase *create_group(bool) const { return new MessageBase(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha); }
247 
248  static const MsgType& get_msgtype() { return _msgtype; }
249  };
250 };
251 
252 //-------------------------------------------------------------------------------------------------
254 class NewOrderSingle : public Message
255 {
256  static F8_TEX_API const FieldTrait _traits[];
257  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
258  static F8_TEX_API const MsgType _msgtype;
259  static F8_TEX_API const unsigned _fieldcnt = 47;
260 
261 public:
262  explicit NewOrderSingle(bool deepctor=true) : Message(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha) {}
263  ~NewOrderSingle() = default;
264  bool process(Router& rt) const { return (static_cast<Perf_Router&>(rt))(this); }
265 
266  static const MsgType& get_msgtype() { return _msgtype; }
267 };
268 
269 //-------------------------------------------------------------------------------------------------
271 class header : public MessageBase
272 {
273  static F8_TEX_API const FieldTrait _traits[];
274  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
275  static F8_TEX_API const MsgType _msgtype;
276  static F8_TEX_API const unsigned _fieldcnt = 14;
277 
281 
282 public:
283  explicit header(bool deepctor=true) : MessageBase(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha),
284  _begin_string(new begin_string(ctx()._beginStr)), _body_length(new body_length), _msg_type(new msg_type) { add_preamble(); }
285  ~header() = default;
286 
287  static const MsgType& get_msgtype() { return _msgtype; }
288 
292 
294  {
295  add_field(Common_BeginString, 1, _begin_string, false);
296  add_field(Common_BodyLength, 2, _body_length, false);
297  add_field(Common_MsgType, 3, _msg_type, false);
298  }
299 };
300 
301 //-------------------------------------------------------------------------------------------------
303 class trailer : public MessageBase
304 {
305  static F8_TEX_API const FieldTrait _traits[];
306  static F8_TEX_API const FieldTrait_Hash_Array _ftha;
307  static F8_TEX_API const MsgType _msgtype;
308  static F8_TEX_API const unsigned _fieldcnt = 3;
309 
311 
312 public:
313  explicit trailer(bool deepctor=true) : MessageBase(ctx(), _msgtype(), _traits, _fieldcnt, &_ftha),
314  _check_sum(new check_sum) { add_preamble(); }
315  ~trailer() = default;
316 
317  static const MsgType& get_msgtype() { return _msgtype; }
318 
320 
322  {
323  add_field(Common_CheckSum, 3, _check_sum, false);
324  }
325 };
326 
327 //-------------------------------------------------------------------------------------------------
328 
329 } // namespace TEX
330 } // namespace FIX8
331 #endif // FIX8_506572665F636C61737365732E687070_
static F8_TEX_API const FieldTrait _traits[]
GeneratedTable< const char *, BaseMsgEntry > MsgTable
Definition: message.hpp:203
static F8_TEX_API const MsgType _msgtype
MessageBase * create_group(bool) const
static F8_TEX_API const MsgType _msgtype
bool is_admin() const
bool process(Router &rt) const
const unsigned short Common_CheckSum(10)
Logout(bool deepctor=true)
static const MsgType & get_msgtype()
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const MsgType _msgtype
static const MsgType & get_msgtype()
Logon(bool deepctor=true)
bool process(Router &rt) const
ResendRequest(bool deepctor=true)
Base class for inbound message routing.
Definition: message.hpp:126
trailer(bool deepctor=true)
static F8_TEX_API const unsigned _fieldcnt
friend class MessageBase
Definition: message.hpp:121
bool is_admin() const
check_sum * get_check_sum()
static F8_TEX_API const FieldTrait _traits[]
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const FieldTrait _traits[]
Field< f8String, 35 > MsgType
static F8_TEX_API const FieldTrait_Hash_Array _ftha
static F8_TEX_API const MsgType _msgtype
msg_type * get_msg_type()
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const FieldTrait_Hash_Array _ftha
static F8_TEX_API const MsgType _msgtype
static const MsgType & get_msgtype()
bool process(Router &rt) const
Heartbeat (0), admin, 1 field, 0 groups.
Heartbeat(bool deepctor=true)
static F8_TEX_API const unsigned _fieldcnt
bool process(Router &rt) const
static const MsgType & get_msgtype()
bool is_admin() const
static F8_TEX_API const FieldTrait_Hash_Array _ftha
static F8_TEX_API const FieldTrait_Hash_Array _ftha
static F8_TEX_API const FieldTrait_Hash_Array _ftha
static const MsgType & get_msgtype()
static F8_TEX_API const FieldTrait _traits[]
static const MsgType & get_msgtype()
static F8_TEX_API const MsgType _msgtype
Abstract base class for all repeating groups.
Definition: message.hpp:59
bool is_admin() const
static F8_TEX_API const FieldTrait _traits[]
Used for static trait interrogation.
Definition: traits.hpp:57
Reject(bool deepctor=true)
begin_string * _begin_string
const F8MetaCntx & ctx()
Compiler generated metadata object, accessed through this function.
static const MsgType & get_msgtype()
SequenceReset(bool deepctor=true)
ExecutionReport(bool deepctor=true)
static F8_TEX_API const MsgType _msgtype
body_length * get_body_length()
static F8_TEX_API const FieldTrait_Hash_Array _ftha
~Logon()=default
static const MsgType & get_msgtype()
static F8_TEX_API const MsgType _msgtype
static F8_TEX_API const FieldTrait_Hash_Array _ftha
static F8_TEX_API const unsigned _fieldcnt
const unsigned short Common_MsgType(35)
static F8_TEX_API const FieldTrait _traits[]
static F8_TEX_API const FieldTrait_Hash_Array _ftha
const unsigned short Common_BodyLength(9)
A complete Fix message with header, body and trailer.
Definition: message.hpp:1058
static const MsgType & get_msgtype()
bool process(Router &rt) const
bool process(Router &rt) const
static F8_TEX_API const MsgType _msgtype
Field template. There will ONLY be partial template specialisations of this template.
Definition: field.hpp:256
const F8MetaCntx & TEX_ctx()
static F8_TEX_API const MsgType _msgtype
static const MsgType & get_msgtype()
static const MsgType & get_msgtype()
GroupBase * create_nested_group(unsigned short fnum) const
const unsigned short Common_BeginString(8)
static F8_TEX_API const FieldTrait_Hash_Array _ftha
void add_field(const unsigned short fnum, Presence::const_iterator itr, const unsigned pos, BaseField *what, bool check)
Definition: message.hpp:556
static F8_TEX_API const unsigned _fieldcnt
#define F8_TEX_API
begin_string * get_begin_string()
TestRequest(bool deepctor=true)
static F8_TEX_API const FieldTrait _traits[]
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const FieldTrait _traits[]
static F8_TEX_API const MsgType _msgtype
static F8_TEX_API const FieldTrait_Hash_Array _ftha
NewOrderSingle(bool deepctor=true)
bool process(Router &rt) const
Base class for all fix messages.
Definition: message.hpp:381
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const FieldTrait _traits[]
static F8_TEX_API const FieldTrait _traits[]
body_length * _body_length
Static metadata context class - one per FIX xml schema.
Definition: message.hpp:210
bool process(Router &rt) const
static F8_TEX_API const MsgType _msgtype
NoMsgTypes (384), application, 4 fields, 0 groups, is unique, hash: 0xd4b19af3.
Fast map for statically generated data types. Assumes table is sorted. Complexity is O(logN)...
Definition: f8types.hpp:100
static F8_TEX_API const FieldTrait_Hash_Array _ftha
bool process(Router &rt) const
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const unsigned _fieldcnt
static F8_TEX_API const FieldTrait _traits[]
Fast index lookup for FieldTrait.
Definition: traits.hpp:198
static F8_TEX_API const FieldTrait_Hash_Array _ftha
header(bool deepctor=true)
static const MsgType & get_msgtype()