fix8  version 1.4.0
Open Source C++ FIX Framework
FIX8::FieldTrait_Hash_Array Struct Reference

Fast index lookup for FieldTrait. More...

#include <traits.hpp>

Public Member Functions

 FieldTrait_Hash_Array (const FieldTrait *from, const size_t els)
 
 ~FieldTrait_Hash_Array ()
 

Public Attributes

const unsigned _els
 
const unsigned _sz
 
unsigned short * _arr
 

Detailed Description

Fast index lookup for FieldTrait.

Definition at line 198 of file traits.hpp.

Constructor & Destructor Documentation

FIX8::FieldTrait_Hash_Array::FieldTrait_Hash_Array ( const FieldTrait from,
const size_t  els 
)
inline

Definition at line 203 of file traits.hpp.

References _els.

204  : _els(static_cast<unsigned>(els)), _sz((from + _els - 1)->_fnum + 1), _arr(new unsigned short [_sz])
205  {
206  std::fill(_arr, _arr + _sz, 0);
207  for (unsigned offset(0); offset < _els; ++offset)
208  *(_arr + (from + offset)->_fnum) = offset;
209  }
unsigned short * _arr
Definition: traits.hpp:201
FIX8::FieldTrait_Hash_Array::~FieldTrait_Hash_Array ( )
inline

Definition at line 211 of file traits.hpp.

References _arr.

211 { delete[] _arr; }
unsigned short * _arr
Definition: traits.hpp:201

Member Data Documentation

unsigned short* FIX8::FieldTrait_Hash_Array::_arr
const unsigned FIX8::FieldTrait_Hash_Array::_els

Definition at line 200 of file traits.hpp.

Referenced by FieldTrait_Hash_Array().

const unsigned FIX8::FieldTrait_Hash_Array::_sz

The documentation for this struct was generated from the following file: