OnixS CME Drop Copy Handler C++ library  5.7.1
API documentation
FieldSet Class Reference

#include <OnixS/CME/DropCopy/Messaging.h>

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

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.

FieldSet& operator= ( const FieldSet )
protected

Friends And Related Function Documentation

friend class GroupInstance
friend

Definition at line 400 of file Messaging.h.

friend class Message
friend

Definition at line 399 of file Messaging.h.

friend class MessageOperator
friend

Definition at line 401 of file Messaging.h.

Member Data Documentation

const Message* container_
protected

Definition at line 385 of file Messaging.h.

const void* impl_
protected

Definition at line 382 of file Messaging.h.


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