OnixS C++ FIX Engine  4.12.0
API Documentation
FieldValueRef Class Reference

#include <OnixS/FIXEngine/FIX/FieldValueRef.h>

Public Member Functions

 FieldValueRef ()
 
 FieldValueRef (const FieldValueRef &other)
 
bool valid () 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 (Double &) const
 
bool toNumber (Decimal &) const
 
bool toTimestamp (Timestamp &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
 
bool toTimeSpan (TimeSpan &, TimeSpanFormat::Enum=TimeSpanFormat::HHMMSSMsec) const
 
bool toStringRef (StringRef &) const
 
StringRef toStringRef () const
 
bool toChar (char &) const
 
bool toGroup (Group &) const
 
void toString (std::string &) const
 
std::string toString () const
 
FieldValueRefoperator= (const FieldValueRef &)
 
void swap (FieldValueRef &other)
 

Friends

class MessageOperator
 

Detailed Description

Definition at line 32 of file FieldValueRef.h.

Constructor & Destructor Documentation

The uninitialized value.

FieldValueRef ( const FieldValueRef other)

The shallow copy from another one.

Member Function Documentation

operator std::string ( ) const
inline

Return the string presentation of the value being referenced.

Definition at line 238 of file FieldValueRef.h.

bool operator!= ( const FieldValueRef ) const

Compares with another instance for inequality.

bool operator!= ( const StringRef ) const

Compares the string presentation for equality with the given text reference.

FieldValueRef& operator= ( const FieldValueRef )

Updates an instance to refer to another field value.

Warning
Does NOT perform a deep copy of field values. Just updates a reference to point to the value of other field.
bool operator== ( const FieldValueRef ) const

Compares with another instance for equality.

bool operator== ( const StringRef ) const

Compares the string presentation for equality with given text reference.

void swap ( FieldValueRef other)

Swaps two references.

bool toChar ( char &  ) const

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

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

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

Returns
false if no group is associated with the field.
Warning
Due to performance considerations doesn't check whether an instance refers to a valid value. Use the OnixS::FIX::FieldValueRef::operator bool() member to check an instance for a validness.
bool toNumber ( Int32 ) const

Converts the field value into the whole number.

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

Converts the field value into the whole number.

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

Converts the field value into the whole number.

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

Converts the field value into the whole number.

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

Converts the field value into the floating point value.

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

Converts the field value into the floating point value.

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

Appends a copy of a text presentation to the std::string.

std::string toString ( ) const
inline

Return the string presentation of the field value.

Definition at line 249 of file FieldValueRef.h.

bool toStringRef ( StringRef ) const

If the value represents a text, returns a reference to it.

Returns
false if the conversion fails (for example, the stored value is the whole number assigned to a field using the OnixS::FIX::FieldSet::setV member), otherwise - true.
Warning
Due to performance considerations doesn't check whether an instance refers to a valid value. Use the OnixS::FIX::FieldValueRef::operator bool() member to check an instance for a validness.
StringRef toStringRef ( ) const
inline

If the value represents a text, returns a reference to it.

Returns
An empty StringRef if the conversion fails (for example, the stored value is the whole number assigned to a field using the OnixS::FIX::FieldSet::setV member), otherwise - valid StringRef.
Warning
Due to performance considerations doesn't check whether an instance refers to a valid value. Use the OnixS::FIX::FieldValueRef::operator bool() member to check an instance for a validness.

Definition at line 226 of file FieldValueRef.h.

bool toTimeSpan ( TimeSpan ,
TimeSpanFormat::Enum  = TimeSpanFormat::HHMMSSMsec 
) const

Converts the field value into the timespan.

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

Converts the field value into the timestamp of the requested format.

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

Indicated whether the instance refers to a valid value.

Friends And Related Function Documentation

friend class MessageOperator
friend

Definition at line 215 of file FieldValueRef.h.


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