OnixS CME Drop Copy Handler C++ library 5.7.1
API documentation
Loading...
Searching...
No Matches
FieldSet Class Reference

Public Member Functions

 operator bool () 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
Decimal getDecimal (Tag tag) const
StringRef getStringRef (Tag tag) const
Timestamp getTimestamp (Tag tag, SinceEpochUnit unit) const
Group getGroup (Tag tag) const
Group getOptionalGroup (Tag tag, bool strict=true) const
bool hasFlag (Tag tag) const
bool contain (Tag tag) const

Protected Member Functions

 FieldSet (const Message *, const void *)
 FieldSet (const FieldSet &)
 ~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.

Definition at line 232 of file Messaging.h.

Constructor & Destructor Documentation

◆ FieldSet() [1/2]

FieldSet ( const Message * ,
const void *  )
protected

◆ FieldSet() [2/2]

FieldSet ( const FieldSet & )
protected

◆ ~FieldSet()

~FieldSet ( )
protected

Member Function Documentation

◆ contain()

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.

◆ get()

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.

◆ getChar()

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.

◆ getDecimal()

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.

◆ getGroup()

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.

◆ getInt32()

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.

◆ getInt64()

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.

◆ getOptionalGroup()

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.

◆ getStringRef()

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.

◆ getTimestamp()

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.

◆ getUInt32()

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.

◆ getUInt64()

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.

◆ hasFlag()

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()

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.

◆ operator=()

FieldSet & operator= ( const FieldSet & )
protected

◆ GroupInstance

friend class GroupInstance
friend

Definition at line 400 of file Messaging.h.

◆ Message

friend class Message
friend

Definition at line 399 of file Messaging.h.

◆ MessageOperator

friend class MessageOperator
friend

Definition at line 401 of file Messaging.h.

Member Data Documentation

◆ container_

const Message* container_
protected

Definition at line 385 of file Messaging.h.

◆ impl_

const void* impl_
protected

Definition at line 382 of file Messaging.h.