B2BITS FIX Antenna C++  2.27.0
Public Member Functions | Static Public Member Functions | List of all members
Engine::FIXMessage Class Referenceabstract

Basic FIX message. More...

#include <B2BITS_FIXMessage.h>

+ Inheritance diagram for Engine::FIXMessage:
+ Collaboration diagram for Engine::FIXMessage:

Public Member Functions

virtual FIXMessageEx * extend ()=0 throw ()
 Returns extended interface of FIXMessage. More...
 
virtual FIXMessageEx const * extend () const =0 throw ()
 Returns extended interface of FIXMessage. More...
 
 FIXMessage ()
 Constructor. More...
 
virtual FIXVersion getApplicationVersion () const =0 throw ()
 Returns the version of the FIX protocol. More...
 
virtual const char * getBuffer (int *size, SecurityAttributes *sa=NULL) const =0
 Returns a pointer to the internal message buffer that contains raw form (native FIX format) of the message. More...
 
virtual int getHeartBeatInterval () const =0
 Returns Heartbeat interval (HeartBtInt) in seconds. More...
 
virtual const std::string * getSender () const =0
 Returns the SenderCompID field. More...
 
virtual AsciiString getSenderCompID () const =0
 Returns the SenderCompID field. More...
 
virtual int getSeqNum () const =0
 Returns the MsgSeqNum field. More...
 
virtual FIXVersion getSessionVersion () const =0 throw ()
 For the session message received from FIX50 session returns version of the session protocol. More...
 
virtual const std::string * getTarget () const =0
 Returns the TargetCompID field. More...
 
virtual AsciiString getTargetCompID () const =0
 Returns the TargetCompID field. More...
 
virtual const std::string * getType () const =0
 Returns the MsgType field. More...
 
virtual FIXVersion getVer () const =0 throw ()
 Returns the version of the FIX protocol. More...
 
virtual bool isAdministrativeMsg () const =0 throw ()
 Checks whether the message is a session level message. More...
 
virtual bool isBusinessMsgRejectMsg () const =0 throw ()
 Checks whether the message is a Business Level Reject message. More...
 
virtual bool isOriginal () const =0
 Checks the message's originality. More...
 
virtual bool isSessionLevelRejectMsg () const =0 throw ()
 Checks whether the message is a SessionLevelReject message. More...
 
void operator delete (void *obj)
 Overloaded delete operator. More...
 
void * operator new (std::size_t size)
 Overloaded new operator. More...
 
virtual ParserID parserID () const =0 throw ()
 Returns unique parser identifier of the message. More...
 
virtual void prepare (PreparedMessage *msg) const =0
 Generates template of the message and stores it to the PreparedMessage. More...
 
ParserID protocolID () const throw ()
 Returns unique parser identifier of the message. More...
 
virtual void release () const =0
 Releases FIX message instance. More...
 
virtual void release ()=0
 Releases FIX message instance. More...
 
virtual bool setHeartBeatInterval (int hbi)=0
 Updates HeartBtInt field value. More...
 
void setSender (const std::string &senderCompID)
 Sets the SenderCompID field. More...
 
virtual void setSenderCompID (AsciiString senderCompID)=0
 Sets the SenderCompID field. More...
 
virtual bool setSeqNum (int msgSeqNum)=0
 Updates the MsgSeqNum field. More...
 
void setTarget (const std::string &targetCompID)
 Sets the TargetCompID field. More...
 
virtual void setTargetCompID (AsciiString targetCompID)=0
 Sets the TargetCompID field. More...
 
virtual const char * toRaw (int *size) const =0
 Builds raw (native) representation of the message. More...
 
virtual const std::string * toString (char substChar=' ') const =0
 Returns the formatted representation of the message. More...
 
virtual AsciiString type () const =0 throw ()
 Returns the MsgType field. More...
 
virtual ~FIXMessage ()
 Destructor. More...
 
- Public Member Functions inherited from Engine::TagValue
virtual void apply (FixFieldsFunctor &f) const =0
 Apply the given functor to every field. More...
 
virtual void copyTo (TagValue *dest, int destTag, int srcTag) const =0
 
Copies field value to another instance of the TagValue. More...
 
virtual TagValueEx * extendTV ()=0 throw ()
 Returns extended interface of TagValue. More...
 
virtual TagValueEx const * extendTV () const =0 throw ()
 Returns extended interface of TagValue. More...
 
virtual const std::string * get (int tag) const =0
 Retrieves field value by tag number. More...
 
virtual bool get (int tag, FIXFieldValue *value) const =0
 Retrieves field value by tag number and stores it into instance of FIXFieldValue class. More...
 
virtual bool get (int tag, std::string *value) const =0
 Returns true if field is not empty, false otherwise. More...
 
bool getAsBool (int tag) const
 Returns field value. More...
 
virtual bool getAsBoolean (int tag) const =0
 Returns field value. More...
 
virtual char getAsChar (int tag) const =0
 Returns field value. More...
 
virtual UTCDateOnly getAsDateOnly (int tag) const =0
 Returns field value. More...
 
virtual Decimal getAsDecimal (int tag) const =0
 Returns field value. More...
 
virtual double getAsDouble (int tag) const =0
 Returns field value. More...
 
FIXGroupgetAsGroup (int tag)
 
FIXGroup const & getAsGroup (int tag) const
 
virtual int getAsInt (int tag) const =0
 Returns field value. More...
 
virtual System::i32 getAsInt32 (int tag) const =0
 Returns field value. More...
 
virtual System::i64 getAsInt64 (int tag) const =0
 Returns field value. More...
 
virtual LocalMktDate getAsLocalMktDate (int tag) const =0
 Returns field value. More...
 
virtual MonthYear getAsMonthYear (int tag) const =0
 Returns field value. More...
 
virtual MultipleChar getAsMultipleChar (int tag) const =0
 Returns field value. More...
 
virtual MultipleString getAsMultipleString (int tag) const =0
 Returns field value. More...
 
virtual ByteArray getAsRaw (int tag) const =0
 Returns field value. More...
 
virtual AsciiString getAsString (int tag) const =0
 Returns field value. More...
 
virtual UTCTimeOnly getAsTimeOnly (int tag) const =0
 Returns field value. More...
 
virtual UTCTimestamp getAsTimestamp (int tag) const =0
 Returns field value. More...
 
virtual unsigned int getAsUInt (int tag) const =0
 Returns field value. More...
 
virtual System::u32 getAsUInt32 (int tag) const =0
 Returns field value. More...
 
virtual System::u64 getAsUInt64 (int tag) const =0
 Returns field value. More...
 
ConstFieldValue getField (int tag) const
 Returns value of the field specified by tag. More...
 
FieldValue getField (int tag)
 Returns value of the field specified by tag. More...
 
virtual FixFieldsContainergetFields () const =0
 Returns list of the message fields and their values. More...
 
virtual FIXGroup const * getGroup (int tag) const =0
 Returns the repeating group instance by leading field tag number. More...
 
virtual FIXGroupgetGroup (int tag)=0
 Returns the repeating group instance by leading field tag number. More...
 
virtual bool hasFlag (int tag) const =0
 Checks boolean field. More...
 
bool hasValue (int tag) const
 
Returns true if value is defined; false otherwise. More...
 
virtual bool isEmpty (int tag) const =0
 
Returns true if value of the field is empty; false otherwise. More...
 
virtual bool isEqual (int tag, TagValue const *rv, int rvTag) const =0
 Compares values of the fields. More...
 
virtual bool isSupported (int tag) const =0 throw ()
 Verifies is field acceptable in the message. More...
 
virtual bool remove (int tag)=0
 Empties field value by tag number. More...
 
virtual void remove (const std::set< int > &tags)=0
 Removes passed tags from message. More...
 
virtual void reserve (int tag, PreparedFieldIndex index, std::size_t size)=0
 Reserves memory to store prepared field value. More...
 
virtual bool set (int tag, MonthYear value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, LocalMktDate value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, UTCDateOnly value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, UTCTimeOnly value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, UTCTimestamp value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, System::i32 value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, System::u32 value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, System::i64 value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, System::u64 value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, double value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, Decimal value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, AsciiString value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, ByteArray value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, char value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, bool value)=0
 Updates field value by tag number. More...
 
bool set (int tag, char const *value)
 Updates field value by tag number. More...
 
virtual bool set (int tag, const MultipleString &value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, const MultipleChar &value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, const FIXFieldValue &value)=0
 Updates field value by tag number. More...
 
virtual bool set (int tag, const std::string &value)=0
 Updates field value by tag number. More...
 
 TagValue ()
 Constructor. More...
 
virtual void write (int tag, std::ostream &stream) const =0
 Writes field value to the stream. More...
 

Static Public Member Functions

static void release (FIXMessage const *msg)
 Releases FIX message instance. More...
 
- Static Public Member Functions inherited from Engine::TagValue
static void release (TagValue const *obj)
 Releases assigned resources. More...
 

Additional Inherited Members

- Public Types inherited from Engine::TagValue
typedef FieldValueT< TagValue const > const ConstFieldValue
 
typedef FieldValueT< TagValueFieldValue
 
- Protected Member Functions inherited from Engine::TagValue
virtual ~TagValue ()
 Destructor. More...
 

Detailed Description

Basic FIX message.

To create FIXMessage instance use FIXMsgFactory::newSkel method. To parse raw FIX message use FIXMsgProcessor::parse method. To clone FIXMessage use FIXMsgProcessor::clone method.

See also
FIXMsgFactory::newSkel
FIXMsgProcessor::parse
FIXMsgProcessor::clone

Constructor & Destructor Documentation

◆ FIXMessage()

Engine::FIXMessage::FIXMessage ( )

Constructor.

◆ ~FIXMessage()

virtual Engine::FIXMessage::~FIXMessage ( )
virtual

Destructor.

Member Function Documentation

◆ extend() [1/2]

virtual FIXMessageEx* Engine::FIXMessage::extend ( )
throw (
)
pure virtual

Returns extended interface of FIXMessage.

◆ extend() [2/2]

virtual FIXMessageEx const* Engine::FIXMessage::extend ( ) const
throw (
)
pure virtual

Returns extended interface of FIXMessage.

◆ getApplicationVersion()

virtual FIXVersion Engine::FIXMessage::getApplicationVersion ( ) const
throw (
)
pure virtual

Returns the version of the FIX protocol.

For the message received from FIX50 session returns version of the application protocol.

◆ getBuffer()

virtual const char* Engine::FIXMessage::getBuffer ( int *  size,
SecurityAttributes *  sa = NULL 
) const
pure virtual

Returns a pointer to the internal message buffer that contains raw form (native FIX format) of the message.

Parameters
sizethe receiving field for the buffer's size.
saSession's security attributes. Always set 0 for this parameter.
Note
This method is not thread safe
Deprecated:
Use Engine::FIXMessage::toRaw(int* size) const instead.

◆ getHeartBeatInterval()

virtual int Engine::FIXMessage::getHeartBeatInterval ( ) const
pure virtual

Returns Heartbeat interval (HeartBtInt) in seconds.

Returns
Heartbeat interval (HeartBtInt) in seconds.

◆ getSender()

virtual const std::string* Engine::FIXMessage::getSender ( ) const
pure virtual

Returns the SenderCompID field.

Warning
This method is not thread safe and has side effect.
Returns
Value of the SenderCompID field.
Deprecated:
Use Engine::FIXMessage::getSenderCompID instead.

◆ getSenderCompID()

virtual AsciiString Engine::FIXMessage::getSenderCompID ( ) const
pure virtual

Returns the SenderCompID field.

Returns
Value of the SenderCompID field.

◆ getSeqNum()

virtual int Engine::FIXMessage::getSeqNum ( ) const
pure virtual

Returns the MsgSeqNum field.

Returns
Value of the MsgSeqNum field.

◆ getSessionVersion()

virtual FIXVersion Engine::FIXMessage::getSessionVersion ( ) const
throw (
)
pure virtual

For the session message received from FIX50 session returns version of the session protocol.

For the application message received from FIX50 session returns NA. Otherwise returns same result as getApplicationVersion() method.

◆ getTarget()

virtual const std::string* Engine::FIXMessage::getTarget ( ) const
pure virtual

Returns the TargetCompID field.

Warning
This method is not thread safe and has side effect.
Returns
Value of the TargetCompID field.
Deprecated:
Use Engine::FIXMessage::getTargetCompID instead.

◆ getTargetCompID()

virtual AsciiString Engine::FIXMessage::getTargetCompID ( ) const
pure virtual

Returns the TargetCompID field.

Returns
Value of the TargetCompID field.

◆ getType()

virtual const std::string* Engine::FIXMessage::getType ( ) const
pure virtual

Returns the MsgType field.

Warning
This method is not thread safe and has side effect.
Returns
Value of the MsgType field.
Deprecated:
Use Engine::FIXMessage::type method instead.

◆ getVer()

virtual FIXVersion Engine::FIXMessage::getVer ( ) const
throw (
)
pure virtual

Returns the version of the FIX protocol.

Deprecated:
Use either Engine::FIXMessage::getApplicationVersion or Engine::FIXMessage::getSessionVersion instead.

◆ isAdministrativeMsg()

virtual bool Engine::FIXMessage::isAdministrativeMsg ( ) const
throw (
)
pure virtual

Checks whether the message is a session level message.

Returns
"true" if the message is a Session Level message. "false" otherwise.

◆ isBusinessMsgRejectMsg()

virtual bool Engine::FIXMessage::isBusinessMsgRejectMsg ( ) const
throw (
)
pure virtual

Checks whether the message is a Business Level Reject message.

Returns
"true" if the message is a Business Level Reject message. "false" otherwise.

◆ isOriginal()

virtual bool Engine::FIXMessage::isOriginal ( ) const
pure virtual

Checks the message's originality.

Returns
Returns "true" if the message is original, i.e. PossDupFlag field value is empty or equals to 'N'. Otherwise returns "false".

◆ isSessionLevelRejectMsg()

virtual bool Engine::FIXMessage::isSessionLevelRejectMsg ( ) const
throw (
)
pure virtual

Checks whether the message is a SessionLevelReject message.

Returns
"true" if the message is a Session Level Reject message. "false" otherwise.

◆ operator delete()

void Engine::FIXMessage::operator delete ( void *  obj)

Overloaded delete operator.

◆ operator new()

void* Engine::FIXMessage::operator new ( std::size_t  size)

Overloaded new operator.

◆ parserID()

virtual ParserID Engine::FIXMessage::parserID ( ) const
throw (
)
pure virtual

Returns unique parser identifier of the message.

◆ prepare()

virtual void Engine::FIXMessage::prepare ( PreparedMessage msg) const
pure virtual

Generates template of the message and stores it to the PreparedMessage.

Parameters
[out]msgPreparedMessage instance to store message template.

◆ protocolID()

ParserID Engine::FIXMessage::protocolID ( ) const
throw (
)

Returns unique parser identifier of the message.

Deprecated:
Use Engine::FIXMessage::parserID() instead.

◆ release() [1/3]

virtual void Engine::FIXMessage::release ( ) const
pure virtual

Releases FIX message instance.

See also
release(FIXMessage* msg)

Implements Engine::TagValue.

◆ release() [2/3]

virtual void Engine::FIXMessage::release ( )
pure virtual

Releases FIX message instance.

See also
release(FIXMessage* msg)

Implements Engine::TagValue.

◆ release() [3/3]

static void Engine::FIXMessage::release ( FIXMessage const *  msg)
static

Releases FIX message instance.

Parameters
msgInstance of FIXMessage class.
Warning
This method releases all resources assigned with message. So, don't call FIXGroup::release() for repeating group entries of this message after you call this method.

◆ setHeartBeatInterval()

virtual bool Engine::FIXMessage::setHeartBeatInterval ( int  hbi)
pure virtual

Updates HeartBtInt field value.

Parameters
hbiNew heartbeat value.
Returns
allways returns true.

◆ setSender()

void Engine::FIXMessage::setSender ( const std::string &  senderCompID)
inline

Sets the SenderCompID field.

Warning
This method is not thread safe and has side effect.
Parameters
senderCompIDNew SenderCompID value.
Deprecated:
Use Engine::FIXMessage::setSenderCompID instead.

◆ setSenderCompID()

virtual void Engine::FIXMessage::setSenderCompID ( AsciiString  senderCompID)
pure virtual

Sets the SenderCompID field.

Parameters
senderCompIDNew SenderCompID value.

◆ setSeqNum()

virtual bool Engine::FIXMessage::setSeqNum ( int  msgSeqNum)
pure virtual

Updates the MsgSeqNum field.

Parameters
msgSeqNumNew MsgSeqNum value.
Returns
true field value was updated, false otherwise.

◆ setTarget()

void Engine::FIXMessage::setTarget ( const std::string &  targetCompID)
inline

Sets the TargetCompID field.

Warning
This method is not thread safe and has side effect.
Parameters
targetCompIDNew TargetCompID value.
Deprecated:
Use Engine::FIXMessage::setTargetCompID instead.

◆ setTargetCompID()

virtual void Engine::FIXMessage::setTargetCompID ( AsciiString  targetCompID)
pure virtual

Sets the TargetCompID field.

Parameters
targetCompIDNew TargetCompID value.

◆ toRaw()

virtual const char* Engine::FIXMessage::toRaw ( int *  size) const
pure virtual

Builds raw (native) representation of the message.

Parameters
[out]sizewill contain size of returned memory buffer.
Returns
Pointer to buffer contained raw form.
Note
This method should be used instead of getBuffer.
This method is not thread safe
Warning
Returned buffer does not have null-terminator.

◆ toString()

virtual const std::string* Engine::FIXMessage::toString ( char  substChar = ' ') const
pure virtual

Returns the formatted representation of the message.

Parameters
substCharcharacter to use instead of unreadable symbols (less than 0x20 and greater than 0x7F).
Warning
This method is not thread safe
Intended for debugging only.

◆ type()

virtual AsciiString Engine::FIXMessage::type ( ) const
throw (
)
pure virtual

Returns the MsgType field.

Returns
Value of the MsgType field.