OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
Field Class Reference

Public Member Functions

 Field ()
 Field (const Field &other)
 operator bool () const
template<class Value>
ValueConversion< Value >::Result cast () const
bool tryCast (StrRef &str) const
bool tryCast (Char &value) const
bool tryCast (Int8 &value) const
bool tryCast (UInt8 &value) const
bool tryCast (Int16 &value) const
bool tryCast (UInt16 &value) const
bool tryCast (Int32 &value) const
bool tryCast (UInt32 &value) const
bool tryCast (Int64 &value) const
bool tryCast (UInt64 &value) const
bool tryCast (Timestamp &value) const
bool tryCast (MaturityMonthYear &value) const
template<class Enumeration>
bool tryCast (typename Enumeration::Enum &value) const
template<class BitSet>
bool tryCast (BitSet &value, typename BitSet::Bits *=NULL) const
std::string toStr () const
void toStr (std::string &str) const
Fieldoperator= (const Field &other)

Protected Member Functions

 Field (const ValueConverter &converter)
const ValueContainervalue () const
ValueContainervalue ()

Detailed Description

Represents the field in the FIX message.

Exposes operations to access value and make a compatible conversion.

Definition at line 32 of file Field.h.

Constructor & Destructor Documentation

◆ Field() [1/3]

Field ( const ValueConverter & converter)
inlineprotected

Initializes the field.

Definition at line 39 of file Field.h.

◆ Field() [2/3]

Field ( )
inline

Initializes the field with no value.

Definition at line 60 of file Field.h.

◆ Field() [3/3]

Field ( const Field & other)
inline

Initializes as the copy of the other field.

Definition at line 71 of file Field.h.

Member Function Documentation

◆ cast()

template<class Value>
ValueConversion< Value >::Result cast ( ) const
inline

Casts the stored value to the requested type.

The value may be converted into the value of the requested type if a conversion is possible. Otherwise, an exception is thrown. For example, if the field value represents a reference to a string (e.g. instance of the StrRef class), then it can be successfully converted into a number if the string referred represents a number.

Definition at line 102 of file Field.h.

◆ operator bool()

operator bool ( ) const
inline

Tells whether the field has an associated (non-null) value.

Definition at line 80 of file Field.h.

◆ operator=()

Field & operator= ( const Field & other)
inline

Re-initializes the field as a copy of the other one.

Definition at line 381 of file Field.h.

◆ toStr() [1/2]

std::string toStr ( ) const
inline

Returns the text representation.

Definition at line 358 of file Field.h.

◆ toStr() [2/2]

void toStr ( std::string & str) const
inline

Outputs the text representation into the given string.

Definition at line 369 of file Field.h.

◆ tryCast() [1/14]

template<class BitSet>
bool tryCast ( BitSet & value,
typename BitSet::Bits * = NULL ) const
inline

Tries to cast the stored value into a value of the type representing a BitSet. Returned value indicates whether the casting succeeded.

Definition at line 337 of file Field.h.

◆ tryCast() [2/14]

bool tryCast ( Char & value) const
inline

Tries to cast the stored value into a value of the Char type. Returned value indicates whether the casting succeeded.

Definition at line 133 of file Field.h.

◆ tryCast() [3/14]

bool tryCast ( Int16 & value) const
inline

Tries to cast the stored value into a value of the Int16 type. Returned value indicates whether the casting succeeded.

Definition at line 178 of file Field.h.

◆ tryCast() [4/14]

bool tryCast ( Int32 & value) const
inline

Tries to cast the stored value into a value of the Int32 type. Returned value indicates whether the casting succeeded.

Definition at line 208 of file Field.h.

◆ tryCast() [5/14]

bool tryCast ( Int64 & value) const
inline

Tries to cast the stored value into a value of the Int64 type. Returned value indicates whether the casting succeeded.

Definition at line 238 of file Field.h.

◆ tryCast() [6/14]

bool tryCast ( Int8 & value) const
inline

Tries to cast the stored value into a value of the Int8 type. Returned value indicates whether the casting succeeded.

Definition at line 148 of file Field.h.

◆ tryCast() [7/14]

bool tryCast ( MaturityMonthYear & value) const
inline

Tries to cast the stored value into a value of the MaturityMonthYear type. Returned value indicates whether the casting succeeded.

Definition at line 283 of file Field.h.

◆ tryCast() [8/14]

bool tryCast ( StrRef & str) const
inline

Tries to cast the stored value into a value of the StrRef type. Returned value indicates whether the casting succeeded.

Definition at line 118 of file Field.h.

◆ tryCast() [9/14]

bool tryCast ( Timestamp & value) const
inline

Tries to cast the stored value into a value of the Timestamp type. Returned value indicates whether the casting succeeded.

Definition at line 268 of file Field.h.

◆ tryCast() [10/14]

template<class Enumeration>
bool tryCast ( typename Enumeration::Enum & value) const
inline

Tries to cast the stored value into a value of the given Enumeration type. Returned value indicates whether the casting succeeded.

Definition at line 302 of file Field.h.

◆ tryCast() [11/14]

bool tryCast ( UInt16 & value) const
inline

Tries to cast the stored value into a value of the UInt16 type. Returned value indicates whether the casting succeeded.

Definition at line 193 of file Field.h.

◆ tryCast() [12/14]

bool tryCast ( UInt32 & value) const
inline

Tries to cast the stored value into a value of the UInt32 type. Returned value indicates whether the casting succeeded.

Definition at line 223 of file Field.h.

◆ tryCast() [13/14]

bool tryCast ( UInt64 & value) const
inline

Tries to cast the stored value into a value of the UInt64 type. Returned value indicates whether the casting succeeded.

Definition at line 253 of file Field.h.

◆ tryCast() [14/14]

bool tryCast ( UInt8 & value) const
inline

Tries to cast the stored value into a value of the UInt8 type. Returned value indicates whether the casting succeeded.

Definition at line 163 of file Field.h.

◆ value() [1/2]

ValueContainer & value ( )
inlineprotected

Exposes value storage for further value manipulations.

Definition at line 53 of file Field.h.

◆ value() [2/2]

const ValueContainer & value ( ) const
inlineprotected

Exposes value storage for further value manipulations.

Definition at line 47 of file Field.h.