![]() |
fix8
version 1.4.0
Open Source C++ FIX Framework
|
Used for static trait interrogation. More...
#include <traits.hpp>
Classes | |
| struct | Compare |
| Binary comparitor functor. More... | |
| struct | PosCompare |
| Binary position comparitor functor. More... | |
Public Types | |
| enum | FieldType { ft_untyped, ft_int, ft_Length, ft_TagNum, ft_SeqNum, ft_NumInGroup, ft_DayOfMonth, ft_end_int =ft_DayOfMonth, ft_char, ft_Boolean, ft_end_char =ft_Boolean, ft_float, ft_Qty, ft_Price, ft_PriceOffset, ft_Amt, ft_Percentage, ft_end_float =ft_Percentage, ft_string, ft_MultipleCharValue, ft_MultipleStringValue, ft_Country, ft_Currency, ft_Exchange, ft_MonthYear, ft_UTCTimestamp, ft_UTCTimeOnly, ft_UTCDateOnly, ft_LocalMktDate, ft_TZTimeOnly, ft_TZTimestamp, ft_data, ft_XMLData, ft_pattern, ft_Tenor, ft_Reserved100Plus, ft_Reserved1000Plus, ft_Reserved4000Plus, ft_Language, ft_end_string =ft_Language } |
| enum | TraitTypes { mandatory, present, position, group, component, suppress, automatic, count } |
| Trait bits. More... | |
Public Member Functions | |
| FieldTrait ()=default | |
| Ctor. More... | |
| FieldTrait (const FieldTrait &from) | |
| Copy Ctor. More... | |
| FieldTrait (unsigned short fnum, unsigned ftype, unsigned short pos, unsigned short compon, unsigned short field_traits) | |
| FieldTrait (const unsigned short field) | |
| FieldTrait (const unsigned short field, const FieldType ftype, const unsigned short pos=0, bool ismandatory=false, bool isgroup=false, const unsigned compon=0, bool ispresent=false) | |
Static Public Member Functions | |
| static bool | is_int (FieldType ftype) |
| static bool | is_char (FieldType ftype) |
| static bool | is_float (FieldType ftype) |
| static bool | is_string (FieldType ftype) |
| static FieldType | underlying_type (FieldType ftype) |
| static F8API std::string & | get_type_string (FieldType ftype, std::string &to) |
Public Attributes | |
| unsigned short | _fnum |
| FieldType | _ftype |
| unsigned short | _pos |
| unsigned short | _component |
| ebitset< TraitTypes, unsigned short > | _field_traits |
Friends | |
| F8API std::ostream & | operator<< (std::ostream &os, const FieldTrait &what) |
Used for static trait interrogation.
FIX field traits - hold specific traits for each field.
Definition at line 57 of file traits.hpp.
Definition at line 59 of file traits.hpp.
Trait bits.
| Enumerator | |
|---|---|
| mandatory | |
| present | |
| position | |
| group | |
| component | |
| suppress | |
| automatic | |
| count | |
Definition at line 78 of file traits.hpp.
|
default |
Ctor.
|
inline |
Copy Ctor.
Definition at line 112 of file traits.hpp.
|
inline |
Ctor.
| fnum | field num (tag number) |
| ftype | field type |
| pos | field position (in FIX message) |
| compon | component idx |
| field_traits | bitmap of TraitTypes |
| group | ptr ot traits if group |
| fieldcnt | number of fields in group if group |
Definition at line 123 of file traits.hpp.
References group.
|
inline |
|
inline |
Ctor.
| field | field num (tag number) |
| ftype | field type |
| pos | field position (in FIX message) |
| ismandatory | true if mandatory |
| isgroup | true if this is a group |
| compon | component idx |
| ispresent | true if field is present (should be false until set). |
Definition at line 146 of file traits.hpp.
|
static |
Print the FieldType to the supplied string
| ftype | FieldType |
| to | target string |
Definition at line 69 of file traits.cpp.
References is_char(), is_float(), is_int(), and is_string().
Referenced by FIX8::operator<<().
|
inlinestatic |
Check if this FieldType is a char.
| ftype | field to check |
Definition at line 88 of file traits.hpp.
References ft_char, and ft_end_char.
Referenced by get_type_string(), FIX8::RealmBase::print(), and underlying_type().
|
inlinestatic |
Check if this FieldType is a float.
| ftype | field to check |
Definition at line 93 of file traits.hpp.
References ft_end_float, and ft_float.
Referenced by get_type_string(), FIX8::RealmBase::print(), and underlying_type().
|
inlinestatic |
Check if this FieldType is an int.
| ftype | field to check |
Definition at line 83 of file traits.hpp.
References ft_end_int, and ft_int.
Referenced by get_type_string(), FIX8::RealmBase::print(), and underlying_type().
|
inlinestatic |
Check if this FieldType is a string.
| ftype | field to check |
Definition at line 98 of file traits.hpp.
References ft_end_string, and ft_string.
Referenced by get_type_string(), FIX8::RealmBase::print(), and underlying_type().
Return the underlying field type of a given FieldType
| ftype | field to check |
Definition at line 103 of file traits.hpp.
References ft_char, ft_float, ft_int, ft_string, ft_untyped, is_char(), is_float(), is_int(), and is_string().
|
friend |
|
mutable |
Definition at line 154 of file traits.hpp.
Referenced by FIX8::FieldTraits::getComp(), and FIX8::operator<<().
|
mutable |
Definition at line 155 of file traits.hpp.
Referenced by FIX8::FieldTraits::clear(), FIX8::FieldTraits::clear_flag(), FIX8::FieldTraits::get(), FIX8::FieldTraits::getPos(), FIX8::FieldTraits::getval(), FIX8::operator<<(), and FIX8::FieldTraits::set().
| unsigned short FIX8::FieldTrait::_fnum |
Definition at line 152 of file traits.hpp.
Referenced by FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), FIX8::FieldTrait::Compare::operator()(), and FIX8::operator<<().
| FieldType FIX8::FieldTrait::_ftype |
Definition at line 153 of file traits.hpp.
Referenced by FIX8::operator<<().
|
mutable |
Definition at line 154 of file traits.hpp.
Referenced by FIX8::FieldTraits::getPos(), FIX8::FieldTrait::PosCompare::operator()(), and FIX8::operator<<().