OnixS CME Drop Copy Handler for C++  5.3.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
FieldSet Class Reference

Encapsulates primary operations over collection of FIX fields like FIX message and repeating group instance are. More...

Public Member Functions

 operator bool () const
 Indicates whether instance refers to a valid set of fields. More...
 
FieldValueRef get (Tag tag) const
 Provides access to field value using field tag. More...
 
char getChar (Tag tag) const
 Returns field value as a char value. More...
 
Int32 getInt32 (Tag tag) const
 Returns field value as an Int32 value. More...
 
UInt32 getUInt32 (Tag tag) const
 Returns field value as an UInt32 value. More...
 
Int64 getInt64 (Tag tag) const
 Returns field value as an Int64 value. More...
 
UInt64 getUInt64 (Tag tag) const
 Returns field value as an UInt64 value. More...
 
Decimal getDecimal (Tag tag) const
 Returns the field value as a decimal number. More...
 
StringRef getStringRef (Tag tag) const
 Returns reference to a read-only text chain. More...
 
Timestamp getTimestamp (Tag tag, SinceEpochUnit unit) const
 Returns the field value as timestamp of requested format. More...
 
Group getGroup (Tag tag) const
 Returns reference to a repeating group if underlying field defines length of repeating group. More...
 
Group getOptionalGroup (Tag tag, bool strict=true) const
 Returns reference to a repeating group if underlying field defines length of repeating group. More...
 
bool hasFlag (Tag tag) const
 Returns true if the given flag is present and it equals to "Y", otherwise false. More...
 
bool contain (Tag tag) const
 Checks the presence of a field This method should be used if the actual field value is NOT of interest - otherwise field lookup operation will be done twice. More...
 

Protected Member Functions

 FieldSet (const Message *, const void *)
 
 FieldSet (const FieldSet &)
 
FieldSetoperator= (const FieldSet &)
 

Protected Attributes

const void * impl_
 
const Messagecontainer_
 

Friends

class Message
 
class GroupInstance
 
class MessageOperator
 

Detailed Description

Encapsulates primary operations over collection of FIX fields like FIX message and repeating group instance are.

Member Function Documentation

bool contain ( Tag  tag) const

Checks the presence of a field This method should be used if the actual field value is NOT of interest - otherwise field lookup operation will be done twice.

FieldValueRef get ( Tag  tag) const

Provides access to field value using field tag.

Returns
Reference to a value associated with field identified by tag. If there's no value associated with a field, returned reference refers to nothing.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
char getChar ( Tag  tag) const

Returns field value as a char value.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
Decimal getDecimal ( Tag  tag) const

Returns the field value as a decimal number.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
Group getGroup ( Tag  tag) const

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

Parameters
tagrepresent tag number of the field that defines number of instances in this repeating group (the NoXXX field).
Exceptions
std::exceptionif no repeating group is associated with given field including field absence.
Int32 getInt32 ( Tag  tag) const

Returns field value as an Int32 value.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
Int64 getInt64 ( Tag  tag) const

Returns field value as an Int64 value.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
Group getOptionalGroup ( Tag  tag,
bool  strict = true 
) const

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

If field is absent returns instance referencing to nothing. If field is undefined for this message throws exception (if strict parameter is true) or returns instance referencing to nothing (if strict parameter is false).

Parameters
tagrepresent tag number of the field that defines number of instances in this repeating group (the NoXXX field).
strictset to true (default) if field undefined for this message shall throw exception or to false if shall return empty group instance.
Exceptions
std::exceptionif given field is undefined (and strict parameter is true) or doesn't suppose to represent repeating group.
StringRef getStringRef ( Tag  tag) const

Returns reference to a read-only text chain.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
Timestamp getTimestamp ( Tag  tag,
SinceEpochUnit  unit 
) const

Returns the field value as timestamp of requested format.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
UInt32 getUInt32 ( Tag  tag) const

Returns field value as an UInt32 value.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
UInt64 getUInt64 ( Tag  tag) const

Returns field value as an UInt64 value.

Exceptions
std::exceptionif field is absent or associated value can't be converted to target type.
Warning
Due to performance considerations, doesn't check whether instance refers to a valid set of fields. Use casting to bool operator to check whether instance refers to a valid set of fields.
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 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.