Public Member Functions | Static Public Member Functions

Engine::FIXMessage Class Reference

Basic FIX message. More...

#include <B2BITS_FIXMessage.h>

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

List of all members.

Public Member Functions

virtual FIXMessageEx * extend ()=0
 Returns extended interface of FIXMessage.
virtual FIXMessageEx const * extend () const =0
 Returns extended interface of FIXMessage.
 FIXMessage ()
 Constructor.
virtual FIXVersion getApplicationVersion () const =0
 Returns the version of the FIX protocol.
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.
virtual int getHeartBeatInterval () const =0
 Returns Heartbeat interval (HeartBtInt) in seconds.
virtual const std::string * getSender () const =0
 Returns the SenderCompID field.
virtual int getSeqNum () const =0
 Returns the MsgSeqNum field.
virtual FIXVersion getSessionVersion () const =0
 For the session message received from FIX50 session returns version of the session protocol.
virtual const std::string * getTarget () const =0
 Returns the TargetCompID field.
virtual const std::string * getType () const =0
 Returns the MsgType field.
virtual FIXVersion getVer () const =0
 Returns the version of the FIX protocol.
virtual bool isAdministrativeMsg () const =0
 Checks whether the message is a session level message.
virtual bool isBusinessMsgRejectMsg () const =0
 Checks whether the message is a Business Level Reject message.
virtual bool isOriginal () const =0
 Checks the message's originality.
virtual bool isSessionLevelRejectMsg () const =0
 Checks whether the message is a SessionLevelReject message.
void operator delete (void *obj)
 Overloaded delete operator.
void * operator new (size_t size)
 Overloaded new operator.
virtual void prepare (PreparedMessage *msg) const =0
 Generates template of the message and stores it to the PreparedMessage.
virtual ProtocolID protocolID () const =0
 Returns unique protocol identifier of the message.
virtual void release () const =0
 Releases FIX message instance.
virtual void release ()
 Releases FIX message instance.
virtual bool setHeartBeatInterval (int hbi)=0
 Updates HeartBtInt field value.
virtual void setSender (const std::string &senderCompID)=0
 Sets the SenderCompID field.
virtual bool setSeqNum (int msgSeqNum)=0
 Updates the MsgSeqNum field.
virtual void setTarget (const std::string &targetCompID)=0
 Sets the TargetCompID field.
virtual const char * toRaw (int *size) const =0
 Builds raw (native) representation of the message.
virtual const std::string * toString (char substChar= ' ') const =0
 Returns the formatted representation of the message.
virtual AsciiString type () const
 Returns the MsgType field.
virtual ~FIXMessage ()
 Destructor.

Static Public Member Functions

static void release (FIXMessage const *msg)
 Releases FIX message instance.

Detailed Description

Basic FIX message.

Definition at line 75 of file B2BITS_FIXMessage.h.


Constructor & Destructor Documentation

Engine::FIXMessage::FIXMessage (  )

Constructor.

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

Destructor.


Member Function Documentation

virtual FIXMessageEx* Engine::FIXMessage::extend (  ) [pure virtual]

Returns extended interface of FIXMessage.

virtual FIXMessageEx const* Engine::FIXMessage::extend (  ) const [pure virtual]

Returns extended interface of FIXMessage.

virtual FIXVersion Engine::FIXMessage::getApplicationVersion (  ) const [pure virtual]

Returns the version of the FIX protocol.

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

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.
Deprecated:
Use toRaw(int* size) const instead.
virtual int Engine::FIXMessage::getHeartBeatInterval (  ) const [pure virtual]

Returns Heartbeat interval (HeartBtInt) in seconds.

Returns:
Heartbeat interval (HeartBtInt) in seconds.
virtual const std::string* Engine::FIXMessage::getSender (  ) const [pure virtual]

Returns the SenderCompID field.

Returns:
Value of the SenderCompID field.
virtual int Engine::FIXMessage::getSeqNum (  ) const [pure virtual]

Returns the MsgSeqNum field.

Returns:
Value of the MsgSeqNum field.
virtual FIXVersion Engine::FIXMessage::getSessionVersion (  ) const [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.

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

Returns the TargetCompID field.

Returns:
Value of the TargetCompID field.
virtual const std::string* Engine::FIXMessage::getType (  ) const [pure virtual]

Returns the MsgType field.

Returns:
Value of the MsgType field.
virtual FIXVersion Engine::FIXMessage::getVer (  ) const [pure virtual]

Returns the version of the FIX protocol.

Note: Method is deprecated! The getApplicationVersion should be used to get version of protocol for the application message.

virtual bool Engine::FIXMessage::isAdministrativeMsg (  ) const [pure virtual]

Checks whether the message is a session level message.

Returns:
"true" if the message is a Session Level message. "false" otherwise.
virtual bool Engine::FIXMessage::isBusinessMsgRejectMsg (  ) const [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.
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".
virtual bool Engine::FIXMessage::isSessionLevelRejectMsg (  ) const [pure virtual]

Checks whether the message is a SessionLevelReject message.

Returns:
"true" if the message is a Session Level Reject message. "false" otherwise.
void Engine::FIXMessage::operator delete ( void *  obj )

Overloaded delete operator.

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

Overloaded new operator.

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.
virtual ProtocolID Engine::FIXMessage::protocolID (  ) const [pure virtual]

Returns unique protocol identifier of the message.

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

Releases FIX message instance.

See also:
release(FIXMessage* msg)
virtual void Engine::FIXMessage::release (  ) [virtual]

Releases FIX message instance.

See also:
release(FIXMessage* msg)
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.
virtual bool Engine::FIXMessage::setHeartBeatInterval ( int  hbi ) [pure virtual]

Updates HeartBtInt field value.

Parameters:
hbiNew heartbeat value.
Returns:
allways returns true.
virtual void Engine::FIXMessage::setSender ( const std::string &  senderCompID ) [pure virtual]

Sets the SenderCompID field.

Parameters:
senderCompIDNew SenderCompID value.
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.
virtual void Engine::FIXMessage::setTarget ( const std::string &  targetCompID ) [pure virtual]

Sets the TargetCompID field.

Parameters:
targetCompIDNew TargetCompID value.
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.
Warning:
Returned buffer does not have null-terminator.
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 (< 0x20 and > 0x7F).
Warning:
Intended for debugging only.
virtual AsciiString Engine::FIXMessage::type (  ) const [inline, virtual]

Returns the MsgType field.

Returns:
Value of the MsgType field.

Definition at line 124 of file B2BITS_FIXMessage.h.