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

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

Public Member Functions

 FieldValueRef ()
 
 FieldValueRef (const FieldValueRef &other)
 
 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 (Double &) const
 
bool toNumber (Decimal &) const
 
bool toTimestamp (Timestamp &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) 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

Uninitialized value.

FieldValueRef ( const FieldValueRef other)

Shallow copy from another one.

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.

Definition at line 225 of file FieldValueRef.h.

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.

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 FieldValueRef ) const

Compares with another instance for equality.

bool operator== ( const StringRef ) const

Compares string presentation for equality with given text reference.

void swap ( FieldValueRef other)

Swaps two references.

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 ( 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 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 ( 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 ( 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 ( Double ) 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 ( 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.
void toString ( std::string &  ) const

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

std::string toString ( ) const
inline

Return string presentation of field value.

Definition at line 236 of file FieldValueRef.h.

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), otherwise - true.
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.
StringRef toStringRef ( ) const
inline

If value represents text, returns reference to it.

Returns
An empty StringRef if conversion fails (for example, stored value is whole number assigned to a field using OnixS::FIX::FieldSet::setV member), otherwise - valid StringRef.
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.

Definition at line 213 of file FieldValueRef.h.

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.

Friends And Related Function Documentation

friend class MessageOperator
friend

Definition at line 202 of file FieldValueRef.h.


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