OnixS CBOE CSM Handler for C++  1.2.8.0
Public Member Functions | Friends
FieldValueRef Class Reference

Implements concept of a read-only reference to a FIX field value. More...

List of all members.

Public Member Functions

 FieldValueRef ()
 Uninitialized value.
 FieldValueRef (const FieldValueRef &other)
 Shallow copy from another one.
 operator bool () const
 Indicated whether the instance refers to a valid value.
 operator std::string () const
 Return string presentation of the value being referenced.
bool operator== (const FieldValueRef &) const
 Compares with another instance for equality.
bool operator!= (const FieldValueRef &) const
 Compares with another instance for inequality.
bool operator== (const StringRef &) const
 Compares string presentation for equality with given text reference.
bool operator!= (const StringRef &) const
 Compares string presentation for equality with given text reference.
bool toNumber (Int32 &) const
 Converts field value into whole number.
bool toNumber (UInt32 &) const
 Converts field value into whole number.
bool toNumber (Int64 &) const
 Converts field value into whole number.
bool toNumber (UInt64 &) const
 Converts field value into whole number.
bool toNumber (Decimal &) const
 Converts field value into floating point value.
bool toTimestamp (Timestamp &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
 Converts field value into timestamp of requested format.
bool toStringRef (StringRef &) const
 If value represents text, returns reference to it.
bool toChar (char &) const
 If value represent one-char text, copies it into given variable.
bool toGroup (Group &) const
 If repeating group is associated with field, allows to get instance of it.
void toString (std::string &) const
 Appends copy of text presentation to the std::string.
std::string toString () const
 Return string presentation of field value.
FieldValueRefoperator= (const FieldValueRef &)
 Updates instance to refer to another field value.

Friends

class MessageOperator

Detailed Description

Implements concept of a read-only reference to a FIX field value.


Member Function Documentation

operator bool ( ) const

Indicated whether the instance refers to a valid value.

operator std::string ( ) const [inline]

Return string presentation of the value being referenced.

bool operator!= ( const StringRef ) const

Compares string presentation for equality with given text reference.

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.
bool operator== ( const StringRef ) const

Compares string presentation for equality with given text reference.

bool toChar ( char &  ) const

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

Returns:
false if conversion fails (for example, stored value is whole number assigned to a field using OnixS::FIX::FieldSet::setV member).
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
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.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toNumber ( UInt64 &  ) const

Converts field value into whole number.

Returns:
false if conversion fails.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toNumber ( Int64 &  ) const

Converts field value into whole number.

Returns:
false if conversion fails.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toNumber ( Decimal ) const

Converts field value into floating point value.

Returns:
false if conversion fails.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toNumber ( UInt32 &  ) const

Converts field value into whole number.

Returns:
false if conversion fails.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toNumber ( Int32 &  ) const

Converts field value into whole number.

Returns:
false if conversion fails.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toStringRef ( StringRef ) const

If value represents text, returns reference to it.

Returns:
false if conversion fails (for example, stored value is whole number assigned to a field using OnixS::FIX::FieldSet::setV member).
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.
bool toTimestamp ( Timestamp ,
TimestampFormat::Enum  = TimestampFormat::YYYYMMDDHHMMSSNsec 
) const

Converts field value into timestamp of requested format.

Returns:
false if conversion fails.
Warning:
Due to performance considerations doesn't check whether instance refers to a valid value. Use OnixS::FIX::FieldValueRef::operator bool() member to check instance for a validness.