OnixS C++ CME MDP Premium Market Data Handler  5.8.3
API Documentation
Field Class Reference

#include <OnixS/CME/MDH/FIX/Field.h>

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 ( const ValueConverter converter)
inlineprotected

Initializes the field.

Definition at line 39 of file Field.h.

Field ( )
inline

Initializes the field with no value.

Definition at line 59 of file Field.h.

Field ( const Field other)
inline

Initializes as the copy of the other field.

Definition at line 66 of file Field.h.

Member Function Documentation

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 ( ) const
inline

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

Definition at line 74 of file Field.h.

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.

std::string toStr ( ) const
inline

Returns the text representation.

Definition at line 228 of file Field.h.

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

Outputs the text representation into the given string.

Definition at line 238 of file Field.h.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

const ValueContainer& value ( ) const
inlineprotected

Exposes value storage for further value manipulations.

Definition at line 46 of file Field.h.

ValueContainer& value ( )
inlineprotected

Exposes value storage for further value manipulations.

Definition at line 52 of file Field.h.


The documentation for this class was generated from the following file: