OnixS C++ CME iLink 3 Binary Order Entry Handler  1.18.0
API Documentation
Field Class Reference

#include <OnixS/CME/iLink3/messaging/TagBased/Field.h>

Public Member Functions

 Field ()
 
 operator bool () const noexcept
 
 operator std::string () const
 
bool operator== (const StrRef &r) const
 
bool operator!= (const StrRef &r) const
 
template<class Value >
ValueConversion< Value >::Result cast () const
 
bool toStringRef (StrRef &str) const
 
bool toChar (Char &value) const
 
bool toNumber (Int8 &value) const
 
bool toNumber (UInt8 &value) const
 
bool toNumber (Int16 &value) const
 
bool toNumber (UInt16 &value) const
 
bool toNumber (Int32 &value) const
 
bool toNumber (UInt32 &value) const
 
bool toNumber (Int64 &value) const
 
bool toNumber (UInt64 &value) const
 
bool toNumber (Decimal &value) const
 
bool toTimestamp (Timestamp &value) const
 
bool toMaturityMonthYear (MaturityMonthYear &value) const
 
template<class Enumeration >
bool toEnumeration (typename Enumeration::Enum &value) const
 
template<class BitSet >
bool toBitSet (BitSet &value) const
 
std::string toString () const
 
void toString (std::string &str) const
 
StrRef toString (Char *buf, size_t size) const
 

Protected Member Functions

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

Detailed Description

Definition at line 29 of file Field.h.

Constructor & Destructor Documentation

Field ( )
inline

Initializes a field with no value.

Definition at line 33 of file Field.h.

Field ( const ValueConverter converter)
inlineexplicitprotectednoexcept

Initializes the field.

Definition at line 306 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.

Exceptions
std::runtime_errorif conversion is impossible.

Definition at line 84 of file Field.h.

operator bool ( ) const
inlineexplicitnoexcept

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

Definition at line 41 of file Field.h.

operator std::string ( ) const
inlineexplicit
Returns
a string presentation.

Definition at line 47 of file Field.h.

bool operator!= ( const StrRef r) const
inline

Compares the presentation for not equality with given text reference.

Definition at line 63 of file Field.h.

bool operator== ( const StrRef r) const
inline

Compares the presentation for equality with the given text reference.

Definition at line 54 of file Field.h.

bool toBitSet ( BitSet &  value) const
inline

Tries to cast the stored value into a value of the type representing a BitSet.

Returns
false if the conversion fails.

Definition at line 261 of file Field.h.

bool toChar ( Char value) const
inline

Tries to cast the stored value into a value of the Char type.

Returns
false if the conversion fails.

Definition at line 107 of file Field.h.

bool toEnumeration ( typename Enumeration::Enum &  value) const
inline

Tries to cast the stored value into a value of the given Enumeration type.

Returns
false if the conversion fails.

Definition at line 240 of file Field.h.

bool toMaturityMonthYear ( MaturityMonthYear value) const
inline

Tries to cast the stored value into a value of the MaturityMonthYear type.

Returns
false if the conversion fails.

Definition at line 228 of file Field.h.

bool toNumber ( Int8 &  value) const
inline

Tries to cast the stored value into a value of the Int8 type.

Returns
false if the conversion fails.

Definition at line 118 of file Field.h.

bool toNumber ( UInt8 value) const
inline

Tries to cast the stored value into a value of the UInt8 type.

Returns
false if the conversion fails.

Definition at line 129 of file Field.h.

bool toNumber ( Int16 &  value) const
inline

Tries to cast the stored value into a value of the Int16 type.

Returns
false if the conversion fails.

Definition at line 140 of file Field.h.

bool toNumber ( UInt16 value) const
inline

Tries to cast the stored value into a value of the UInt16 type.

Returns
false if the conversion fails.

Definition at line 151 of file Field.h.

bool toNumber ( Int32 value) const
inline

Tries to cast the stored value into a value of the Int32 type.

Returns
false if the conversion fails.

Definition at line 162 of file Field.h.

bool toNumber ( UInt32 value) const
inline

Tries to cast the stored value into a value of the UInt32 type.

Returns
false if the conversion fails.

Definition at line 173 of file Field.h.

bool toNumber ( Int64 &  value) const
inline

Tries to cast the stored value into a value of the Int64 type.

Returns
false if the conversion fails.

Definition at line 184 of file Field.h.

bool toNumber ( UInt64 value) const
inline

Tries to cast the stored value into a value of the UInt64 type.

Returns
false if the conversion fails.

Definition at line 195 of file Field.h.

bool toNumber ( Decimal value) const
inline

Tries to cast the stored value into a value of the Decimal type.

Returns
false if the conversion fails.

Definition at line 206 of file Field.h.

std::string toString ( ) const
inline
Returns
the text representation.

Definition at line 278 of file Field.h.

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

Outputs the text representation into the given string.

Definition at line 288 of file Field.h.

StrRef toString ( Char buf,
size_t  size 
) const
inline
Returns
the text presentation of the value stored in the given container as a StrRef.

Definition at line 297 of file Field.h.

bool toStringRef ( StrRef str) const
inline

Tries to cast the stored value into a value of the StrRef type.

Returns
false if the conversion fails.

Definition at line 96 of file Field.h.

bool toTimestamp ( Timestamp value) const
inline

Tries to cast the stored value into a value of the Timestamp type.

Returns
false if the conversion fails.

Definition at line 217 of file Field.h.

const ValueContainer& value ( ) const
inlineprotectednoexcept

Exposes the value storage for further value manipulations.

Definition at line 313 of file Field.h.

ValueContainer& value ( )
inlineprotectednoexcept

Exposes the value storage for further value manipulations.

Definition at line 319 of file Field.h.


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