Public Types | Public Member Functions | Friends

Engine::TagValue Class Reference

Represents tag-value structure. More...

#include <B2BITS_TagValue.h>

Inheritance diagram for Engine::TagValue:

List of all members.

Public Types

typedef FieldValueT< TagValue
const > const 
ConstFieldValue
typedef FieldValueT< TagValueFieldValue

Public Member Functions

virtual void copyTo (TagValue *dest, int destTag, int srcTag) const =0
 Copies field value to another instance of the TagValue.
virtual const std::string * get (int tag) const =0
 Retrives field value by tag number.
virtual bool get (int tag, FIXFieldValue *value) const =0
 Retrives field value by tag number and stores it into instance of FIXFieldValue class.
virtual bool getAsBoolean (int tag) const =0
 Returns field value.
virtual char getAsChar (int tag) const =0
 Returns field value.
virtual UTCDateOnly getAsDateOnly (int tag) const =0
 Returns field value.
virtual Decimal getAsDecimal (int tag) const =0
 Returns field value.
virtual double getAsDouble (int tag) const =0
 Returns field value.
FIXGroupgetAsGroup (int tag)
FIXGroup const & getAsGroup (int tag) const
virtual int getAsInt (int tag) const =0
 Returns field value.
virtual System::i32 getAsInt32 (int tag) const =0
 Returns field value.
virtual System::i64 getAsInt64 (int tag) const =0
 Returns field value.
virtual LocalMktDate getAsLocalMktDate (int tag) const =0
 Returns field value.
virtual MonthYear getAsMonthYear (int tag) const =0
 Returns field value.
virtual ByteArray getAsRaw (int tag) const =0
 Returns field value.
virtual AsciiString getAsString (int tag) const =0
 Returns field value.
virtual UTCTimeOnly getAsTimeOnly (int tag) const =0
 Returns field value.
virtual UTCTimestamp getAsTimestamp (int tag) const =0
 Returns field value.
virtual unsigned int getAsUInt (int tag) const =0
 Returns field value.
virtual System::u32 getAsUInt32 (int tag) const =0
 Returns field value.
virtual System::u64 getAsUInt64 (int tag) const =0
 Returns field value.
ConstFieldValue getField (int tag) const
 Returns value of the field specified by tag.
FieldValue getField (int tag)
 Returns value of the field specified by tag.
virtual FixFieldsContainergetFields () const =0
 Returns list of the message fields and their values.
virtual FIXGroupgetGroup (int tag)=0
 Returns the repeating group instance by leading field tag number.
virtual FIXGroup const * getGroup (int tag) const =0
 Returns the repeating group instance by leading field tag number.
virtual bool hasFlag (int tag) const =0
 Checks boolean field.
bool hasValue (int tag) const
 Returns true if value value is defined; false otherwise.
virtual bool isEmpty (int tag) const =0
 Returns true if value of the field is empty; false otherwise.
virtual bool isEqual (int tag, TagValue const *rv, int rvTag) const =0
 Compares values of the fields.
virtual bool isSupported (int tag) const =0
 Verifies is field acceptable in the message.
virtual bool remove (int tag)=0
 Empties field value by tag number.
virtual void remove (const std::set< int > &tags)=0
 Removes passed tags from message.
virtual void reserve (int tag, PreparedFieldIndex index, size_t size)=0
 Reserves memory to store prepared field value.
virtual bool set (int tag, UTCDateOnly value)=0
 Updates field value by tag number.
bool set (int tag, char const *value)
 Updates field value by tag number.
virtual bool set (int tag, MonthYear value)=0
 Updates field value by tag number.
virtual bool set (int tag, const FIXFieldValue &value)=0
 Updates field value by tag number.
virtual bool set (int tag, UTCTimestamp value)=0
 Updates field value by tag number.
virtual bool set (int tag, ByteArray value)=0
 Updates field value by tag number.
virtual bool set (int tag, Decimal value)=0
 Updates field value by tag number.
virtual bool set (int tag, double value)=0
 Updates field value by tag number.
virtual bool set (int tag, System::i64 value)=0
 Updates field value by tag number.
virtual bool set (int tag, bool value)=0
 Updates field value by tag number.
virtual bool set (int tag, UTCTimeOnly value)=0
 Updates field value by tag number.
virtual bool set (int tag, System::i32 value)=0
 Updates field value by tag number.
virtual bool set (int tag, AsciiString value)=0
 Updates field value by tag number.
virtual bool set (int tag, char value)=0
 Updates field value by tag number.
virtual bool set (int tag, const std::string &value)=0
 Updates field value by tag number.
virtual bool set (int tag, System::u32 value)=0
 Updates field value by tag number.
virtual bool set (int tag, LocalMktDate value)=0
 Updates field value by tag number.
virtual bool set (int tag, System::u64 value)=0
 Updates field value by tag number.
 TagValue ()
 Constructor.
virtual void write (int tag, std::ostream &stream) const =0
 Writes field value to the stream.
virtual ~TagValue ()
 Destructor.

Friends

class FieldValueT

Detailed Description

Represents tag-value structure.

Base class for FIX message end repeating group entry

Definition at line 326 of file B2BITS_TagValue.h.


Member Typedef Documentation

Definition at line 331 of file B2BITS_TagValue.h.

Definition at line 332 of file B2BITS_TagValue.h.


Constructor & Destructor Documentation

Engine::TagValue::TagValue (  )

Constructor.

virtual Engine::TagValue::~TagValue (  ) [virtual]

Destructor.


Member Function Documentation

virtual void Engine::TagValue::copyTo ( TagValue dest,
int  destTag,
int  srcTag 
) const [pure virtual]

Copies field value to another instance of the TagValue.

Exceptions:
Utils::Exceptionif source field value is not defined.
virtual bool Engine::TagValue::get ( int  tag,
FIXFieldValue value 
) const [pure virtual]

Retrives field value by tag number and stores it into instance of FIXFieldValue class.

Parameters:
[out]valuepointer to the FIXFieldValue object to store data. Can't be NULL.
tagTag number of field requested field value.
Returns:
"true" if requested field exists in message, "false" if requested field does not exist.
Exceptions:
Utils::Exceptionif requested field is not defined by FIX protocol for this message type.
virtual const std::string* Engine::TagValue::get ( int  tag ) const [pure virtual]

Retrives field value by tag number.

Parameters:
tagFIX field tag to get data from.
Returns:
pointer to the buffer contained requested field value. If field value is empty returns NULL pointer. Can return NULL.
Warning:
The returned buffer is shared for all calls. This means stored content is valid untill the next call of the get().
Exceptions:
Utils::Exceptionif requested field is not defined by FIX protocol for this message type.
Deprecated:
Use get( int, FIXFieldValue *) const instead.
See also:
get( int, FIXFieldValue *) const
virtual bool Engine::TagValue::getAsBoolean ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual char Engine::TagValue::getAsChar ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual UTCDateOnly Engine::TagValue::getAsDateOnly ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual Decimal Engine::TagValue::getAsDecimal ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual double Engine::TagValue::getAsDouble ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
FIXGroup& Engine::TagValue::getAsGroup ( int  tag )
FIXGroup const& Engine::TagValue::getAsGroup ( int  tag ) const
virtual int Engine::TagValue::getAsInt ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual System::i32 Engine::TagValue::getAsInt32 ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual System::i64 Engine::TagValue::getAsInt64 ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual LocalMktDate Engine::TagValue::getAsLocalMktDate ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual MonthYear Engine::TagValue::getAsMonthYear ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual ByteArray Engine::TagValue::getAsRaw ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual AsciiString Engine::TagValue::getAsString ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual UTCTimeOnly Engine::TagValue::getAsTimeOnly ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual UTCTimestamp Engine::TagValue::getAsTimestamp ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual unsigned int Engine::TagValue::getAsUInt ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual System::u32 Engine::TagValue::getAsUInt32 ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
virtual System::u64 Engine::TagValue::getAsUInt64 ( int  tag ) const [pure virtual]

Returns field value.

Parameters:
[in]tagTag of the field.
ConstFieldValue Engine::TagValue::getField ( int  tag ) const [inline]

Returns value of the field specified by tag.

Returns:
value of the field

Definition at line 343 of file B2BITS_TagValue.h.

FieldValue Engine::TagValue::getField ( int  tag ) [inline]

Returns value of the field specified by tag.

Returns:
value of the field

Definition at line 350 of file B2BITS_TagValue.h.

virtual FixFieldsContainer* Engine::TagValue::getFields (  ) const [pure virtual]

Returns list of the message fields and their values.

Parameters:
[out]listList of the message fields and values.
virtual FIXGroup const* Engine::TagValue::getGroup ( int  tag ) const [pure virtual]

Returns the repeating group instance by leading field tag number.

Parameters:
tagTag number of the leading field value.
Returns:
Returns the repeating group instance by leading field tag number. If leading field value is empty or its numerical represntaion is zero, then returned value is NULL. When you don't need returned value call FIXGroup::release() to cleanup resources.
Exceptions:
Utils::Exceptionif requested group not defined this message type.
virtual FIXGroup* Engine::TagValue::getGroup ( int  tag ) [pure virtual]

Returns the repeating group instance by leading field tag number.

Parameters:
tagTag number of the leading field value.
Returns:
Returns the repeating group instance by leading field tag number. If leading field value is empty or its numerical represntaion is zero, then returned value is NULL. When you don't need returned value call FIXGroup::release() to cleanup resources.
Exceptions:
Utils::Exceptionif requested group not defined this message type.
virtual bool Engine::TagValue::hasFlag ( int  tag ) const [pure virtual]

Checks boolean field.

Parameters:
tagTag number of the field to verify.
Returns:
"true" if the given flag is present and it equals to "Y", otherwise "false".
bool Engine::TagValue::hasValue ( int  tag ) const

Returns true if value value is defined; false otherwise.

virtual bool Engine::TagValue::isEmpty ( int  tag ) const [pure virtual]

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

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

Compares values of the fields.

virtual bool Engine::TagValue::isSupported ( int  tag ) const [pure virtual]

Verifies is field acceptable in the message.

Parameters:
tagTag number of the field to verify.
Returns:
"true" if field supported by this message, otherwise returns false.
virtual void Engine::TagValue::remove ( const std::set< int > &  tags ) [pure virtual]

Removes passed tags from message.

Parameters:
tagsSet of field tags to remove.
Exceptions:
Utils::Exceptionif one of the requested fields isn't defined this message type.
virtual bool Engine::TagValue::remove ( int  tag ) [pure virtual]

Empties field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, remove returns true, otherwise false.

Parameters:
tagTag of field to remove.
Returns:
"true" if request field had value before call of remove, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual void Engine::TagValue::reserve ( int  tag,
PreparedFieldIndex  index,
size_t  size 
) [pure virtual]

Reserves memory to store prepared field value.

Parameters:
[in]tagTag of the field.
[in]indexUser defined index of the prepared field.
[in]sizeSize of the field value to reserve.
virtual bool Engine::TagValue::set ( int  tag,
System::u64  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
UTCDateOnly  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
const std::string &  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field is not defined for this message type.
virtual bool Engine::TagValue::set ( int  tag,
bool  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
LocalMktDate  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
AsciiString  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
UTCTimeOnly  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
System::i32  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
Decimal  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
ByteArray  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
UTCTimestamp  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
System::i64  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
bool Engine::TagValue::set ( int  tag,
char const *  value 
) [inline]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.

Definition at line 602 of file B2BITS_TagValue.h.

virtual bool Engine::TagValue::set ( int  tag,
double  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
const FIXFieldValue value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field is not defined by FIX protocol for this message type. message type.
virtual bool Engine::TagValue::set ( int  tag,
char  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
MonthYear  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual bool Engine::TagValue::set ( int  tag,
System::u32  value 
) [pure virtual]

Updates field value by tag number.

The returned value indicates previous value existance, i.e if previous value wasn't empty, set returns true, otherwise false.

Parameters:
tagFIX field tag to set data to.
valueNew value for field.
Returns:
"true" if request field had value before call of set, otherwise "false" (i.e. tag was inserted into message).
Exceptions:
Utils::Exceptionif requested field not defined this message type.
virtual void Engine::TagValue::write ( int  tag,
std::ostream &  stream 
) const [pure virtual]

Writes field value to the stream.

Parameters:
[in]tagTag of the field.
[out]streamOutput stream to write field value to.

Friends And Related Function Documentation

friend class FieldValueT [friend]

Definition at line 329 of file B2BITS_TagValue.h.