B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Engine::FIXGroup Class Referenceabstract

FIX Repeating Group interface. More...

#include <B2BITS_FIXGroup.h>

Public Member Functions

 FIXGroup ()
 Default constructor. More...
 
virtual const std::string * get (int tag, int index) const =0
 Returns field value by tag number and entry's index. More...
 
virtual bool get (int tag, FIXFieldValue *value, int index) const =0
 Retrieves field value by tag number and entry's index and stores it into instance of FIXFieldValue class. More...
 
virtual bool getAsBoolean (int tag, int index) const =0
 Returns value as boolean. More...
 
virtual char getAsChar (int tag, int index) const =0
 Returns value as char. More...
 
virtual Engine::UTCDateOnly getAsDateOnly (int tag, int index) const =0
 Returns value as UTCDateOnly. More...
 
virtual Decimal getAsDecimal (int tag, int index) const =0
 Returns value as Decimal. More...
 
virtual double getAsDouble (int tag, int index) const =0
 Returns value as double. More...
 
virtual int getAsInt (int tag, int index) const =0
 Returns value as int. More...
 
virtual System::i32 getAsInt32 (int tag, int index) const =0
 Returns value as Int32. More...
 
virtual System::i64 getAsInt64 (int tag, int index) const =0
 Returns value as Int64. More...
 
virtual Engine::LocalMktDate getAsLocalMktDate (int tag, int index) const =0
 Returns value as LocalMktDate. More...
 
virtual Engine::MonthYear getAsMonthYear (int tag, int index) const =0
 Returns value as MonthYear. More...
 
virtual ByteArray getAsRaw (int tag, int index) const =0
 Returns value as byte array. More...
 
virtual AsciiString getAsString (int tag, int index) const =0
 Returns value as AsciiString. More...
 
virtual Engine::UTCTimeOnly getAsTimeOnly (int tag, int index) const =0
 Returns value as UTCTimeOnly. More...
 
virtual Engine::UTCTimestamp getAsTimestamp (int tag, int index) const =0
 Returns value as UTCTimestamp. More...
 
virtual unsigned int getAsUInt (int tag, int index) const =0
 Returns value as unsigned int. More...
 
virtual System::u32 getAsUInt32 (int tag, int index) const =0
 Returns value as UInt32. More...
 
virtual System::u64 getAsUInt64 (int tag, int index) const =0
 Returns value as UInt64. More...
 
virtual TagValuegetEntry (int index)=0 throw ()
 Returns group entry by index. More...
 
virtual TagValue const * getEntry (int index) const =0 throw ()
 Returns group entry by index. More...
 
virtual FixFieldsContainergetFields () const =0
 Returns list of the message fields and their values. More...
 
virtual FIXGroupgetGroup (int tag, int index)=0
 Returns nested repeating group. More...
 
virtual FIXGroup const * getGroup (int tag, int index) const =0
 Returns nested repeating group. More...
 
virtual bool hasFlag (int tag, int index) const =0
 Returns true if value exists and contains boolean true value otherwise false. More...
 
bool hasValue (int tag, int index) const
 Returns true if value value is defined; false otherwise. More...
 
virtual bool isEmpty (int tag, int index) const =0
 Returns true if value of the field is empty; false otherwise. More...
 
virtual bool isEqual (int tag, int index, TagValue const *rv, int rvTag) const =0
 Returns true if values are equal or both values not exist. More...
 
virtual bool isSupported (int tag) const =0 throw ()
 Verifies is field acceptable inside this group. More...
 
virtual int leadingField () const =0 throw ()
 Returns the leading field tag of the repeating group. More...
 
virtual bool remove (int tag, int index)=0
 Removes field, defined by input tag, from the given entry. More...
 
virtual bool set (int tag, const FIXFieldValue &value, int index)=0
 Assignes value to the field, defined by tag and entry index. More...
 
virtual bool set (int tag, const std::string &value, int index)=0
 Assignes value to the field, defined by tag and entry index. More...
 
virtual bool set (int tag, Engine::MonthYear value, int index)=0
 Assignes value to the field, defined by tag and entry index. More...
 
virtual bool set (int tag, Engine::LocalMktDate value, int index)=0
 
virtual bool set (int tag, Engine::UTCDateOnly value, int index)=0
 
virtual bool set (int tag, Engine::UTCTimeOnly value, int index)=0
 
virtual bool set (int tag, Engine::UTCTimestamp value, int index)=0
 
virtual bool set (int tag, System::i32 value, int index)=0
 
virtual bool set (int tag, System::u32 value, int index)=0
 
virtual bool set (int tag, System::i64 value, int index)=0
 
virtual bool set (int tag, System::u64 value, int index)=0
 
virtual bool set (int tag, double value, int index)=0
 
virtual bool set (int tag, Decimal value, int index)=0
 
virtual bool set (int tag, AsciiString value, int index)=0
 
virtual bool set (int tag, ByteArray value, int index)=0
 
virtual bool set (int tag, char value, int index)=0
 
virtual bool set (int tag, bool value, int index)=0
 
bool set (int tag, char const *value, int index)
 
virtual int size () const =0 throw ()
 Returns the number of entries in this repeating group. More...
 
virtual void write (int tag, std::ostream &out, int index) const =0
 Writes value to the stream. More...
 

Static Public Member Functions

static void release (FIXGroup *pGroup)
 Releases resources used by the given group instance. More...
 
static void release (FIXGroup const *pGroup)
 Releases resources used by the given group instance. More...
 

Protected Member Functions

virtual ~FIXGroup ()
 Destructor. More...
 

Detailed Description

FIX Repeating Group interface.

Constructor & Destructor Documentation

Engine::FIXGroup::FIXGroup ( )

Default constructor.

virtual Engine::FIXGroup::~FIXGroup ( )
protectedvirtual

Destructor.

Member Function Documentation

virtual const std::string* Engine::FIXGroup::get ( int  tag,
int  index 
) const
pure virtual

Returns field value by tag number and entry's index.

Parameters
indexgroup's entry index (starts at 0).
tagFIX field tag to get data from.
Returns
Returned value may be NULL, if the given tag defined for the group (according to the FIX protocol), but not present in requested group's entry. If the tag not defined for the group then the method throws an exception.
Warning
The returned buffer is shared for all calls. This means stored content is valid untill the next call of the get(). Can return NULL.
Exceptions
Utils::Exceptionif tag not defined for the group or entry index is invalid.
Deprecated:
Use get( int, FIXFieldValue *, int) const instead.
See Also
get( int, FIXFieldValue *, int) const
virtual bool Engine::FIXGroup::get ( int  tag,
FIXFieldValue value,
int  index 
) const
pure virtual

Retrieves field value by tag number and entry's index and stores it into instance of FIXFieldValue class.

Parameters
indexgroup's entry index (starts at 0).
tagFIX field tag to get data from.
[out]valuepointer to the FIXFieldValue object to store data. Cannot be NULL.
Returns
"false", if the given tag defined for the group (according to the FIX protocol), but not present in requested group's entry. "true", if the given tag present in requested group's entry.
Exceptions
Utils::Exceptionif tag not defined by FIX protocol for the group or entry index is invalid.
virtual bool Engine::FIXGroup::getAsBoolean ( int  tag,
int  index 
) const
pure virtual

Returns value as boolean.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual char Engine::FIXGroup::getAsChar ( int  tag,
int  index 
) const
pure virtual

Returns value as char.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual Engine::UTCDateOnly Engine::FIXGroup::getAsDateOnly ( int  tag,
int  index 
) const
pure virtual

Returns value as UTCDateOnly.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual Decimal Engine::FIXGroup::getAsDecimal ( int  tag,
int  index 
) const
pure virtual

Returns value as Decimal.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual double Engine::FIXGroup::getAsDouble ( int  tag,
int  index 
) const
pure virtual

Returns value as double.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual int Engine::FIXGroup::getAsInt ( int  tag,
int  index 
) const
pure virtual

Returns value as int.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual System::i32 Engine::FIXGroup::getAsInt32 ( int  tag,
int  index 
) const
pure virtual

Returns value as Int32.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual System::i64 Engine::FIXGroup::getAsInt64 ( int  tag,
int  index 
) const
pure virtual

Returns value as Int64.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual Engine::LocalMktDate Engine::FIXGroup::getAsLocalMktDate ( int  tag,
int  index 
) const
pure virtual

Returns value as LocalMktDate.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual Engine::MonthYear Engine::FIXGroup::getAsMonthYear ( int  tag,
int  index 
) const
pure virtual

Returns value as MonthYear.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual ByteArray Engine::FIXGroup::getAsRaw ( int  tag,
int  index 
) const
pure virtual

Returns value as byte array.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual AsciiString Engine::FIXGroup::getAsString ( int  tag,
int  index 
) const
pure virtual

Returns value as AsciiString.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual Engine::UTCTimeOnly Engine::FIXGroup::getAsTimeOnly ( int  tag,
int  index 
) const
pure virtual

Returns value as UTCTimeOnly.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual Engine::UTCTimestamp Engine::FIXGroup::getAsTimestamp ( int  tag,
int  index 
) const
pure virtual

Returns value as UTCTimestamp.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual unsigned int Engine::FIXGroup::getAsUInt ( int  tag,
int  index 
) const
pure virtual

Returns value as unsigned int.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual System::u32 Engine::FIXGroup::getAsUInt32 ( int  tag,
int  index 
) const
pure virtual

Returns value as UInt32.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual System::u64 Engine::FIXGroup::getAsUInt64 ( int  tag,
int  index 
) const
pure virtual

Returns value as UInt64.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
Returns
value of the field
Exceptions
Utils::Exceptionif tag value is not defined.
virtual TagValue* Engine::FIXGroup::getEntry ( int  index)
throw (
)
pure virtual

Returns group entry by index.

Returns
group entry by index
virtual TagValue const* Engine::FIXGroup::getEntry ( int  index) const
throw (
)
pure virtual

Returns group entry by index.

Returns
group entry by index
virtual FixFieldsContainer* Engine::FIXGroup::getFields ( ) const
pure virtual

Returns list of the message fields and their values.

Parameters
[out]listlist of the message fields and values
virtual FIXGroup* Engine::FIXGroup::getGroup ( int  tag,
int  index 
)
pure virtual

Returns nested repeating group.

Parameters
indexgroup's entry index (starts at 0).
tagTag number of the leading field value.
Returns
Returned value may be NULL, if the given tag exists for the group (according to the FIX protocol), but not present in requested group's entry. If the tag not defined for the group then the method throws an exception. When you don't need returned value call release() to cleanup resources.
Exceptions
Utils::Exceptionif tag not defined for the group or entry index is invalid.
virtual FIXGroup const* Engine::FIXGroup::getGroup ( int  tag,
int  index 
) const
pure virtual

Returns nested repeating group.

Parameters
indexgroup's entry index (starts at 0).
tagTag number of the leading field value.
Returns
Returned value may be NULL, if the given tag exists for the group (according to the FIX protocol), but not present in requested group's entry. If the tag not defined for the group then the method throws an exception. When you don't need returned value call release() to cleanup resources.
Exceptions
Utils::Exceptionif tag not defined for the group or entry index is invalid.
virtual bool Engine::FIXGroup::hasFlag ( int  tag,
int  index 
) const
pure virtual

Returns true if value exists and contains boolean true value otherwise false.

Parameters
tagFIX field tag to get data from.
indexgroup's entry index (starts at 0).
bool Engine::FIXGroup::hasValue ( int  tag,
int  index 
) const

Returns true if value value is defined; false otherwise.

virtual bool Engine::FIXGroup::isEmpty ( int  tag,
int  index 
) const
pure virtual

Returns true if value of the field is empty; false otherwise.

virtual bool Engine::FIXGroup::isEqual ( int  tag,
int  index,
TagValue const *  rv,
int  rvTag 
) const
pure virtual

Returns true if values are equal or both values not exist.

Parameters
tagFIX field tag to get first value from.
indexgroup's entry index of first value (starts at 0).
rvTagValue to get second value from.
rvTagFIX field tag of second value
virtual bool Engine::FIXGroup::isSupported ( int  tag) const
throw (
)
pure virtual

Verifies is field acceptable inside this group.

Parameters
tagTag number of the field to verify.
Returns
"true" if field supported by this group, otherwise returns false.
virtual int Engine::FIXGroup::leadingField ( ) const
throw (
)
pure virtual

Returns the leading field tag of the repeating group.

Returns
Leading field tag of the repeating group .
static void Engine::FIXGroup::release ( FIXGroup pGroup)
static

Releases resources used by the given group instance.

Parameters
pGroupPointer to FIXGroup
Warning
must be called before group's holder is released. Group's holder may be FIXMessage or other repeating group's entry. FIXMessage is released by calling FIXMessage::release(). Repeating group's entry become invalid when it's removed from the group by shrinking or entier outer group releasing.
See Also
FIXMessage::release
Deprecated:
Is not required anymore.
static void Engine::FIXGroup::release ( FIXGroup const *  pGroup)
static

Releases resources used by the given group instance.

Parameters
pGroupPointer to FIXGroup
Warning
must be called before group's holder is released. Group's holder may be FIXMessage or other repeating group's entry. FIXMessage is released by calling FIXMessage::release(). Repeating group's entry become invalid when it's removed from the group by shrinking or entier outer group releasing.
See Also
FIXMessage::release
Deprecated:
Is not required anymore.
virtual bool Engine::FIXGroup::remove ( int  tag,
int  index 
)
pure virtual

Removes field, defined by input tag, from the given entry.

Parameters
indexgroup's entry index (starts at 0).
tagTag of field to remove.
Returns
"true" if the field defined by tag was initialized previously (i.e. had non-empty value), otherwise "false".
Exceptions
Utils::Exceptionif tag not defined for the group or entry index is invalid.
virtual bool Engine::FIXGroup::set ( int  tag,
const FIXFieldValue value,
int  index 
)
pure virtual

Assignes value to the field, defined by tag and entry index.

Parameters
indexgroup's entry index (starts at 0).
tagFIX field tag to set data to.
valueNew value for field.
Exceptions
Utils::Exceptionif tag not defined by FIX protocol for the group or entry index is invalid.
virtual bool Engine::FIXGroup::set ( int  tag,
const std::string &  value,
int  index 
)
pure virtual

Assignes value to the field, defined by tag and entry index.

Parameters
indexgroup's entry index (starts at 0).
tagFIX field tag to set data to.
valueNew value for field.
Returns
"true" if the field defined by input tag was initialized previously, If field is just inserted, returned value is "false".
Exceptions
Utils::Exceptionif tag not defined for the group or entry index is invalid.
virtual bool Engine::FIXGroup::set ( int  tag,
Engine::MonthYear  value,
int  index 
)
pure virtual

Assignes value to the field, defined by tag and entry index.

Parameters
indexgroup's entry index (starts at 0).
tagTag number of field to set data.
valueNew value for field.
Returns
"true" if the field defined by input tag was initialized previously, If field is just inserted, returned value is "false".
Exceptions
Utils::Exceptionif tag not defined for the group or entry index is invalid.
virtual bool Engine::FIXGroup::set ( int  tag,
Engine::LocalMktDate  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
Engine::UTCDateOnly  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
Engine::UTCTimeOnly  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
Engine::UTCTimestamp  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
System::i32  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
System::u32  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
System::i64  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
System::u64  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
double  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
Decimal  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
AsciiString  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
ByteArray  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
char  value,
int  index 
)
pure virtual
virtual bool Engine::FIXGroup::set ( int  tag,
bool  value,
int  index 
)
pure virtual
bool Engine::FIXGroup::set ( int  tag,
char const *  value,
int  index 
)
inline
virtual int Engine::FIXGroup::size ( ) const
throw (
)
pure virtual

Returns the number of entries in this repeating group.

Returns
Number of entries in this repeating group.
virtual void Engine::FIXGroup::write ( int  tag,
std::ostream &  out,
int  index 
) const
pure virtual

Writes value to the stream.

Parameters
tagFIX field tag to get data from.
outstream to write value to.
indexgroup's entry index (starts at 0).
Exceptions
Utils::Exceptionif tag value is not defined.