OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
FieldValueRef Class Reference

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

◆ FieldValueRef() [1/2]

The uninitialized value.

◆ FieldValueRef() [2/2]

FieldValueRef ( const FieldValueRef & other)

The shallow copy from another one.

Member Function Documentation

◆ operator std::string()

operator std::string ( ) const
inline

Return the string presentation of the value being referenced.

Definition at line 237 of file FieldValueRef.h.

◆ operator!=() [1/2]

bool operator!= ( const FieldValueRef & ) const

Compares with another instance for inequality.

◆ operator!=() [2/2]

bool operator!= ( const StringRef & ) const

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

◆ operator=()

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.

◆ operator==() [1/2]

bool operator== ( const FieldValueRef & ) const

Compares with another instance for equality.

◆ operator==() [2/2]

bool operator== ( const StringRef & ) const

Compares the string presentation for equality with given text reference.

◆ swap()

void swap ( FieldValueRef & other)

Swaps two references.

◆ toChar()

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.

◆ toGroup()

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.

◆ toNumber() [1/6]

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.

◆ toNumber() [2/6]

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.

◆ toNumber() [3/6]

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.

◆ toNumber() [4/6]

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.

◆ toNumber() [5/6]

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.

◆ toNumber() [6/6]

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.

◆ toString() [1/2]

std::string toString ( ) const
inline

Return the string presentation of the field value.

Definition at line 249 of file FieldValueRef.h.

◆ toString() [2/2]

void toString ( std::string & ) const

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

◆ toStringRef() [1/2]

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.

◆ toStringRef() [2/2]

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.

◆ toTimeSpan()

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.

◆ toTimestamp()

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.

◆ valid()

bool valid ( ) const

Indicated whether the instance refers to a valid value.

◆ MessageOperator

friend class MessageOperator
friend

Definition at line 215 of file FieldValueRef.h.