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

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

Classes

class  ConstIterator
 

Public Member Functions

bool valid () 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) const
 
Timestamp getTimestamp (Tag tag, TimestampFormat::Enum) const
 
TimeSpan getTimeSpan (Tag tag) const
 
Group getGroup (Tag numberOfInstancesTag) const
 
bool hasFlag (Tag tag) const
 
FieldSetset (Tag tag, Int32 value)
 
FieldSetsetV (Tag tag, Int32 value)
 
FieldSetset (Tag tag, UInt32 value)
 
FieldSetsetV (Tag tag, UInt32 value)
 
FieldSetset (Tag tag, Int64 value)
 
FieldSetsetV (Tag tag, Int64 value)
 
FieldSetset (Tag tag, UInt64 value)
 
FieldSetsetV (Tag tag, UInt64 value)
 
FieldSetset (Tag tag, Double value, size_t precision=17)
 
FieldSetset (Tag tag, Double value, size_t precision, size_t length)
 
FieldSetsetV (Tag tag, Double value, size_t precision=17)
 
FieldSetsetV (Tag tag, Double value, size_t precision, size_t length)
 
FieldSetset (Tag tag, const Decimal &value)
 
FieldSetset (Tag tag, const Decimal &value, size_t length)
 
FieldSetsetV (Tag tag, const Decimal &value)
 
FieldSetsetV (Tag tag, const Decimal &value, size_t length)
 
FieldSetset (Tag tag, char value)
 
FieldSetset (Tag tag, const std::string &value)
 
FieldSetset (Tag tag, const char *value)
 
FieldSetset (Tag tag, const StringRef &value)
 
FieldSetset (Tag tag, const Timestamp &value, TimestampFormat::Enum valueFormat=TimestampFormat::YYYYMMDDHHMMSSNsec)
 
FieldSetsetV (Tag tag, const Timestamp &value, TimestampFormat::Enum valueFormat=TimestampFormat::YYYYMMDDHHMMSSNsec)
 
FieldSetset (Tag tag, const TimeSpan &value, TimeSpanFormat::Enum valueFormat=TimeSpanFormat::HHMMSSNsec)
 
FieldSetsetV (Tag tag, const TimeSpan &value, TimeSpanFormat::Enum valueFormat=TimeSpanFormat::HHMMSSNsec)
 
Group setGroup (Tag tag, size_t value)
 
FieldSetsetFlag (Tag tag, bool value)
 
FieldSetset (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 () ONIXS_FIXENGINE_DEFAULT
 
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 62 of file FieldSet.h.

Member Typedef Documentation

typedef size_t AccessPolicies
protected

Definition at line 754 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::valid() to check whether instance is in valid state.

Definition at line 790 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::valid() 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::valid() 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::valid() 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::valid() 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::valid() 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::valid() 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::valid() 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::valid() 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::valid() to check whether instance is in valid state.
Timestamp getTimestamp ( Tag  tag) const

Returns the field value as a timestamp.

Exceptions
std::exceptionif conversion is impossible.

The method tries to determine the timestamp format in runtime. Therefore, it makes sense to use this method when the timestamp format is unknown. Otherwise, for better performance, the overloaded method with the explicit timestamp format parameter should be used.

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

Returns the field value as a timestamp of the 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::valid() 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::valid() 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::valid() 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::valid() to check whether instance is in valid state.
FieldSet& operator= ( const FieldSet )
protected
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& set ( Tag  tag,
char  value 
)

Assigns given value to the field.

Returns
the reference to itself for the method chaining approach.
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).
FieldSet& set ( Tag  tag,
const std::string &  value 
)

Assigns given value to the field.

Stored value represents a copy of input.

Returns
the reference to itself for the method chaining approach.
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).
FieldSet& set ( Tag  tag,
const char *  value 
)

Assigns given value to the field.

Stored value represents a copy of input.

Returns
the reference to itself for the method chaining approach.
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).
FieldSet& set ( Tag  tag,
const StringRef value 
)

Assigns given value to the field.

Stored value represents a copy of input.

Returns
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& set ( Tag  tag,
const FieldValueRef value 
)

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

Returns
the reference to itself for the method chaining approach.
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).
FieldSet& setFlag ( Tag  tag,
bool  value 
)

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

Returns
the reference to itself for the method chaining approach.
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.
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach..
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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).
FieldSet& 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
the reference to itself for the method chaining approach.
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
bool valid ( ) 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.

Friends And Related Function Documentation

friend class GroupInstance
friend

Definition at line 784 of file FieldSet.h.

friend class Message
friend

Definition at line 783 of file FieldSet.h.

friend class MessageOperator
friend

Definition at line 785 of file FieldSet.h.

Member Data Documentation

const Message* container_
protected

Definition at line 760 of file FieldSet.h.

void* impl_
protected

Definition at line 757 of file FieldSet.h.

AccessPolicies policies_
protected

Definition at line 763 of file FieldSet.h.


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