OnixS CME Drop Copy Handler C++ library 5.7.1
API documentation
Loading...
Searching...
No Matches
FieldValueRef Class Reference

Public Member Functions

 FieldValueRef ()
 FieldValueRef (const FieldValueRef &)
 operator bool () const
 operator std::string () const
bool operator== (const FieldValueRef &) const
bool operator!= (const FieldValueRef &) const
bool operator== (const StringRef &) const
bool operator!= (const StringRef &) const
bool toNumber (Int32 &) const
bool toNumber (UInt32 &) const
bool toNumber (Int64 &) const
bool toNumber (UInt64 &) const
bool toNumber (Decimal &) const
bool toTimestamp (Timestamp &, SinceEpochUnit) const
bool toStringRef (StringRef &) const
bool toChar (char &) const
bool toGroup (Group &) const
void toString (std::string &) const
std::string toString () const
FieldValueRefoperator= (const FieldValueRef &)

Friends

class MessageOperator

Detailed Description

Reference to a read-only FIX field value.

Reference may refers to a valid field value or to nothing. 'operator bool()' is exposed to check whether instance refers to existent field value.

Definition at line 39 of file Messaging.h.

Constructor & Destructor Documentation

◆ FieldValueRef() [1/2]

Uninitialized value.

◆ FieldValueRef() [2/2]

Shallow copy from another one.

Member Function Documentation

◆ operator bool()

operator bool ( ) const

Indicated whether the instance refers to a valid value.

◆ operator std::string()

operator std::string ( ) const
inline

Return string presentation of the value being referenced.

Definition at line 172 of file Messaging.h.

◆ operator!=() [1/2]

bool operator!= ( const FieldValueRef & ) const

Compares with another instance for inequality.

◆ operator!=() [2/2]

bool operator!= ( const StringRef & ) const

Compares string presentation for equality with given text reference.

◆ operator=()

FieldValueRef & operator= ( const FieldValueRef & )

Updates instance to refer to another field value.

Warning
Does NOT perform deep copy of field values. Just updates reference to point to value of other field.

◆ operator==() [1/2]

bool operator== ( const FieldValueRef & ) const

Compares with another instance for equality.

◆ operator==() [2/2]

bool operator== ( const StringRef & ) const

Compares string presentation for equality with given text reference.

◆ toChar()

bool toChar ( char & ) const

If value represent one-char text, copies it into given variable.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ toGroup()

bool toGroup ( Group & ) const

If repeating group is associated with field, allows to get instance of it.

Returns
false if no group is associated with field.

◆ toNumber() [1/5]

bool toNumber ( Decimal & ) const

Converts field value into a whole number.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ toNumber() [2/5]

bool toNumber ( Int32 & ) const

Converts field value into a whole number.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ toNumber() [3/5]

bool toNumber ( Int64 & ) const

Converts field value into a whole number.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ toNumber() [4/5]

bool toNumber ( UInt32 & ) const

Converts field value into a whole number.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ toNumber() [5/5]

bool toNumber ( UInt64 & ) const

Converts field value into a whole number.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ toString() [1/2]

std::string toString ( ) const
inline

Return string presentation of field value.

Definition at line 179 of file Messaging.h.

◆ toString() [2/2]

void toString ( std::string & ) const

Appends copy of referenced value text presentation to the std::string.

◆ toStringRef()

bool toStringRef ( StringRef & ) const

If value represents text, returns reference to it.

Returns
false if value referenced by instance can't be converted into value of target type. If value being referenced is not of string type (like number or datetime), conversion fails.
Note
conversion of instance referencing to nothing always fails.

◆ toTimestamp()

bool toTimestamp ( Timestamp & ,
SinceEpochUnit  ) const

Converts field value into Timestamp.

Returns
false if value referenced by instance can't be converted into value of target type.
Note
conversion of instance referencing to nothing always fails.

◆ MessageOperator

friend class MessageOperator
friend

Definition at line 164 of file Messaging.h.