OnixS C++ FIX Engine  4.1.0
API Documentation
FieldSet Class Reference

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

Collaboration diagram for FieldSet:

Classes

class  ConstIterator
 

Public Member Functions

 operator bool () const
 
bool contain (Tag tag) const
 
FieldValueRef get (Tag tag) const
 
Char getChar (Tag tag) const
 
Int32 getInt32 (Tag tag) const
 
UInt32 getUInt32 (Tag tag) const
 
Int64 getInt64 (Tag tag) const
 
UInt64 getUInt64 (Tag tag) const
 
Double getDouble (Tag tag) const
 
Decimal getDecimal (Tag tag) const
 
Decimal getDecimal (Tag tag, Int32 exponent) const
 
StringRef getStringRef (Tag tag) const
 
Timestamp getTimestamp (Tag tag, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
 
TimeSpan getTimeSpan (Tag tag) const
 
Group getGroup (Tag numberOfInstancesTag) const
 
bool hasFlag (Tag tag) const
 
bool set (Tag tag, Int32 value)
 
bool setV (Tag tag, Int32 value)
 
bool set (Tag tag, UInt32 value)
 
bool setV (Tag tag, UInt32 value)
 
bool set (Tag tag, Int64 value)
 
bool setV (Tag tag, Int64 value)
 
bool set (Tag tag, UInt64 value)
 
bool setV (Tag tag, UInt64 value)
 
bool set (Tag tag, Double value, size_t precision=17)
 
bool set (Tag tag, Double value, size_t precision, size_t length)
 
bool setV (Tag tag, Double value, size_t precision=17)
 
bool setV (Tag tag, Double value, size_t precision, size_t length)
 
bool set (Tag tag, const Decimal &value)
 
bool set (Tag tag, const Decimal &value, size_t length)
 
bool setV (Tag tag, const Decimal &value)
 
bool setV (Tag tag, const Decimal &value, size_t length)
 
bool set (Tag tag, char value)
 
bool set (Tag tag, const std::string &value)
 
bool set (Tag tag, const char *value)
 
bool set (Tag tag, const StringRef &value)
 
bool set (Tag tag, const Timestamp &value, TimestampFormat::Enum valueFormat=TimestampFormat::YYYYMMDDHHMMSSNsec)
 
bool setV (Tag tag, const Timestamp &value, TimestampFormat::Enum valueFormat=TimestampFormat::YYYYMMDDHHMMSSNsec)
 
bool set (Tag tag, const TimeSpan &value, TimeSpanFormat::Enum valueFormat=TimeSpanFormat::HHMMSSNsec)
 
bool setV (Tag tag, const TimeSpan &value, TimeSpanFormat::Enum valueFormat=TimeSpanFormat::HHMMSSNsec)
 
Group setGroup (Tag tag, size_t value)
 
bool setFlag (Tag tag, bool value)
 
bool set (Tag tag, const FieldValueRef &value)
 
bool erase (Tag tag)
 
size_t fields (Fields &fields) const
 
ConstIterator begin () const
 
ConstIterator end () const
 

Protected Types

typedef size_t AccessPolicies
 

Protected Member Functions

 FieldSet ()
 
 FieldSet (const Message *, void *, AccessPolicies)
 
 FieldSet (const FieldSet &)
 
 ~FieldSet ()
 
FieldSetoperator= (const FieldSet &)
 
void swap (FieldSet &)
 

Protected Attributes

void * impl_
 
const Messagecontainer_
 
AccessPolicies policies_
 

Friends

class Message
 
class GroupInstance
 
class MessageOperator
 

Detailed Description

Definition at line 61 of file FieldSet.h.

Member Typedef Documentation

typedef size_t AccessPolicies
protected

Definition at line 761 of file FieldSet.h.

Constructor & Destructor Documentation

FieldSet ( )
protected
FieldSet ( const Message ,
void *  ,
AccessPolicies   
)
protected
FieldSet ( const FieldSet )
protected
~FieldSet ( )
protected

Member Function Documentation

ConstIterator begin ( ) const

Returns the constant iterator to the first field in the FieldSet instance.

bool contain ( Tag  tag) const
inline

Returns 'true' if field-set contains the field with the given tag, otherwise - 'false'.

Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.

Definition at line 797 of file FieldSet.h.

ConstIterator end ( ) const

Returns the constant iterator to the field after the last one in the FieldSet instance.

bool erase ( Tag  tag)

Erases association of field with its value.

Returns
'true' if field had valid value before.
size_t fields ( Fields fields) const

Retrieve tags and values of all non-empty fields belonged to the given FieldSet instance.

Parameters
fieldsObject to receive the FieldSet content.
Returns
Number of fields placed to the fields vector.
FieldValueRef get ( Tag  tag) const

Returns reference to a given field value.

Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
Char getChar ( Tag  tag) const

Returns field value as an OnixS::FIX::Char value.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
Decimal getDecimal ( Tag  tag) const

Returns the field value as a decimal number.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
Decimal getDecimal ( Tag  tag,
Int32  exponent 
) const

Returns the field value as a decimal number with fixed exponent.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
Double getDouble ( Tag  tag) const

Returns the field value as a floating-point number.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
Group getGroup ( Tag  numberOfInstancesTag) const

Returns reference to a repeating group if underlying field defines length of repeating group.

Parameters
numberOfInstancesTagTag number of the field that defines the number of instances in this repeating group (the NoXXX field).
Exceptions
std::exceptionif no repeating group is associated with given field (tag).
Warning
Returned instance remains valid until field is modified via any of OnixS::FIX::FieldSet::set members.
Int32 getInt32 ( Tag  tag) const

Returns field value as an OnixS::FIX::Int32 value.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
Int64 getInt64 ( Tag  tag) const

Returns field value as an OnixS::FIX::Int64 value.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
StringRef getStringRef ( Tag  tag) const

Returns reference to a read-only text chain.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
TimeSpan getTimeSpan ( Tag  tag) const

Returns the field value as a time span.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.

Returns the field value as timestamp of requested format.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
UInt32 getUInt32 ( Tag  tag) const

Returns field value as an OnixS::FIX::UInt32 value.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
UInt64 getUInt64 ( Tag  tag) const

Returns field value as an OnixS::FIX::UInt64 value.

Exceptions
std::exceptionif conversion is impossible.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
bool hasFlag ( Tag  tag) const

Returns true if the given flag is present and it equals to "Y", otherwise false.

Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use OnixS::FIX::FieldSet::operator bool() to check whether instance is in valid state.
operator bool ( ) const

Indicates whether instance refers to a valid set of fields.

If given instance doesn't refer to a valid fields set, none of other members must be used.

FieldSet& operator= ( const FieldSet )
protected
bool set ( Tag  tag,
Int32  value 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
UInt32  value 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
Int64  value 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
UInt64  value 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
Double  value,
size_t  precision = 17 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
Double  value,
size_t  precision,
size_t  length 
)

Assigns given value to the field, if the string presentation of the value is greater than the length it will be truncated, only digit characters are counted.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const Decimal value 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const Decimal value,
size_t  length 
)

Assigns given value to the field.

if the string presentation of the value is greater than the length it will be truncated, only digit characters are counted.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
char  value 
)

Assigns given value to the field.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const std::string &  value 
)

Assigns given value to the field.

Stored value represents a copy of input.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const char *  value 
)

Assigns given value to the field.

Stored value represents a copy of input.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const StringRef value 
)

Assigns given value to the field.

Stored value represents a copy of input.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const Timestamp value,
TimestampFormat::Enum  valueFormat = TimestampFormat::YYYYMMDDHHMMSSNsec 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const TimeSpan value,
TimeSpanFormat::Enum  valueFormat = TimeSpanFormat::HHMMSSNsec 
)

Assigns given value to the field.

Transforms input value into text-presentation, so actually stored value is text-presentation of input. Further, stored text-presentation may be directly accessed using OnixS::FIX::FieldSet::getStringRef() member to avoid additional memory allocations and copying.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool set ( Tag  tag,
const FieldValueRef value 
)

Assigns value to a field as a copy of another field value.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setFlag ( Tag  tag,
bool  value 
)

Assigns flag value ("Y" or "N") to the field.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
Group setGroup ( Tag  tag,
size_t  value 
)

Creates a new repeating group or changes the number of instances in the existing repeating group.

Parameters
tagTag number of the field that defines the number of instances in this repeating group (the NoXXX field).
valueNumber of instances in the repeating group.
Exceptions
std::exceptionif given field doesn't define number of repeating group instances.
bool setV ( Tag  tag,
Int32  value 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
UInt32  value 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
Int64  value 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
UInt64  value 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
Double  value,
size_t  precision = 17 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
Double  value,
size_t  precision,
size_t  length 
)

Assigns given value to the field.

if the string presentation of the value is greater than the length it will be truncated, only digit characters are counted.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
const Decimal value 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
const Decimal value,
size_t  length 
)

Assigns given value to the field.

if the string presentation of the value is greater than the length it will be truncated, only digit characters are counted.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
const Timestamp value,
TimestampFormat::Enum  valueFormat = TimestampFormat::YYYYMMDDHHMMSSNsec 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
bool setV ( Tag  tag,
const TimeSpan value,
TimeSpanFormat::Enum  valueFormat = TimeSpanFormat::HHMMSSNsec 
)

Assigns given value to the field.

Saves value being set as it is without transforming it into text-presentation. Assigning field value via OnixS::FIX::FieldSet::setV members saves not only value but it's type as well, therefore no parsing is performed during subsequent access to the field via get<Type> member.

Returns
"true" if the value had value before, otherwise "false" (the field was inserted into the set).
Warning
if field of given tag is not defined by the FIX Specification for given field set (either message or repeating group instance), function may throw an exception (behavior is controlled by validation-related parameters from the Engine's configuration).
void swap ( FieldSet )
protected

Friends And Related Function Documentation

friend class GroupInstance
friend

Definition at line 791 of file FieldSet.h.

friend class Message
friend

Definition at line 790 of file FieldSet.h.

friend class MessageOperator
friend

Definition at line 792 of file FieldSet.h.

Member Data Documentation

const Message* container_
protected

Definition at line 767 of file FieldSet.h.

void* impl_
protected

Definition at line 764 of file FieldSet.h.

AccessPolicies policies_
protected

Definition at line 770 of file FieldSet.h.


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