OnixS C++ CME MDP Premium Market Data Handler 5.9.0
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 *=nullptr) 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

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 59 of file Field.h.

◆ Field() [3/3]

Field ( const Field & other)
inline

Initializes as the copy of the other field.

Definition at line 66 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 88 of file Field.h.

◆ operator bool()

operator bool ( ) const
inline

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

Definition at line 74 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 244 of file Field.h.

◆ toStr() [1/2]

std::string toStr ( ) const
inline

Returns the text representation.

Definition at line 228 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 238 of file Field.h.

◆ tryCast() [1/14]

template<class BitSet>
bool tryCast ( BitSet & value,
typename BitSet::Bits * = nullptr ) 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 213 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 106 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 130 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 146 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 162 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 114 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 186 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 98 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 178 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 195 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 138 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 154 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 170 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 122 of file Field.h.

◆ value() [1/2]

ValueContainer & value ( )
inlineprotected

Exposes value storage for further value manipulations.

Definition at line 52 of file Field.h.

◆ value() [2/2]

const ValueContainer & value ( ) const
inlineprotected

Exposes value storage for further value manipulations.

Definition at line 46 of file Field.h.