B2BITS FIX Antenna C++ 2.32.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Engine::GenericPreparedMessage Class Reference

Provides minimal functionality to work with prepared fields. More...

#include <B2BITS_PreparedMessage.h>

+ Inheritance diagram for Engine::GenericPreparedMessage:
+ Collaboration diagram for Engine::GenericPreparedMessage:

Public Member Functions

 GenericPreparedMessage () throw ()
 Default constructor.
 
 GenericPreparedMessage (FIXMessage const *msg, unsigned char tagsDelimiter='\x01')
 Conversion constructor.
 
char * get (PreparedFieldIndex index, std::size_t *size) throw ()
 Returns pointer to the buffer where field value is stored.
 
bool isFieldReserved (PreparedFieldIndex index) const
 Returns true, if field by gived index was reserved and user can write value; otherwise false.
 
void set (PreparedFieldIndex index, AsciiString value) throw ()
 Copies passed value to the message.
 
void set (PreparedFieldIndex index, bool value) throw ()
 Copies passed value to the message.
 
void set (PreparedFieldIndex index, char const *value, std::size_t size) throw ()
 Copies passed value to the message.
 
void set (PreparedFieldIndex index, char value) throw ()
 Copies passed value to the message.
 
void set (PreparedFieldIndex index, const TZTimeHelper::UTCTimestamp &value) throw ()
 Copies passed value to the message.
 
void set (PreparedFieldIndex index, Decimal value) throw ()
 Copies passed value to the message.
 
bool set (PreparedFieldIndex index, System::i32 value) throw ()
 Copies passed value to the message.
 
bool set (PreparedFieldIndex index, System::i64 value) throw ()
 Copies passed value to the message.
 
bool set (PreparedFieldIndex index, System::u32 value) throw ()
 Copies passed value to the message.
 
bool set (PreparedFieldIndex index, System::u64 value) throw ()
 Copies passed value to the message.
 
void set (PreparedFieldIndex index, UTCTimestamp value) throw ()
 Copies passed value to the message.
 
virtual ~GenericPreparedMessage () throw ()
 Polymorphous destructor.
 
- Public Member Functions inherited from Engine::PreparedMessage
char * getCheckSum (size_t *size) throw ()
 Returns pointer to buffer of the CheckSum field.
 
char * getMsgSeqNum (size_t *size) throw ()
 Returns pointer to buffer of the MsgSeqNum field.
 
bool isLastMsgSeqNumProcessedReserved () const throw ()
 Returns true, if LastMsgSeqNumProcessed is initalized.
 
bool isSendingTimeReserved () const throw ()
 Returns true, if SendingTime is initalized.
 
 PreparedMessage () throw ()
 
char const * rawMsg () const throw ()
 Returns pointer to the RAW FIX message.
 
std::size_t rawMsgSize () const throw ()
 Returns size of the RAW FIX message.
 
void setCheckSum (char const *value) throw ()
 Updates CheckSum value.
 
void setLastMsgSeqNumProcessed (int value) throw ()
 Updates LastMsgSeqNumProcessed value.
 
int setMsgSeqNum (int value) throw ()
 Updates MsgSeqNum value.
 
void setSendingTime (char const *value, std::size_t size) throw ()
 Updates SendingTime value.
 
void setSendingTime (const TZTimeHelper::UTCTimestamp &value) throw ()
 Updates SendingTime value.
 
void setSendingTime (UTCTimestamp value) throw ()
 Updates SendingTime value.
 
size_t sizeSendingTimeReserved () const throw ()
 Returns size reserved for SendingTime.
 
void updateCheckSum () throw ()
 Recalculates checksum.
 
virtual ~PreparedMessage () throw ()
 Polymorphous destructor.
 

Static Public Attributes

static int const FieldCount = 20
 

Additional Inherited Members

- Public Types inherited from Engine::PreparedMessage
enum  {
  First = 1000 , MsgSeqNum = First , CheckSum , SendingTime ,
  LastMsgSeqNumProcessed , Last
}
 Enumerates indexes for fields. More...
 
- Protected Member Functions inherited from Engine::PreparedMessage
char * getChecked (PreparedFieldIndex index, std::size_t *size)
 Returns pointer to the buffer where field value is stored.
 
void setBuffer (char *buf, char const *msgStart, std::size_t msgSize) throw ()
 Acquires passed buffer and its size.
 
void setMsgSize (std::size_t msgSize) throw ()
 Updates size of the RAW FIX message.
 
void setMsgStart (char const *msgStart) throw ()
 Updates pointer to the RAW FIX message.
 
- Static Protected Member Functions inherited from Engine::PreparedMessage
static void set (Field const &field, bool value) throw ()
 Copies passed value to the message.
 
static void set (Field const &field, char const *value, std::size_t size) throw ()
 Copies passed value to the message.
 
static void set (Field const &field, char value) throw ()
 Copies passed value to the message.
 
static void set (Field const &field, const TZTimeHelper::UTCTimestamp &value) throw ()
 Copies passed value to the message.
 
static void set (Field const &field, Decimal const &value) throw ()
 Copies passed value to the message.
 
static bool set (Field const &field, System::i32 value) throw ()
 Copies passed value to the message.
 
static bool set (Field const &field, System::i64 value) throw ()
 Copies passed value to the message.
 
static bool set (Field const &field, System::u32 value) throw ()
 Copies passed value to the message.
 
static bool set (Field const &field, System::u64 value) throw ()
 Copies passed value to the message.
 
static void set (Field const &field, UTCTimestamp value) throw ()
 Copies passed value to the message.
 

Detailed Description

Provides minimal functionality to work with prepared fields.

Implements PreparedMessage.

Constructor & Destructor Documentation

◆ GenericPreparedMessage() [1/2]

Engine::GenericPreparedMessage::GenericPreparedMessage ( )
throw ( )

Default constructor.

◆ GenericPreparedMessage() [2/2]

Engine::GenericPreparedMessage::GenericPreparedMessage ( FIXMessage const * msg,
unsigned char tagsDelimiter = '\x01' )
explicit

Conversion constructor.

◆ ~GenericPreparedMessage()

virtual Engine::GenericPreparedMessage::~GenericPreparedMessage ( )
throw ( )
virtual

Polymorphous destructor.

Member Function Documentation

◆ get()

char * Engine::GenericPreparedMessage::get ( PreparedFieldIndex index,
std::size_t * size )
throw ( )
inline

Returns pointer to the buffer where field value is stored.

Parameters
[in]indexIndex of the field
[out]sizeSize of the field value
Note
Please use this method carefully. User takes on responsibility to field value format.

◆ isFieldReserved()

bool Engine::GenericPreparedMessage::isFieldReserved ( PreparedFieldIndex index) const
inline

Returns true, if field by gived index was reserved and user can write value; otherwise false.

Returns
true, if field by gived index was reserved and user can write value; otherwise false.

◆ set() [1/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
AsciiString value )
throw ( )
inline

Copies passed value to the message.

◆ set() [2/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
bool value )
throw ( )
inline

Copies passed value to the message.

◆ set() [3/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
char const * value,
std::size_t size )
throw ( )
inline

Copies passed value to the message.

◆ set() [4/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
char value )
throw ( )
inline

Copies passed value to the message.

◆ set() [5/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
const TZTimeHelper::UTCTimestamp & value )
throw ( )
inline

Copies passed value to the message.

◆ set() [6/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
Decimal value )
throw ( )
inline

Copies passed value to the message.

◆ set() [7/11]

bool Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
System::i32 value )
throw ( )
inline

Copies passed value to the message.

Returns
0 if value was written successfully; non-zero if stored buffer is too small to keep passed value.

◆ set() [8/11]

bool Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
System::i64 value )
throw ( )
inline

Copies passed value to the message.

Returns
0 if value was written successfully; non-zero if stored buffer is too small to keep passed value.

◆ set() [9/11]

bool Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
System::u32 value )
throw ( )
inline

Copies passed value to the message.

Returns
0 if value was written successfully; non-zero if stored buffer is too small to keep passed value.

◆ set() [10/11]

bool Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
System::u64 value )
throw ( )
inline

Copies passed value to the message.

      Copies passed value to the message
      @return 0 if value was written successfully; non-zero if stored buffer is too small to keep passed value.

Returns
0 if value was written successfully; non-zero if stored buffer is too small to keep passed value.

◆ set() [11/11]

void Engine::GenericPreparedMessage::set ( PreparedFieldIndex index,
UTCTimestamp value )
throw ( )
inline

Copies passed value to the message.

Member Data Documentation

◆ FieldCount

int const Engine::GenericPreparedMessage::FieldCount = 20
static