22#ifndef  _FRAMECODEC_HPP_
33#define  _FRAMECODEC_HPP_ 
44
5+ #if  defined(SBE_HAVE_CMATH)
6+ /*  cmath needed for std::numeric_limits<double>::quiet_NaN() */ 
7+ # include  < cmath> 
8+ # define  SBE_FLOAT_NAN  std::numeric_limits<float >::quiet_NaN()
9+ # define  SBE_DOUBLE_NAN  std::numeric_limits<double >::quiet_NaN()
10+ #else 
511/*  math.h needed for NAN */ 
6- #include  < math.h> 
7- #include  " sbe/sbe.hpp" 
12+ # include  < math.h> 
13+ # define  SBE_FLOAT_NAN  NAN
14+ # define  SBE_DOUBLE_NAN  NAN
15+ #endif 
16+ 
17+ #include  < sbe/sbe.hpp> 
818
9- #include  " uk_co_real_logic_sbe_ir_generated/ByteOrderCodec .hpp" 
10- #include  " uk_co_real_logic_sbe_ir_generated/SignalCodec .hpp" 
11- #include  " uk_co_real_logic_sbe_ir_generated/PresenceCodec.hpp" 
12- #include  " uk_co_real_logic_sbe_ir_generated/PrimitiveTypeCodec.hpp" 
13- #include  " uk_co_real_logic_sbe_ir_generated/VarDataEncoding .hpp" 
19+ #include  < uk_co_real_logic_sbe_ir_generated/VarDataEncoding .hpp> 
20+ #include  < uk_co_real_logic_sbe_ir_generated/ByteOrderCodec .hpp> 
21+ #include  < uk_co_real_logic_sbe_ir_generated/PresenceCodec.hpp> 
22+ #include  < uk_co_real_logic_sbe_ir_generated/PrimitiveTypeCodec.hpp> 
23+ #include  < uk_co_real_logic_sbe_ir_generated/SignalCodec .hpp> 
1424
1525using  namespace  sbe ; 
1626
@@ -27,24 +37,28 @@ class FrameCodec
2737 int  actingBlockLength_;
2838 int  actingVersion_;
2939
40+  FrameCodec (const  FrameCodec&) {}
41+ 
3042public: 
3143
32-  static  sbe_uint16_t  sbeBlockLength (void )
44+  FrameCodec (void ) : buffer_(NULL ), bufferLength_(0 ), offset_(0 ) {}
45+ 
46+  static  const  sbe_uint16_t  sbeBlockLength (void )
3347 {
3448 return  (sbe_uint16_t )12 ;
3549 }
3650
37-  static  sbe_uint16_t  sbeTemplateId (void )
51+  static  const   sbe_uint16_t  sbeTemplateId (void )
3852 {
3953 return  (sbe_uint16_t )1 ;
4054 }
4155
42-  static  sbe_uint16_t  sbeSchemaId (void )
56+  static  const   sbe_uint16_t  sbeSchemaId (void )
4357 {
4458 return  (sbe_uint16_t )0 ;
4559 }
4660
47-  static  sbe_uint16_t  sbeSchemaVersion (void )
61+  static  const   sbe_uint16_t  sbeSchemaVersion (void )
4862 {
4963 return  (sbe_uint16_t )0 ;
5064 }
@@ -71,7 +85,8 @@ class FrameCodec
7185 return  *this ;
7286 }
7387
74-  FrameCodec &wrapForDecode (char  *buffer, const  int  offset, const  int  actingBlockLength, const  int  actingVersion, const  int  bufferLength)
88+  FrameCodec &wrapForDecode (char  *buffer, const  int  offset, const  int  actingBlockLength, const  int  actingVersion,
89+  const  int  bufferLength)
7590 {
7691 buffer_ = buffer;
7792 offset_ = offset;
@@ -112,12 +127,12 @@ class FrameCodec
112127 return  actingVersion_;
113128 }
114129
115-  static  int  irIdId (void )
130+  static  const   int  irIdId (void )
116131 {
117132 return  1 ;
118133 }
119134
120-  static  int  irIdSinceVersion (void )
135+  static  const   int  irIdSinceVersion (void )
121136 {
122137 return  0 ;
123138 }
@@ -140,17 +155,17 @@ class FrameCodec
140155 return  " " 
141156 }
142157
143-  static  sbe_int32_t  irIdNullValue ()
158+  static  const   sbe_int32_t  irIdNullValue ()
144159 {
145160 return  -2147483648 ;
146161 }
147162
148-  static  sbe_int32_t  irIdMinValue ()
163+  static  const   sbe_int32_t  irIdMinValue ()
149164 {
150165 return  -2147483647 ;
151166 }
152167
153-  static  sbe_int32_t  irIdMaxValue ()
168+  static  const   sbe_int32_t  irIdMaxValue ()
154169 {
155170 return  2147483647 ;
156171 }
@@ -166,12 +181,12 @@ class FrameCodec
166181 return  *this ;
167182 }
168183
169-  static  int  irVersionId (void )
184+  static  const   int  irVersionId (void )
170185 {
171186 return  2 ;
172187 }
173188
174-  static  int  irVersionSinceVersion (void )
189+  static  const   int  irVersionSinceVersion (void )
175190 {
176191 return  0 ;
177192 }
@@ -194,17 +209,17 @@ class FrameCodec
194209 return  " " 
195210 }
196211
197-  static  sbe_int32_t  irVersionNullValue ()
212+  static  const   sbe_int32_t  irVersionNullValue ()
198213 {
199214 return  -2147483648 ;
200215 }
201216
202-  static  sbe_int32_t  irVersionMinValue ()
217+  static  const   sbe_int32_t  irVersionMinValue ()
203218 {
204219 return  -2147483647 ;
205220 }
206221
207-  static  sbe_int32_t  irVersionMaxValue ()
222+  static  const   sbe_int32_t  irVersionMaxValue ()
208223 {
209224 return  2147483647 ;
210225 }
@@ -220,12 +235,12 @@ class FrameCodec
220235 return  *this ;
221236 }
222237
223-  static  int  schemaVersionId (void )
238+  static  const   int  schemaVersionId (void )
224239 {
225240 return  3 ;
226241 }
227242
228-  static  int  schemaVersionSinceVersion (void )
243+  static  const   int  schemaVersionSinceVersion (void )
229244 {
230245 return  0 ;
231246 }
@@ -248,17 +263,17 @@ class FrameCodec
248263 return  " " 
249264 }
250265
251-  static  sbe_int32_t  schemaVersionNullValue ()
266+  static  const   sbe_int32_t  schemaVersionNullValue ()
252267 {
253268 return  -2147483648 ;
254269 }
255270
256-  static  sbe_int32_t  schemaVersionMinValue ()
271+  static  const   sbe_int32_t  schemaVersionMinValue ()
257272 {
258273 return  -2147483647 ;
259274 }
260275
261-  static  sbe_int32_t  schemaVersionMaxValue ()
276+  static  const   sbe_int32_t  schemaVersionMaxValue ()
262277 {
263278 return  2147483647 ;
264279 }
@@ -291,7 +306,7 @@ class FrameCodec
291306 return  " UTF-8" 
292307 }
293308
294-  static  int  packageNameSinceVersion (void )
309+  static  const   int  packageNameSinceVersion (void )
295310 {
296311 return  0 ;
297312 }
@@ -301,13 +316,13 @@ class FrameCodec
301316 return  (actingVersion_ >= 0 ) ? true  : false ;
302317 }
303318
304-  static  int  packageNameId (void )
319+  static  const   int  packageNameId (void )
305320 {
306321 return  4 ;
307322 }
308323
309324
310-  static  int  packageNameHeaderSize ()
325+  static  const   int  packageNameHeaderSize ()
311326 {
312327 return  1 ;
313328 }
@@ -366,7 +381,7 @@ class FrameCodec
366381 return  " UTF-8" 
367382 }
368383
369-  static  int  namespaceNameSinceVersion (void )
384+  static  const   int  namespaceNameSinceVersion (void )
370385 {
371386 return  0 ;
372387 }
@@ -376,13 +391,13 @@ class FrameCodec
376391 return  (actingVersion_ >= 0 ) ? true  : false ;
377392 }
378393
379-  static  int  namespaceNameId (void )
394+  static  const   int  namespaceNameId (void )
380395 {
381396 return  5 ;
382397 }
383398
384399
385-  static  int  namespaceNameHeaderSize ()
400+  static  const   int  namespaceNameHeaderSize ()
386401 {
387402 return  1 ;
388403 }
@@ -441,7 +456,7 @@ class FrameCodec
441456 return  " UTF-8" 
442457 }
443458
444-  static  int  semanticVersionSinceVersion (void )
459+  static  const   int  semanticVersionSinceVersion (void )
445460 {
446461 return  0 ;
447462 }
@@ -451,13 +466,13 @@ class FrameCodec
451466 return  (actingVersion_ >= 0 ) ? true  : false ;
452467 }
453468
454-  static  int  semanticVersionId (void )
469+  static  const   int  semanticVersionId (void )
455470 {
456471 return  6 ;
457472 }
458473
459474
460-  static  int  semanticVersionHeaderSize ()
475+  static  const   int  semanticVersionHeaderSize ()
461476 {
462477 return  1 ;
463478 }
0 commit comments