fix8
version 1.4.0
Open Source C++ FIX Framework
|
The base field class (ABC) for all fields. More...
#include <field.hpp>
Public Member Functions | |
BaseField (unsigned short fnum, const RealmBase *rlm=nullptr) | |
virtual | ~BaseField () |
Dtor. More... | |
unsigned short | get_tag () const |
virtual std::ostream & | print (std::ostream &os) const =0 |
virtual size_t | print (char *to) const =0 |
virtual FieldTrait::FieldType | get_underlying_type () const =0 |
virtual BaseField * | copy ()=0 |
virtual int | get_rlm_idx () const |
template<typename T > | |
T & | from () |
template<typename T > | |
const T * | as () const |
size_t | encode (std::ostream &os) const |
size_t | encode (char *to) const |
bool | same_base (const BaseField &that) const |
BaseField Equivalence test. More... | |
virtual bool | operator== (const BaseField &that) const =0 |
Equivalence operator. More... | |
virtual bool | operator< (const BaseField &that) const =0 |
Less than operator. More... | |
virtual bool | operator> (const BaseField &that) const =0 |
Greater than operator. More... | |
bool | operator!= (const BaseField &that) const |
Inequivalence operator. More... | |
bool | operator<= (const BaseField &that) const |
Less or equal to operator. More... | |
bool | operator>= (const BaseField &that) const |
Greater or equal to operator. More... | |
const RealmBase * | get_realm () const |
Protected Attributes | |
const RealmBase * | _rlm |
Private Attributes | |
const unsigned short | _fnum |
Friends | |
class | MessageBase |
std::ostream & | operator<< (std::ostream &os, const BaseField &what) |
|
inline |
|
inlinevirtual |
|
inline |
|
pure virtual |
Copy this field.
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
inline |
Encode this field to the supplied stream.
os | stream to encode to |
Definition at line 184 of file field.hpp.
References FIX8::default_assignment_separator(), and FIX8::default_field_separator().
|
inline |
Encode this field to the supplied stream. ULL version.
to | buffer to encode to |
Definition at line 194 of file field.hpp.
References FIX8::default_assignment_separator(), FIX8::default_field_separator(), FIX8::itoa(), and print().
|
inline |
Cast this field to the supplied type.
T | target type |
Definition at line 173 of file field.hpp.
Referenced by FIX8::Field< int, field >::set(), FIX8::Field< f8String, field >::set(), FIX8::Field< fp_type, field >::set(), FIX8::Field< char, field >::set(), FIX8::Field< UTCTimestamp, field >::set(), FIX8::Field< UTCTimeOnly, field >::set(), FIX8::Field< UTCDateOnly, field >::set(), FIX8::Field< LocalMktDate, field >::set(), FIX8::Field< MonthYear, field >::set(), FIX8::Field< TZTimeOnly, field >::set(), FIX8::Field< TZTimestamp, field >::set(), FIX8::Field< Boolean, field >::set(), and FIX8::Field< f8String, field >::set_from_raw().
|
inline |
|
inlinevirtual |
Get the realm index of this field.
Reimplemented in FIX8::Field< Boolean, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
inline |
Get the fix tag id of this field.
Definition at line 145 of file field.hpp.
References _fnum.
Referenced by FIX8::ConsoleMenu::EditMsg().
|
pure virtual |
Get the underlying FieldType for this field
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
inline |
|
pure virtual |
Less than operator.
that | field to compare |
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
inline |
|
pure virtual |
Equivalence operator.
that | field to compare |
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
pure virtual |
Greater than operator.
that | field to compare |
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
inline |
|
pure virtual |
Print this field to the supplied stream. Used by the Fix8 printer.
os | stream to print to |
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
Referenced by encode(), FIX8::Field< UTCTimestamp, field >::print(), FIX8::Field< UTCTimeOnly, field >::print(), FIX8::Field< UTCDateOnly, field >::print(), FIX8::Field< LocalMktDate, field >::print(), FIX8::Field< MonthYear, field >::print(), and FIX8::Session::sequence_check().
|
pure virtual |
Print this field to the supplied buffer. Used for encoding.
to | buffer to print to |
Implemented in FIX8::Field< Boolean, field >, FIX8::Field< TZTimestamp, field >, FIX8::Field< TZTimeOnly, field >, FIX8::Field< MonthYear, field >, FIX8::Field< LocalMktDate, field >, FIX8::Field< UTCDateOnly, field >, FIX8::Field< UTCTimeOnly, field >, FIX8::Field< UTCTimestamp, field >, FIX8::Field< char, field >, FIX8::Field< fp_type, field >, FIX8::Field< f8String, field >, FIX8::Field< char *, field >, and FIX8::Field< int, field >.
|
inline |
BaseField Equivalence test.
that | field to compare |
Definition at line 207 of file field.hpp.
References _fnum.
Referenced by FIX8::Field< int, field >::operator<(), FIX8::Field< f8String, field >::operator<(), FIX8::Field< fp_type, field >::operator<(), FIX8::Field< char, field >::operator<(), FIX8::Field< UTCTimestamp, field >::operator<(), FIX8::Field< UTCTimeOnly, field >::operator<(), FIX8::Field< UTCDateOnly, field >::operator<(), FIX8::Field< LocalMktDate, field >::operator<(), FIX8::Field< MonthYear, field >::operator<(), FIX8::Field< TZTimeOnly, field >::operator<(), FIX8::Field< TZTimestamp, field >::operator<(), FIX8::Field< Boolean, field >::operator<(), FIX8::Field< int, field >::operator==(), FIX8::Field< f8String, field >::operator==(), FIX8::Field< fp_type, field >::operator==(), FIX8::Field< char, field >::operator==(), FIX8::Field< UTCTimestamp, field >::operator==(), FIX8::Field< UTCTimeOnly, field >::operator==(), FIX8::Field< UTCDateOnly, field >::operator==(), FIX8::Field< LocalMktDate, field >::operator==(), FIX8::Field< MonthYear, field >::operator==(), FIX8::Field< TZTimeOnly, field >::operator==(), FIX8::Field< TZTimestamp, field >::operator==(), FIX8::Field< Boolean, field >::operator==(), FIX8::Field< int, field >::operator>(), FIX8::Field< f8String, field >::operator>(), FIX8::Field< fp_type, field >::operator>(), FIX8::Field< char, field >::operator>(), FIX8::Field< UTCTimestamp, field >::operator>(), FIX8::Field< UTCTimeOnly, field >::operator>(), FIX8::Field< UTCDateOnly, field >::operator>(), FIX8::Field< LocalMktDate, field >::operator>(), FIX8::Field< MonthYear, field >::operator>(), FIX8::Field< TZTimeOnly, field >::operator>(), FIX8::Field< TZTimestamp, field >::operator>(), and FIX8::Field< Boolean, field >::operator>().
|
friend |
|
friend |
|
private |
Definition at line 129 of file field.hpp.
Referenced by FIX8::MessageBase::add_field(), FIX8::MessageBase::check_set_rlm(), get_tag(), and same_base().
|
protected |
Definition at line 132 of file field.hpp.
Referenced by FIX8::MessageBase::check_set_rlm(), get_realm(), FIX8::Field< int, field >::get_rlm_idx(), FIX8::Field< f8String, field >::get_rlm_idx(), FIX8::Field< fp_type, field >::get_rlm_idx(), FIX8::Field< char, field >::get_rlm_idx(), FIX8::Field< Boolean, field >::get_rlm_idx(), FIX8::Field< int, field >::is_valid(), FIX8::Field< f8String, field >::is_valid(), FIX8::Field< fp_type, field >::is_valid(), and FIX8::Field< char, field >::is_valid().