fix8
version 1.4.0
Open Source C++ FIX Framework
|
Fast map for statically generated data types. Assumes table is sorted. Complexity is O(logN). More...
#include <f8types.hpp>
Public Types | |
using | Pair = _pair< Key, Val > |
using | iterator = Pair * |
using | const_iterator = const Pair * |
Public Member Functions | |
GeneratedTable (const_iterator pairs, const size_t pairsz) | |
Ctor. More... | |
const_iterator | begin () const |
const_iterator | end () const |
const Val & | find_ref (const Key &key) const |
const Val * | find_ptr (const Key &key) const |
const_iterator | find_pair_ptr (const Key &key) const |
const_iterator | at (const size_t idx) const |
size_t | size () const |
Private Member Functions | |
const_iterator | _find (const Key &key) const |
Private Attributes | |
const_iterator | _pairs |
The actual data set. More... | |
const size_t | _pairsz |
The number of elements in the data set. More... | |
Fast map for statically generated data types. Assumes table is sorted. Complexity is O(logN).
Key | the key |
Val | the value |
Definition at line 100 of file f8types.hpp.
using FIX8::GeneratedTable< Key, Val >::const_iterator = const Pair* |
Definition at line 105 of file f8types.hpp.
using FIX8::GeneratedTable< Key, Val >::iterator = Pair* |
Definition at line 104 of file f8types.hpp.
using FIX8::GeneratedTable< Key, Val >::Pair = _pair<Key, Val> |
Definition at line 103 of file f8types.hpp.
|
inline |
Ctor.
Definition at line 128 of file f8types.hpp.
|
inlineprivate |
Find a key; complexity log2(N)+2
key | the key to find |
res != end && key >= res
Definition at line 119 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::begin(), FIX8::GeneratedTable< Key, Val >::end(), and FIX8::_pair< Key, Val >::Less().
Referenced by FIX8::GeneratedTable< Key, Val >::find_pair_ptr(), FIX8::GeneratedTable< Key, Val >::find_ptr(), and FIX8::GeneratedTable< Key, Val >::find_ref().
|
inline |
Get the pair at index location
idx | of the pair to retrieve |
Definition at line 172 of file f8types.hpp.
Referenced by FIX8::F8MetaCntx::F8MetaCntx().
|
inline |
Get iterator to start of Pairs
Definition at line 133 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::_pairs.
Referenced by FIX8::GeneratedTable< Key, Val >::_find(), and FIX8::F8MetaCntx::F8MetaCntx().
|
inline |
Get iterator to last + 1 of Pairs
Definition at line 137 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::_pairsz.
Referenced by FIX8::GeneratedTable< Key, Val >::_find(), and FIX8::F8MetaCntx::F8MetaCntx().
|
inline |
Find a key pair record (pointer).
key | the key to find |
Definition at line 163 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::_find().
|
inline |
Find a key (pointer).
key | the key to find |
Definition at line 154 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::_find(), and FIX8::_pair< Key, Val >::_value.
Referenced by FIX8::Session::create_msg(), FIX8::Message::factory(), and FIX8::F8MetaCntx::find_bme().
|
inline |
Find a key (reference). If not found, throw InvalidMetadata. Ye Olde Binary Chop
key | the key to find |
Definition at line 143 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::_find(), and FIX8::_pair< Key, Val >::_value.
|
inline |
Get the number of elements in the data set.
Definition at line 176 of file f8types.hpp.
References FIX8::GeneratedTable< Key, Val >::_pairsz.
Referenced by FIX8::F8MetaCntx::F8MetaCntx().
|
private |
The actual data set.
Definition at line 111 of file f8types.hpp.
Referenced by FIX8::GeneratedTable< Key, Val >::begin().
|
private |
The number of elements in the data set.
Definition at line 114 of file f8types.hpp.
Referenced by FIX8::GeneratedTable< Key, Val >::end(), and FIX8::GeneratedTable< Key, Val >::size().