B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Parser::LiteFixMessage Class Reference

Lightweight FIX message. More...

#include <LiteFixMessage.h>

+ Inheritance diagram for Parser::LiteFixMessage:
+ Collaboration diagram for Parser::LiteFixMessage:

Classes

struct  index_tagloc_t
 

Public Types

typedef unsigned short hashtbl_elem_t
 
typedef unsigned short index_elem_t
 
typedef unsigned short index_flags_t
 
enum  MISSING_TAG_HANDLING { ADD_IF_NOT_EXISTS, ALWAYS_ADD, DONT_ADD_IF_NOT_EXISTS }
 
- Public Types inherited from Engine::TagValue
typedef FieldValueT< TagValue
const > const 
ConstFieldValue
 
typedef FieldValueT< TagValueFieldValue
 

Public Member Functions

void _add (int tag, int offset, int length)
 
void _clear ()
 
void _ensureIndexCapacity ()
 
void add (int tag, const char *value, int length)
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, const Engine::AsciiString &value) FLATTEN
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, System::i64 value) FLATTEN
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, int value) FLATTEN
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, unsigned value) FLATTEN
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, System::u64 value) FLATTEN
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, char value) FLATTEN
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, double value)
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, const char *value)
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, const ShortStrRef &value)
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void add (int tag, const ShortStrRefCtor &value)
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
template<int StringLength>
void add (int tag, const ShortStr< StringLength > &value)
 Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message. More...
 
void addToHashTbl (int tag, int index) throw ()
 
void * allocateBytes (int size)
 
void allocTableData (int new_index_length, int new_hashtbl_length, bool freeOldData)
 
int calculateBodyLength ()
 Returns the message body length. More...
 
void checkFields () const
 not implemented More...
 
void checkRequired (Parser::Options options) const
 not implemented More...
 
void checkTagExistsAtIndex (int tagIndex) const FLATTEN
 Ensures that the field exists by the given index. More...
 
void clear () FLATTEN
 Clears the message. More...
 
void clearHashTbl ()
 
void clearPerFieldStorage ()
 
Parser::LiteFixMessagecloneMessage () const FLATTEN
 Makes an independent copy of the message. More...
 
void cloneMessage (Engine::FIXMessage *target) const FLATTEN
 Makes an independent copy of the message. More...
 
virtual void copyTo (Engine::TagValue *dest, int destTag, int srcTag) const B2B_OVERRIDE
 not implemented More...
 
LiteFixMessagedeepClone (LiteFixMessage *cloned=NULL) const FLATTEN
 Makes an independent copy of the message. More...
 
void destroy ()
 The message destructor. More...
 
bool empty () const
 Returns true if the message is empty. More...
 
void ensureIndexCapacity ()
 Makes the message ready to add a new field or throw if it is failed. More...
 
virtual Engine::TagValueExextendTV () B2B_OVERRIDE throw ()
 not implemented More...
 
virtual Engine::TagValueEx const * extendTV () const B2B_OVERRIDE throw ()
 not implemented More...
 
int findElementInHashTbl (int tag) const throw ()
 
int findIndexEntryInHashTbl (int tag) const throw ()
 
int findOrPrepareToAdd (int tag, enum MISSING_TAG_HANDLING addIfNotExists)
 
int findOrPrepareToAdd (int tag)
 
int formatIntLength (System::i64 value)
 
bool get (int tag, char **data, int *length) const FLATTEN throw ()
 Reads the field value by the tag. More...
 
bool get (int tag, char **data, short *length) const FLATTEN throw ()
 Reads the field value by the tag. More...
 
bool get (int tag, const char **data, short *length) const FLATTEN throw ()
 Reads the field value by the tag. More...
 
bool get (int tag, const char **data, int *length) const FLATTEN throw ()
 Reads the field value by the tag. More...
 
bool get (int tag, Engine::FIXFieldValue *value) const FLATTEN
 Reads the field value by the tag. More...
 
Engine::AsciiString get (int tag) const FLATTEN
 Returns the field value by the tag as AsciiString. More...
 
Engine::FIXVersion getApplicationVersion () const throw ()
 Returns the application version of the message. More...
 
bool getAsBoolean (int tag) const FLATTEN
 Returns the field value as boolean by the tag. More...
 
char getAsChar (int tag) const FLATTEN
 Returns the field value as char by the tag. More...
 
Engine::UTCDateOnly getAsDateOnly (int tag) const
 Returns the field value by the tag as UTCDateOnly. More...
 
Engine::Decimal getAsDecimal (int tag) const
 not implemented More...
 
double getAsDouble (int tag) const FLATTEN
 Returns the field value as double by the tag. More...
 
int getAsInt (int tag) const FLATTEN
 Returns the field value as int by the tag. More...
 
System::i32 getAsInt32 (int tag) const FLATTEN
 Returns the field value as Int32 by the tag. More...
 
System::i64 getAsInt64 (int tag) const FLATTEN
 Returns the field value as Int64 by the tag. More...
 
int getAsInteger (int tag) const FLATTEN
 Returns the field value as int by the tag. More...
 
System::i64 getAsInteger64 (int tag) const FLATTEN
 Returns the field value as Int64 by the tag. More...
 
Engine::LocalMktDate getAsLocalMktDate (int tag) const
 Returns the field value by the tag as LocalMktDate. More...
 
Engine::MonthYear getAsMonthYear (int tag) const
 Returns the field value by the tag as MonthYear. More...
 
Engine::MultipleChar getAsMultipleChar (int tag) const
 Returns the field value by the tag as MultipleChar. More...
 
Engine::MultipleString getAsMultipleString (int tag) const
 Returns the field value by the tag as MultipleString. More...
 
Engine::ByteArray getAsRaw (int tag) const FLATTEN
 Returns the field value by the tag as ByteArray. More...
 
Engine::AsciiString getAsString (int tag) const FLATTEN
 Returns the field value by the tag as AsciiString. More...
 
Engine::AsciiString getAsStringValueOrEmpty (int tag) const FLATTEN throw ()
 Returns the field value by the tag as AsciiString. More...
 
Engine::UTCTimeOnly getAsTimeOnly (int tag) const
 Returns the field value by the tag as UTCTimeOnly. More...
 
Engine::UTCTimestamp getAsTimestamp (int tag) const
 Returns the field value by the tag as UTCTimestamp. More...
 
Engine::UTCTimestamp getAsTimestampi (int tag) const
 Returns the field value by the tag as UTCTimestamp. More...
 
unsigned int getAsUInt (int tag) const FLATTEN
 Returns the field value by the tag as UInt or throws the Utils::Exception. More...
 
System::u32 getAsUInt32 (int tag) const FLATTEN
 Returns the field value by the tag as UInt32 or throws the Utils::Exception. More...
 
System::u64 getAsUInt64 (int tag) const FLATTEN
 Returns the field value as UInt64 by the tag. More...
 
virtual const char * getBuffer (int *size, Engine::SecurityAttributes *sa=NULL) const B2B_OVERRIDE FLATTEN
 
const char * getBuffer (Utils::RawBuffer *rawFixMsg, int *size, bool calcCsum)
 
unsigned getChecksum (char *bytes, int length)
 
virtual
Engine::FixFieldsContainer
getFields () const B2B_OVERRIDE
 not implemented More...
 
char * getFieldStorage (int i) const throw ()
 
char * getFieldStorage_canthrow (int i) const
 
virtual Engine::FIXGroup const * getGroup (int tag) const B2B_OVERRIDE
 not implemented More...
 
virtual Engine::FIXGroupgetGroup (int tag) B2B_OVERRIDE
 not implemented More...
 
int getHeartBeatInterval () const FLATTEN
 Returns the heartbeat interval. More...
 
bool geti (int tag, Engine::FIXFieldValue *value) const FLATTEN
 Reads the field value by the tag. More...
 
int getIndexCount () const throw ()
 Returns the number of fields in the message (including removed fields) More...
 
int getLastTagIndex () const
 Returns the field index of the last field. More...
 
int getMaxAvailInPlace (int i) const throw ()
 
char * getMessageBuffer (int *size)
 
const char * getMessageBuffer (int *size) const
 
char * getOrigBuffer () throw ()
 
const char * getOrigBuffer () const throw ()
 
int getOrigBufferLength () const throw ()
 
int getRawLength () const
 
int getRawTagLengthFromPreviousField ()
 
bool getRawTagLengthFromPreviousField (const char *&buf, int pos, int tag, ParseError &error)
 
Engine::AsciiString getSenderCompID () const FLATTEN
 Returns the message sender. More...
 
int getSeqNum () const FLATTEN
 Returns the sequence number of the message. More...
 
Engine::FIXVersion getSessionVersion () const throw ()
 Returns the session version of the message. More...
 
void getTag_canthrow (int tag, char **data, int *length) const FLATTEN
 Reads the field value by the tag. More...
 
bool getTagAsBool (int tag) const
 Returns the field value as boolean by the tag. More...
 
bool getTagAsBool (int tag, int occurrence) const
 Returns the field value of the Nth tag as boolean. More...
 
bool getTagAsBool_nothrow (int tag, bool *value) const throw ()
 Reads the field value as boolean by the tag. More...
 
bool getTagAsBoolAtIndex (int tagIndex) const
 Returns the field value as boolean by the index. More...
 
double getTagAsFloat (int tag) const
 Returns the field value as double by the tag. More...
 
double getTagAsFloat (int tag, int occurrence) const
 Returns the field value of the Nth tag as double. More...
 
double getTagAsFloatAtIndex (int tagIndex) const
 Returns the field value as double by the index. More...
 
System::i64 getTagAsInt (int tag) const FLATTEN
 Returns the field value as System::i64 by the tag. More...
 
bool getTagAsInt (int tag, System::i64 *value) const FLATTEN throw ()
 Reads the field value as System::i64. More...
 
bool getTagAsInt (int tag, int *value) const FLATTEN throw ()
 Reads the field value as int. More...
 
bool getTagAsInt (int tag, System::i64 *value, int *end) const FLATTEN throw ()
 
System::i64 getTagAsIntAtIndex (int tagIndex) const FLATTEN
 Returns the field value as System::i64. More...
 
bool getTagAsIntAtIndex (int tagIndex, System::i64 *value) const FLATTEN throw ()
 Reads the field value as System::i64. More...
 
bool getTagAsIntAtIndex (int tagIndex, int *value) const FLATTEN throw ()
 Reads the field value as int. More...
 
Engine::AsciiString getTagAsString (int tag, int occurrence) const FLATTEN
 Returns the field value of the Nth tag as AsciiString or the empty string. More...
 
Engine::AsciiString getTagAsStringAtIndex (int tagIndex) const FLATTEN throw ()
 Returns the field value as AsciiString by the index or the empty string. More...
 
bool getTagAtIndex (int tagIndex, const char **data, int *length) const FLATTEN throw ()
 Reads the field value by the index. More...
 
bool getTagAtIndex (int tagIndex, int *tag, const char **data, int *length) const FLATTEN throw ()
 Reads the field tag and the value by the index. More...
 
bool getTagAtIndex (int tagIndex, Engine::FIXFieldValue *v) const FLATTEN throw ()
 Reads the field value by the index. More...
 
int getTagBytesLength (int tag) const
 
int getTagCount () const
 Returns the number of the fields in the message. More...
 
int getTagIndex (int tag) const FLATTEN
 Returns the field index by the tag or NOTFOUND. More...
 
int getTagIndex (int tag, int fromIndex) const FLATTEN
 Returns the field index in the specified range by the tag or NOTFOUND. More...
 
int getTagIndex (int tag, int fromIndex, int toIndex) const FLATTEN
 Returns the field index in the specified range by the tag or NOTFOUND. More...
 
int getTagLength (int tag) const throw ()
 Returns the length of the field value. More...
 
int getTagLength (int tag, char **data) throw ()
 Returns the length of the field value. More...
 
int getTagLengthAtIndex (int tagIndex) const throw ()
 Returns the field value length by the index or NOTFOUND. More...
 
int getTagNumAtIndex (int tagIndex) const
 Returns the field tag by the index. More...
 
int getTagOccurrenceCount (int tag) const
 Returns the number of fields with the given tag in the message. More...
 
int getTagOccurrenceIndex (int tag, int occurrence) const
 Returns the field index of the Nth tag. More...
 
Engine::AsciiString getTargetCompID () const FLATTEN
 Returns the message target. More...
 
Engine::FIXVersion getVer () const throw ()
 Returns the version of the message. More...
 
bool hasFlag (int tag) const FLATTEN
 Returns true if the message contains the boolean field with 'true' value. More...
 
bool hasFlagi (int tag) const FLATTEN
 Returns true if the message contains the boolean field with 'true' value. More...
 
bool hasTag (int tag) const FLATTEN
 Returns true if the message contains the field. More...
 
bool hasValue (int tag) const FLATTEN
 Returns true if the field contains a value. More...
 
std::string i2str (int i) const throw ()
 
void indexGarbageCollect ()
 
void init (int fields)
 The message constructor. More...
 
void init (int new_index_length, int new_hashtbl_length)
 The message constructor. More...
 
void invalidatePerFieldStorage (int tagIndex)
 
void invalidatePerFieldStorage (Utils::RawBuffer **perFieldStoragePtr)
 
bool isAdministrativeMsg () const FLATTEN throw ()
 Returns true if the message is administrative. More...
 
bool isArenaStorage (int i) const throw ()
 
bool isBusinessMsgRejectMsg () const FLATTEN throw ()
 Returns true if the message is business reject. More...
 
bool isEmpty (int tag) const FLATTEN
 Returns true if the field is empty/doesn't exist. More...
 
bool isEqual (int tag, Engine::TagValue const *rv, int rvTag) const
 Compares fields in the message and in the other TagValue. More...
 
bool isExcludeTag (int tag, int *tags, int tags_length)
 
bool isFull () const throw ()
 Returns true if the message contains maximum number of fields so the next addition will require the message rebuilding. More...
 
virtual bool isLiteMessage () const
 Returns true if actual type of the message instance is LiteFixMessage. More...
 
bool isMessageBufferContinuous () const
 Returns true if the message buffer is continuous. More...
 
bool isOriginal () const FLATTEN
 Returns true if the message is not duplicate. More...
 
bool isOriginalMessageStorage (int i) const throw ()
 
bool isPerFieldStorage (int i) const throw ()
 
bool isPreparedMessage () const throw ()
 
bool isRemoved (int index_offset) const throw ()
 
bool isSessionLevelRejectMsg () const FLATTEN throw ()
 Returns true if the message is session reject. More...
 
bool isSupported (int tag) const throw ()
 Returns true if the tag is supported in the message. More...
 
bool isTagExistsAtIndex (int tagIndex) const FLATTEN throw ()
 Returns true if the field exists by the given index otherwise false. More...
 
 LiteFixMessage ()
 Creates an empty message. More...
 
 LiteFixMessage (int initialFieldCount)
 Creates an empty message with custom initial message capacity of fields. More...
 
void makeStandalone ()
 Makes the message independent of the external message buffer. More...
 
void move_and_wipe (Utils::RawBuffer **dst, Utils::RawBuffer **src, int count, int &hashtbl_remain_capacity)
 
Utils::RawBuffernewPerFieldStorage () const
 
Utils::RawBuffernewStorageForEntry (int tagIndex, int length)
 
void parse (const char *message, int messageLength, bool clearTheMessageBeforeUse=true, bool makeStandalone=false, Engine::FIXTagVisitor *callback=NULL) FLATTEN
 Parses the input buffer and fills the existing LiteFixMessage with tags. More...
 
void parse (const char *message)
 Parses the ASCIIz string and fills the existing LiteFixMessage with tags. More...
 
void parse (const std::string &message)
 Parses the string and fills the existing LiteFixMessage with tags. More...
 
int parseSome (const char *buf, int len, int *offset, bool clearTheMessageBeforeUse, bool isMakeStandalone, Engine::FIXTagVisitor *callback, ParseError &error)
 Parses one message from the input buffer and fills the existing LiteFixMessage with tags. More...
 
int perFieldStorage_length () const
 Returns the message capacity of fields. More...
 
int perFieldStorage_length (int index_length) const
 
void prepareContinuousBuffer ()
 Prepares an independent continuous message buffer. More...
 
bool prepareCopyInPlace (int i, int oldLen, int length) const throw ()
 
int prepareToAddToStorage (int tag, int length)
 
Engine::ProtocolID protocolID () const throw ()
 Returns the ProtocolID of the message. More...
 
void rehashHashtable (bool clearTable)
 
virtual void release () const B2B_OVERRIDE
 Destroys the message. More...
 
virtual void release () B2B_OVERRIDE
 Releases FIX message instance. More...
 
bool remove (int tag) FLATTEN
 Removes the field from the message. More...
 
void remove (const std::set< int > &tags) FLATTEN
 Removes fields from the message by the tags. More...
 
bool removeTag (int tag)
 Removes the field from the message. More...
 
void removeTagAtIndex (int i)
 Removes the field from the message. More...
 
void removeTags (const int *tags, int count)
 Removes fields from the message. More...
 
virtual void reserve (int tag, Engine::PreparedFieldIndex index, std::size_t size) B2B_OVERRIDE
 not implemented More...
 
bool reserveBytes (int size)
 
const char * serializeWithExisitingHeaderAndTrailer (Utils::RawBuffer &buf, int *size, bool tryReuseExistingBuffer) FLATTEN
 
void set (int tag, const char *value, int length) FLATTEN
 Inserts or updates the existing field in the message. More...
 
bool set (int tag, Engine::FIXFieldValue const &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, Engine::AsciiString value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, const ShortStrRef &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, const ShortStrRefCtor &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
template<int StringLength>
bool set (int tag, const ShortStr< StringLength > &value)
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, char const *value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, const std::string &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, Engine::MonthYear value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, Engine::LocalMktDate value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, Engine::UTCDateOnly value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, Engine::UTCTimeOnly value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, Engine::UTCTimestamp value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, System::i32 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, System::u32 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, System::i64 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, System::u64 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, double value) FLATTEN
 Inserts or updates the existing field in the message. More...
 
bool set (int tag, Engine::Decimal value) FLATTEN
 Inserts or updates the existing field in the message. More...
 
bool set (int tag, Engine::ByteArray value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, char value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, bool value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, const Engine::MultipleString &value)
 Inserts or updates the field value by the tag. More...
 
bool set (int tag, const Engine::MultipleChar &value)
 Inserts or updates the field value by the tag. More...
 
void set_double (int tag, double value)
 Inserts or updates the existing field in the message. More...
 
void setAtIndex (int tagIndex, System::i64 value) FLATTEN
 Updates the field value. More...
 
void setAtIndex (int tagIndex, double value)
 Updates the field value. More...
 
void setAtIndex (int tagIndex, const char *value, int length) FLATTEN
 Updates the field value. More...
 
void setBuffer (char *buf, int length) throw ()
 
bool setHeartBeatInterval (int hbi) FLATTEN
 Sets the heartbeat interval. More...
 
bool seti (int tag, Engine::FIXFieldValue const &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, const Engine::AsciiString &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, char const *value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, const std::string &value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, Engine::UTCTimestamp value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, System::i32 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, System::u32 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, System::u64 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, System::i64 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, double value) FLATTEN
 Inserts or updates the existing field in the message. More...
 
bool seti (int tag, char value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool seti (int tag, bool value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
void setIsPreparedMessage (bool isPreparedMessage) throw ()
 
void setMaxAvailInPlace (int i, int length) throw ()
 
bool setNoPadding (int tag, System::u64 value) FLATTEN
 Inserts or updates the field value by the tag. More...
 
bool setOrClear (int tag, const Engine::AsciiString &value) FLATTEN
 Sets a new value to the field or removes the field if the value is empty. More...
 
bool setOrClear (int tag, const std::string &value) FLATTEN
 Sets a new value to the field or removes the field if the value is empty. More...
 
void setSenderCompID (Engine::AsciiString senderCompID) FLATTEN
 Sets the message sender. More...
 
void setSenderCompIDi (Engine::AsciiString senderCompID) FLATTEN
 Sets the message sender. More...
 
bool setSeqNum (int msgSeqNum) FLATTEN
 Sets the message sequence number. More...
 
void setTagAtIndex (int tagIndex, const char *value, int length) FLATTEN
 Sets the field value by the index. More...
 
void setTagLength (int tag, int newPadWidth)
 Sets the new length of the existing field value. More...
 
void setTargetCompID (Engine::AsciiString targetCompID) FLATTEN
 Sets the message target. More...
 
void setTargetCompIDi (Engine::AsciiString targetCompID) FLATTEN
 Sets the message target. More...
 
bool tagExists (int tag) const FLATTEN throw ()
 Returns true if the tag is found in the message. More...
 
void throwParserError (const char *reason, int tag=0)
 
int toByteArrayAndReturnNextPosition (char *dst, int i, int tagIndex) const FLATTEN
 
int toByteArrayAndReturnNextPosition (char *dst, int offset) const FLATTEN
 
int toByteArrayAndReturnNextPosition (char *dst, int offset, int *excludedFields, int excludedFields_length) FLATTEN
 
const char * toRaw (Utils::RawBuffer &buf, int *size, bool tryReuseExistingBuffer, bool doSelfCheck=true) const FLATTEN
 Serializes the message. More...
 
const char * toRaw (Engine::SecurityAttributes *sa, int *size) const FLATTEN
 Serializes the message. More...
 
const char * toRaw (int *size, bool tryReuseExistingBuffer) const FLATTEN
 Serializes the message. More...
 
const char * toRaw (int *size) const FLATTEN
 Serializes the message. More...
 
const char * toRaw (Engine::SecurityAttributes *sa, Utils::RawBuffer *rawFixMsg, int *size) const FLATTEN
 Serializes the message. More...
 
const char * toRaw (Engine::SecurityAttributes *sa, Utils::RawBuffer *rawFixMsg, int *size, bool calculateCRC) const FLATTEN
 Serializes the message. More...
 
const char * toRaw (Utils::RawBuffer *rawFixMsg, int *size) const
 Serializes the message. More...
 
const std::string * toString (char substChar) const
 Serializes the message to the internal string. More...
 
Engine::AsciiString type () const FLATTEN throw ()
 Returns the message type. More...
 
void updateCheckSum (char *byteArray, int length)
 
void updateCheckSum ()
 Updates the checksum in the original message buffer. More...
 
bool updateValue (int tag, const char *value, int length, MISSING_TAG_HANDLING addIfNotExists) FLATTEN
 
bool updateValue (int tag, const char *value, int length) FLATTEN
 
bool updateValue (int tag, System::i64 value, MISSING_TAG_HANDLING addIfNotExists) FLATTEN
 
bool updateValue (int tag, System::i64 value) FLATTEN
 
void updateValueAtIndex (int tagIndex, const char *value, int length) FLATTEN
 
void updateValueAtIndex (int tagIndex, System::i64 value)
 
void updateValueAtIndexNoPadding (int tagIndex, System::i64 value)
 
bool updateValueNoPadding (int tag, System::i64 value) FLATTEN
 
void visit (Engine::FIXTagVisitor *callback)
 Invokes the visitor callback for all fields in the message. More...
 
int whichTagAtIndex (int tagIndex) const
 Returns the field tag by the index. More...
 
virtual void write (int tag, std::ostream &stream) const B2B_OVERRIDE
 not implemented More...
 
 ~LiteFixMessage ()
 The message destructor. More...
 
- Public Member Functions inherited from Engine::FIXMessage
virtual FIXMessageExextend () throw ()
 Returns extended interface of FIXMessage. More...
 
virtual FIXMessageEx const * extend () const throw ()
 Returns extended interface of FIXMessage. More...
 
 FIXMessage ()
 Constructor. 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...
 
System::u64 getNanosTimestamp ()
 Returns timestamp in nanoseconds set up to the message instance. More...
 
System::u64 getUserData2 () const
 Returns user data attached to the message instance. More...
 
System::u64getUserData2Ptr ()
 Returns pointer to user data attached to the message instance. More...
 
void operator delete (void *obj)
 Overloaded delete operator. More...
 
void * operator new (std::size_t size)
 Overloaded new operator. More...
 
void setElem (Engine::FIXMessageElem *elem)
 Sets pointer to owner. More...
 
void setElem (Engine::MsgPipeElem *elem)
 Sets pointer to owner. More...
 
void setNanosTimestamp (System::u64 timestampNanos)
 Sets timestamp in nanoseconds to the message instance. More...
 
void setSender (const std::string &senderCompID)
 Sets user data associated with the message, the data is stored on disk together with the message and will be available even after an application restart. More...
 
void setTarget (const std::string &targetCompID)
 Returns the TargetCompID field. More...
 
void setUserData2 (System::u64 userData)
 Attaches the user data to the message instance. More...
 
virtual const char * toRaw (SecurityAttributes *sa, Utils::RawBuffer *rawFixMsg, int *size) const =0
 Serializes message. More...
 
virtual const char * toRaw (SecurityAttributes *sa, Utils::RawBuffer *rawFixMsg, int *size, bool calculateCRC) const =0
 Serializes message. More...
 
virtual ~FIXMessage ()
 Destructor. More...
 
- Public Member Functions inherited from Engine::TagValue
FIXGroupgetAsGroup (int tag)
 Returns the repeating group instance found by the leading field tag number. More...
 
FIXGroup const & getAsGroup (int tag) const
 Returns the repeating group instance found by the leading field tag number. 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...
 
bool hasValue (int tag) const
 Returns true if value is defined; false otherwise. More...
 
bool set (int tag, char const *value)
 Updates field value by tag number. More...
 
 TagValue ()
 Constructor. More...
 
- Public Member Functions inherited from Engine::FIXMessageEx
 FIXMessageEx ()
 The constructor. More...
 
System::u64 generateNewGlobalId ()
 Generates the new globalMsgID for the message. More...
 
void generateNewGlobalIdBeforeSend ()
 Generates a new globalMsgID for the message before message is sent. More...
 
bool V12_API getBinaryData (const char *&buffer, size_t &dataSize) const
 This function can be used to get original binary data of the message if it is applicable for the message and session in context. More...
 
const PersistentDatagetPersistentData () const
 Returns the persistent data from the message. More...
 
PersistentDatagetPersistentData ()
 Returns the persistent data from the message. More...
 
const PersistentUserDatagetPersistentUserData () const
 Returns the user part of the persistent data from the message. More...
 
PersistentUserDatagetPersistentUserData ()
 Returns the user part of the persistent data from the message. More...
 
System::u64 getTimestamp ()
 Returns the sending/receiving timestamp. More...
 
void * getUserData () const
 Returns user data attached to the message instance. More...
 
bool isFromGapQueue () const
 Checks whether the message is from gap(out-of-sequence) queue. More...
 
bool needNewGlobIDBeforeSend ()
 Returns true if the message is configured to generate a new globalMsgID for the message before the message is sent. More...
 
void setNeedNewGlobIDBeforeSend (bool enable)
 Configures the message to generate a new globalMsgID for the message before the message is sent or to skip the generation. More...
 
const void setPersistentData (const PersistentData &persistentData)
 Sets the persistent data to the message. More...
 
void setPersistentUserData (const PersistentUserData &userData)
 Sets the user part of the persistent data to the message. More...
 
void setTimestamp (System::u64 timestampUsec)
 Sets the sending/receiving timestamp. More...
 
void setUserData (void *userData)
 Attaches the user data to the message instance. More...
 

Static Public Member Functions

static int formatInt (System::i64 value, char *buffer) throw ()
 
static int formatIntLengthWithPadding (System::i64 value, int padLength) throw ()
 
static int formatIntWithPadding (System::i64 value, int padLength, char *buffer) throw ()
 
static int formatUIntWithPadding (System::u64 value, int padLength, char *buffer) throw ()
 
static bool parseBoolean (const char *buffer, int count)
 
static bool parseBoolean_nothrow (const char *buffer, int count) throw ()
 
static double parseFloat (const char *buffer, int count)
 
static System::i64 parseInt (const char *buffer, int count)
 
static bool parseInt (const char *buffer, int count, System::i64 *valueRet) throw ()
 
- Static Public Member Functions inherited from Engine::FIXMessage
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...
 
- Static Public Member Functions inherited from Engine::FIXMessageEx
static System::u64 getCurrGlobalMsgId ()
 Returns the last generated GlobalMsgId. More...
 
static void seedGlobalMsgId (System::u64 globalMsgId)
 Initializes the global GlobalMsgId generator with the new start value. More...
 

Public Attributes

Utils::RawBuffer arenaStorage
 
short fieldCount
 
bool hasAdjustedTags_ = false
 
hashtbl_elem_thashtbl
 
hashtbl_elem_thashtbl_index
 
short hashtbl_length
 
short hashtblElems
 
index_elem_tindex
 
index_flags_tindex_flags
 
short index_length
 
index_tagloc_tindex_tagloc
 
char * origBuffer
 
short origBufLength
 
Utils::RawBuffer ** perFieldStorage
 
Utils::RawBuffer rawFixMsg_
 
std::string stringMsg_
 
- Public Attributes inherited from Engine::FIXMessage
union {
   FIXMessageElem *   elem1
 Pointer to owner if owner is FIXMessageElem. More...
 
   MsgPipeElem *   elem2
 Pointer to owner if owner is MsgPipeElem. More...
 
}; 
 Pointer to owner. More...
 
struct {
   char   isElemType1_:1
 if owner is FIXMessageElem flag More...
 
}; 
 flags bitfields struct More...
 
System::u64 timestampNanos_
 Timestamp in nanoseconds field. More...
 
System::u64 userData2_
 User data field. More...
 
- Public Attributes inherited from Engine::FIXMessageEx
EngineTagDataengineTagData_
 This data field is used by the engine internaly, don't process or use it!. More...
 
bool isFromGapQueue_
 Flag indicating whatever this message is from gap(out-of-sequence) queue. More...
 
uint64_t measuredLatency_
 This data field is used to measure latency. More...
 
bool needNewGlobIDBeforeSend_
 The Generate-a-new-globalMsgID flag. More...
 
PersistentData persistentData_
 The persistent data assigned to the message instance. More...
 
System::u64 timestampNanos_
 The sending/receiving timestamp. More...
 
void * userData_
 The user data field. More...
 

Static Public Attributes

static const int ARENA_STORAGE_INITIAL_SIZE = 3 * 1024
 
static const int ENLARGE_TABLES_BY_RATIO = 3
 
static const char FIELD_SEPARATOR = '\001'
 
static const int FLAG_ALL_STORAGE_BITS = (FLAG_ORIGBUF_STORAGE | FLAG_ARENA_STORAGE | FLAG_PERFIELD_STORAGE | FLAG_ORIGBUF_BREAK)
 
static const int FLAG_ARENA_STORAGE = 2
 
static const int FLAG_MAX_AVAIL_INPLACE = 8
 
static const int FLAG_MAX_AVAIL_INPLACE_MASK = 0x7fc0
 
static const int FLAG_MAX_AVAIL_INPLACE_MAX = (0x7fff >> FLAG_MAX_AVAIL_INPLACE_SHIFT)
 
static const int FLAG_MAX_AVAIL_INPLACE_SHIFT = 6
 
static const int FLAG_ORIGBUF_BREAK = 16
 
static const int FLAG_ORIGBUF_STORAGE = 1
 
static const int FLAG_PERFIELD_STORAGE = 4
 
static const int FLAG_STORAGE_TYPE_BITS = (FLAG_ORIGBUF_STORAGE | FLAG_ARENA_STORAGE | FLAG_PERFIELD_STORAGE)
 
static const int HASHTABLE_REDUNDANCY = 2
 
static const int HASHTBL_REMOVED_TAG = -1
 
static const int INDEX_REMOVED_TAG = 0
 
static const int INIT_MAXFIELDS = 64
 
static const char isPreparedMessage_ = 1
 
static const int MAX_ALLOWED_TAG_NUMBER = 65535
 
static const int MAX_BYTES_IN_ARENA_STORAGE = ARENA_STORAGE_INITIAL_SIZE
 
static const int MAX_FIELD_COUNT = 32767
 
static const int MAX_HASHTBL_LENGTH = 32767
 
static const int MAX_INDEX_LENGTH = 32767
 
static const int MAX_MESSAGE_LENGTH = 32767
 
static const int NOTFOUND = -1
 
static const int PERFIELD_STORAGE_INITIAL_SIZE = 32
 
static const int SERIALIZATION_BUFFER_INITIAL_SIZE = 512
 

Additional Inherited Members

- Protected Member Functions inherited from Engine::TagValue
virtual ~TagValue ()
 Destructor. More...
 

Detailed Description

Lightweight FIX message.

Member Typedef Documentation

typedef unsigned short Parser::LiteFixMessage::index_elem_t
typedef unsigned short Parser::LiteFixMessage::index_flags_t

Member Enumeration Documentation

Enumerator
ADD_IF_NOT_EXISTS 
ALWAYS_ADD 
DONT_ADD_IF_NOT_EXISTS 

Constructor & Destructor Documentation

Parser::LiteFixMessage::LiteFixMessage ( )

Creates an empty message.

Parser::LiteFixMessage::LiteFixMessage ( int  initialFieldCount)

Creates an empty message with custom initial message capacity of fields.

Parameters
initialFieldCountinitial message capacity of fields, 0 means default
Parser::LiteFixMessage::~LiteFixMessage ( )

The message destructor.

Member Function Documentation

void Parser::LiteFixMessage::_add ( int  tag,
int  offset,
int  length 
)
inline
void Parser::LiteFixMessage::_clear ( )
void Parser::LiteFixMessage::_ensureIndexCapacity ( )
void Parser::LiteFixMessage::add ( int  tag,
const char *  value,
int  length 
)
inline
void Parser::LiteFixMessage::add ( int  tag,
const Engine::AsciiString value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
System::i64  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
int  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
unsigned  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
System::u64  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
char  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
double  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
const char *  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::add ( int  tag,
const ShortStrRef value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field

References ShortStrRef::data_, and ShortStrRef::length_.

void Parser::LiteFixMessage::add ( int  tag,
const ShortStrRefCtor value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field

References ShortStrRefCtor::data_, and ShortStrRefCtor::length_.

template<int StringLength>
void Parser::LiteFixMessage::add ( int  tag,
const ShortStr< StringLength > &  value 
)
inline

Appends the field to the message, makes the field searchable by the tag if this is the first field with such tag value in the message.

Parameters
tagthe tag of the field
valuethe value of the field

References ShortStr< StringLength >::data_, and ShortStr< StringLength >::length_.

void Parser::LiteFixMessage::addToHashTbl ( int  tag,
int  index 
)
throw (
)
inline
void* Parser::LiteFixMessage::allocateBytes ( int  size)
void Parser::LiteFixMessage::allocTableData ( int  new_index_length,
int  new_hashtbl_length,
bool  freeOldData 
)
inline
int Parser::LiteFixMessage::calculateBodyLength ( )
inline

Returns the message body length.

void Parser::LiteFixMessage::checkFields ( ) const
inlinevirtual

not implemented

Implements Engine::FIXMessage.

void Parser::LiteFixMessage::checkRequired ( Parser::Options  options) const
inlinevirtual

not implemented

Implements Engine::FIXMessage.

void Parser::LiteFixMessage::checkTagExistsAtIndex ( int  tagIndex) const
inline

Ensures that the field exists by the given index.

Parameters
tagIndexthe index of the field
Exceptions
Utils::Exceptionif the field doesn't exist

References Utils::i2str().

void Parser::LiteFixMessage::clear ( )
void Parser::LiteFixMessage::clearHashTbl ( )
inline
void Parser::LiteFixMessage::clearPerFieldStorage ( )
inline
Parser::LiteFixMessage* Parser::LiteFixMessage::cloneMessage ( ) const
virtual

Makes an independent copy of the message.

Note
the destination message will be created on the heap
Returns
the cloned message

Implements Engine::FIXMessage.

Referenced by fix_algo::reorderSMHForMiax().

void Parser::LiteFixMessage::cloneMessage ( Engine::FIXMessage target) const

Makes an independent copy of the message.

Parameters
targetthe destination message to clone to, must be a LiteFixMessage
virtual void Parser::LiteFixMessage::copyTo ( Engine::TagValue dest,
int  destTag,
int  srcTag 
) const
virtual

not implemented

Implements Engine::TagValue.

LiteFixMessage* Parser::LiteFixMessage::deepClone ( LiteFixMessage cloned = NULL) const
inline

Makes an independent copy of the message.

Parameters
clonedthe optional parameter for the destination message to clone to, if NULL, the destination message will be created on the heap
Returns
the cloned message
void Parser::LiteFixMessage::destroy ( )

The message destructor.

bool Parser::LiteFixMessage::empty ( ) const
inline

Returns true if the message is empty.

void Parser::LiteFixMessage::ensureIndexCapacity ( )
inline

Makes the message ready to add a new field or throw if it is failed.

virtual Engine::TagValueEx* Parser::LiteFixMessage::extendTV ( )
throw (
)
virtual

not implemented

Implements Engine::TagValue.

virtual Engine::TagValueEx const* Parser::LiteFixMessage::extendTV ( ) const
throw (
)
virtual

not implemented

Implements Engine::TagValue.

int Parser::LiteFixMessage::findElementInHashTbl ( int  tag) const
throw (
)
inline
int Parser::LiteFixMessage::findIndexEntryInHashTbl ( int  tag) const
throw (
)
inline
int Parser::LiteFixMessage::findOrPrepareToAdd ( int  tag,
enum MISSING_TAG_HANDLING  addIfNotExists 
)
inline
int Parser::LiteFixMessage::findOrPrepareToAdd ( int  tag)
inline
static int Parser::LiteFixMessage::formatInt ( System::i64  value,
char *  buffer 
)
throw (
)
inlinestatic
int Parser::LiteFixMessage::formatIntLength ( System::i64  value)
inline
static int Parser::LiteFixMessage::formatIntLengthWithPadding ( System::i64  value,
int  padLength 
)
throw (
)
inlinestatic
static int Parser::LiteFixMessage::formatIntWithPadding ( System::i64  value,
int  padLength,
char *  buffer 
)
throw (
)
inlinestatic
static int Parser::LiteFixMessage::formatUIntWithPadding ( System::u64  value,
int  padLength,
char *  buffer 
)
throw (
)
inlinestatic
bool Parser::LiteFixMessage::get ( int  tag,
char **  data,
int *  length 
) const
throw (
)
inline
bool Parser::LiteFixMessage::get ( int  tag,
char **  data,
short *  length 
) const
throw (
)
inline

Reads the field value by the tag.

Parameters
tagthe tag of the field
[out]datathe value of the field
[out]lengththe length of the value
Returns
true if the field is found otherwise false
bool Parser::LiteFixMessage::get ( int  tag,
const char **  data,
short *  length 
) const
throw (
)
inline

Reads the field value by the tag.

Parameters
tagthe tag of the field
[out]datathe value of the field
[out]lengththe length of the value
Returns
true if the field is found otherwise false
bool Parser::LiteFixMessage::get ( int  tag,
const char **  data,
int *  length 
) const
throw (
)
inline

Reads the field value by the tag.

Parameters
tagthe tag of the field
[out]datathe value of the field
[out]lengththe length of the value
Returns
true if the field is found otherwise false
bool Parser::LiteFixMessage::get ( int  tag,
Engine::FIXFieldValue value 
) const
inlinevirtual

Reads the field value by the tag.

Parameters
tagthe tag of the field
[out]valuethe value of the field
Returns
true if the field is found otherwise false

Implements Engine::TagValue.

Engine::AsciiString Parser::LiteFixMessage::get ( int  tag) const
inline

Returns the field value by the tag as AsciiString.

Engine::FIXVersion Parser::LiteFixMessage::getApplicationVersion ( ) const
throw (
)
inlinevirtual

Returns the application version of the message.

Implements Engine::FIXMessage.

bool Parser::LiteFixMessage::getAsBoolean ( int  tag) const
inlinevirtual

Returns the field value as boolean by the tag.

Parameters
tagthe tag of the field
Exceptions
Utils::Exceptionif the field is not found or is not a boolean

Implements Engine::TagValue.

Referenced by fix_algo::getGTCPersistedProps().

char Parser::LiteFixMessage::getAsChar ( int  tag) const
inlinevirtual

Returns the field value as char by the tag.

Implements Engine::TagValue.

Referenced by fix_algo::CmiFixConverter::convertAppMsgToBinary(), and fix_algo::mapPriceToCmi().

Engine::UTCDateOnly Parser::LiteFixMessage::getAsDateOnly ( int  tag) const
inlinevirtual

Returns the field value by the tag as UTCDateOnly.

Implements Engine::TagValue.

References Engine::UTCDateOnly::fromFixString().

Engine::Decimal Parser::LiteFixMessage::getAsDecimal ( int  tag) const
inlinevirtual

not implemented

Implements Engine::TagValue.

double Parser::LiteFixMessage::getAsDouble ( int  tag) const
inlinevirtual

Returns the field value as double by the tag.

Implements Engine::TagValue.

int Parser::LiteFixMessage::getAsInt ( int  tag) const
inlinevirtual

Returns the field value as int by the tag.

Implements Engine::TagValue.

References fix_algo::getTagAsInt().

System::i32 Parser::LiteFixMessage::getAsInt32 ( int  tag) const
inlinevirtual

Returns the field value as Int32 by the tag.

Implements Engine::TagValue.

References fix_algo::getTagAsInt().

System::i64 Parser::LiteFixMessage::getAsInt64 ( int  tag) const
inlinevirtual

Returns the field value as Int64 by the tag.

Implements Engine::TagValue.

References fix_algo::getTagAsInt().

int Parser::LiteFixMessage::getAsInteger ( int  tag) const
inline

Returns the field value as int by the tag.

References fix_algo::getTagAsInt().

System::i64 Parser::LiteFixMessage::getAsInteger64 ( int  tag) const
inline

Returns the field value as Int64 by the tag.

References fix_algo::getTagAsInt().

Engine::LocalMktDate Parser::LiteFixMessage::getAsLocalMktDate ( int  tag) const
inlinevirtual

Returns the field value by the tag as LocalMktDate.

Implements Engine::TagValue.

References Engine::LocalMktDate::fromFixString().

Engine::MonthYear Parser::LiteFixMessage::getAsMonthYear ( int  tag) const
inlinevirtual

Returns the field value by the tag as MonthYear.

Implements Engine::TagValue.

References Engine::MonthYear::fromFixString().

Engine::MultipleChar Parser::LiteFixMessage::getAsMultipleChar ( int  tag) const
virtual

Returns the field value by the tag as MultipleChar.

Implements Engine::TagValue.

Engine::MultipleString Parser::LiteFixMessage::getAsMultipleString ( int  tag) const
virtual

Returns the field value by the tag as MultipleString.

Implements Engine::TagValue.

Engine::ByteArray Parser::LiteFixMessage::getAsRaw ( int  tag) const
inlinevirtual

Returns the field value by the tag as ByteArray.

Implements Engine::TagValue.

Engine::AsciiString Parser::LiteFixMessage::getAsString ( int  tag) const
inlinevirtual
Engine::AsciiString Parser::LiteFixMessage::getAsStringValueOrEmpty ( int  tag) const
throw (
)
inline

Returns the field value by the tag as AsciiString.

Referenced by ILink3V5::createMessage(), ILink3V7::createMessage(), and ILink3::createMessage().

Engine::UTCTimeOnly Parser::LiteFixMessage::getAsTimeOnly ( int  tag) const
inlinevirtual

Returns the field value by the tag as UTCTimeOnly.

Implements Engine::TagValue.

References Engine::UTCTimeOnly::fromFixString().

Engine::UTCTimestamp Parser::LiteFixMessage::getAsTimestamp ( int  tag) const
inlinevirtual

Returns the field value by the tag as UTCTimestamp.

Implements Engine::TagValue.

References Engine::UTCTimestamp::fromFixString().

Referenced by CMI::convertSessionLevelMsgToBinary(), CMI::convertToHeartbeat(), and fix_algo::mapTransactTimeToCmi().

Engine::UTCTimestamp Parser::LiteFixMessage::getAsTimestampi ( int  tag) const
inline

Returns the field value by the tag as UTCTimestamp.

References Engine::UTCTimestamp::fromFixString().

unsigned int Parser::LiteFixMessage::getAsUInt ( int  tag) const
inlinevirtual

Returns the field value by the tag as UInt or throws the Utils::Exception.

Implements Engine::TagValue.

References fix_algo::getTagAsInt().

System::u32 Parser::LiteFixMessage::getAsUInt32 ( int  tag) const
inlinevirtual
System::u64 Parser::LiteFixMessage::getAsUInt64 ( int  tag) const
inlinevirtual

Returns the field value as UInt64 by the tag.

Implements Engine::TagValue.

References fix_algo::getTagAsInt().

Referenced by fix_algo::getGTCPersistedProps().

virtual const char* Parser::LiteFixMessage::getBuffer ( int *  size,
Engine::SecurityAttributes *  sa = NULL 
) const
virtual
const char* Parser::LiteFixMessage::getBuffer ( Utils::RawBuffer rawFixMsg,
int *  size,
bool  calcCsum 
)
unsigned Parser::LiteFixMessage::getChecksum ( char *  bytes,
int  length 
)
inline
virtual Engine::FixFieldsContainer* Parser::LiteFixMessage::getFields ( ) const
virtual

not implemented

Implements Engine::TagValue.

char* Parser::LiteFixMessage::getFieldStorage ( int  i) const
throw (
)
inline
char* Parser::LiteFixMessage::getFieldStorage_canthrow ( int  i) const
inline

References unlikely().

virtual Engine::FIXGroup const* Parser::LiteFixMessage::getGroup ( int  tag) const
virtual

not implemented

Implements Engine::TagValue.

virtual Engine::FIXGroup* Parser::LiteFixMessage::getGroup ( int  tag)
virtual

not implemented

Implements Engine::TagValue.

int Parser::LiteFixMessage::getHeartBeatInterval ( ) const
inlinevirtual

Returns the heartbeat interval.

Implements Engine::FIXMessage.

References FIXFields::HeartBtInt.

bool Parser::LiteFixMessage::geti ( int  tag,
Engine::FIXFieldValue value 
) const
inline

Reads the field value by the tag.

Parameters
tagthe tag of the field
[out]valuethe value of the field
Returns
true if the field is found otherwise false
int Parser::LiteFixMessage::getIndexCount ( ) const
throw (
)
inline

Returns the number of fields in the message (including removed fields)

Referenced by fix_algo::copyTagGroup(), and fix_algo::reorderSMHForMiax().

int Parser::LiteFixMessage::getLastTagIndex ( ) const
inline

Returns the field index of the last field.

int Parser::LiteFixMessage::getMaxAvailInPlace ( int  i) const
throw (
)
inline
char* Parser::LiteFixMessage::getMessageBuffer ( int *  size)
inline
const char* Parser::LiteFixMessage::getMessageBuffer ( int *  size) const
inline
char* Parser::LiteFixMessage::getOrigBuffer ( )
throw (
)
inline
const char* Parser::LiteFixMessage::getOrigBuffer ( ) const
throw (
)
inline
int Parser::LiteFixMessage::getOrigBufferLength ( ) const
throw (
)
inline
int Parser::LiteFixMessage::getRawLength ( ) const
inline
int Parser::LiteFixMessage::getRawTagLengthFromPreviousField ( )
bool Parser::LiteFixMessage::getRawTagLengthFromPreviousField ( const char *&  buf,
int  pos,
int  tag,
ParseError error 
)
Engine::AsciiString Parser::LiteFixMessage::getSenderCompID ( ) const
inlinevirtual

Returns the message sender.

Implements Engine::FIXMessage.

References FIXFields::SenderCompID.

int Parser::LiteFixMessage::getSeqNum ( ) const
inlinevirtual

Returns the sequence number of the message.

Implements Engine::FIXMessage.

References FIXFields::MsgSeqNum.

Engine::FIXVersion Parser::LiteFixMessage::getSessionVersion ( ) const
throw (
)
inlinevirtual

Returns the session version of the message.

Implements Engine::FIXMessage.

References Engine::FIX42.

void Parser::LiteFixMessage::getTag_canthrow ( int  tag,
char **  data,
int *  length 
) const
inline

Reads the field value by the tag.

Parameters
tagthe tag of the field
[out]datathe value of the field
[out]lengththe length of the value
Exceptions
Utils::Exceptionif the field is not found

References Utils::i2str().

bool Parser::LiteFixMessage::getTagAsBool ( int  tag) const
inline

Returns the field value as boolean by the tag.

Parameters
tagthe tag of the field
Exceptions
Utils::Exceptionif the field is not found or is not a boolean

References Utils::i2str().

bool Parser::LiteFixMessage::getTagAsBool ( int  tag,
int  occurrence 
) const
inline

Returns the field value of the Nth tag as boolean.

Parameters
tagthe tag of the field
occurrencethe position of the field in the sequence of fields with the given tag
Exceptions
Utils::Exceptionif the field is not found or is not a boolean

References Utils::i2str().

bool Parser::LiteFixMessage::getTagAsBool_nothrow ( int  tag,
bool *  value 
) const
throw (
)
inline

Reads the field value as boolean by the tag.

Parameters
tagthe tag of the field
Returns
true if succeeded

References unlikely().

bool Parser::LiteFixMessage::getTagAsBoolAtIndex ( int  tagIndex) const
inline

Returns the field value as boolean by the index.

Parameters
tagIndexthe index of the field
Exceptions
Utils::Exceptionif the field is not found or is not a boolean
double Parser::LiteFixMessage::getTagAsFloat ( int  tag) const
inline

Returns the field value as double by the tag.

Parameters
tagthe tag of the field
Exceptions
Utils::Exceptionif the field is not found or is not a number

References Utils::i2str().

double Parser::LiteFixMessage::getTagAsFloat ( int  tag,
int  occurrence 
) const
inline

Returns the field value of the Nth tag as double.

Parameters
tagthe tag of the field
occurrencethe position of the field in the sequence of fields with the given tag
Exceptions
Utils::Exceptionif the field is not found or is not a number

References Utils::i2str().

double Parser::LiteFixMessage::getTagAsFloatAtIndex ( int  tagIndex) const
inline

Returns the field value as double by the index.

Parameters
tagIndexthe index of the field
Exceptions
Utils::Exceptionif the field is not found or is not a number
System::i64 Parser::LiteFixMessage::getTagAsInt ( int  tag) const
inline

Returns the field value as System::i64 by the tag.

References Utils::i2str().

Referenced by fix_algo::mapERQtyToCmi(), and fix_algo::mapFillERQtyToCmi().

bool Parser::LiteFixMessage::getTagAsInt ( int  tag,
System::i64 value 
) const
throw (
)
inline

Reads the field value as System::i64.

Parameters
tagthe tag of the field
[out]valuethe field value
Returns
true if succeeded otherwise false

References unlikely().

bool Parser::LiteFixMessage::getTagAsInt ( int  tag,
int *  value 
) const
throw (
)
inline

Reads the field value as int.

Parameters
tagthe tag of the field
[out]valuethe field value
Returns
true if succeeded otherwise false

References unlikely().

bool Parser::LiteFixMessage::getTagAsInt ( int  tag,
System::i64 value,
int *  end 
) const
throw (
)
inline

References unlikely().

System::i64 Parser::LiteFixMessage::getTagAsIntAtIndex ( int  tagIndex) const
inline
bool Parser::LiteFixMessage::getTagAsIntAtIndex ( int  tagIndex,
System::i64 value 
) const
throw (
)
inline

Reads the field value as System::i64.

Parameters
tagIndexthe index of the field
[out]valuethe field value
Returns
true if succeeded otherwise false

References unlikely().

bool Parser::LiteFixMessage::getTagAsIntAtIndex ( int  tagIndex,
int *  value 
) const
throw (
)
inline

Reads the field value as int.

Parameters
tagIndexthe index of the field
[out]valuethe field value
Returns
true if succeeded otherwise false

References unlikely().

Engine::AsciiString Parser::LiteFixMessage::getTagAsString ( int  tag,
int  occurrence 
) const
inline

Returns the field value of the Nth tag as AsciiString or the empty string.

Parameters
tagthe tag of the field
occurrencethe position of the field in the sequence of fields with the given tag
Engine::AsciiString Parser::LiteFixMessage::getTagAsStringAtIndex ( int  tagIndex) const
throw (
)
inline
bool Parser::LiteFixMessage::getTagAtIndex ( int  tagIndex,
const char **  data,
int *  length 
) const
throw (
)
inline

Reads the field value by the index.

Parameters
tagIndexthe index of the field
[out]datathe value of the field
[out]lengththe length of the value
Returns
true if the field is found otherwise false

References unlikely().

Referenced by fix_algo::copyTag(), fix_algo::copyTagOrClear(), fix_algo::copyTagOrSetDef(), getPriceAtIndex(), and fix_algo::getTag().

bool Parser::LiteFixMessage::getTagAtIndex ( int  tagIndex,
int *  tag,
const char **  data,
int *  length 
) const
throw (
)
inline

Reads the field tag and the value by the index.

Parameters
tagIndexthe index of the field
[out]tagthe tag of the field
[out]datathe value of the field
[out]lengththe length of the value
Returns
true if the field is found otherwise false

References unlikely().

bool Parser::LiteFixMessage::getTagAtIndex ( int  tagIndex,
Engine::FIXFieldValue v 
) const
throw (
)
inline

Reads the field value by the index.

Parameters
tagIndexthe index of the field
[out]vthe value of the field
Returns
true if the field is found otherwise false

References unlikely().

int Parser::LiteFixMessage::getTagBytesLength ( int  tag) const
inline
int Parser::LiteFixMessage::getTagCount ( ) const
inline

Returns the number of the fields in the message.

int Parser::LiteFixMessage::getTagIndex ( int  tag) const
inline
int Parser::LiteFixMessage::getTagIndex ( int  tag,
int  fromIndex 
) const
inline

Returns the field index in the specified range by the tag or NOTFOUND.

Parameters
tagthe tag of the field
fromIndexthe lower bound of the index range (inclusive)
int Parser::LiteFixMessage::getTagIndex ( int  tag,
int  fromIndex,
int  toIndex 
) const
inline

Returns the field index in the specified range by the tag or NOTFOUND.

Parameters
tagthe tag of the field
fromIndexthe lower bound of the index range (inclusive)
toIndexthe upper bound of the index range (exclusive)
int Parser::LiteFixMessage::getTagLength ( int  tag) const
throw (
)
inline

Returns the length of the field value.

Referenced by fix_algo::reorderSMHForMiax().

int Parser::LiteFixMessage::getTagLength ( int  tag,
char **  data 
)
throw (
)
inline

Returns the length of the field value.

Parameters
tagthe tag of the field
[out]datathe value of the field
int Parser::LiteFixMessage::getTagLengthAtIndex ( int  tagIndex) const
throw (
)
inline

Returns the field value length by the index or NOTFOUND.

int Parser::LiteFixMessage::getTagNumAtIndex ( int  tagIndex) const
inline

Returns the field tag by the index.

int Parser::LiteFixMessage::getTagOccurrenceCount ( int  tag) const
inline

Returns the number of fields with the given tag in the message.

int Parser::LiteFixMessage::getTagOccurrenceIndex ( int  tag,
int  occurrence 
) const
inline

Returns the field index of the Nth tag.

Parameters
tagthe tag of the field
occurrencethe position of the field in the sequence of fields with the given tag

Referenced by fix_algo::CmiFixConverter::convertAppMsgToBinary(), ILink3V5::fixToField(), ILink3V7::fixToField(), and ILink3::fixToField().

Engine::AsciiString Parser::LiteFixMessage::getTargetCompID ( ) const
inlinevirtual

Returns the message target.

Implements Engine::FIXMessage.

References FIXFields::TargetCompID.

Engine::FIXVersion Parser::LiteFixMessage::getVer ( ) const
throw (
)
inlinevirtual

Returns the version of the message.

Implements Engine::FIXMessage.

bool Parser::LiteFixMessage::hasFlag ( int  tag) const
inlinevirtual

Returns true if the message contains the boolean field with 'true' value.

Parameters
tagthe tag of the field

Implements Engine::TagValue.

Referenced by fix_algo::mapReportTypeToCmi().

bool Parser::LiteFixMessage::hasFlagi ( int  tag) const
inline

Returns true if the message contains the boolean field with 'true' value.

Parameters
tagthe tag of the field
bool Parser::LiteFixMessage::hasTag ( int  tag) const
inline

Returns true if the message contains the field.

Parameters
tagthe tag of the field

Referenced by fix_algo::fill_reject(), fix_algo::fill_ucxl(), fix_algo::getGTCPersistedProps(), fix_algo::isDGF(), and fix_algo::reorderSMHForMiax().

bool Parser::LiteFixMessage::hasValue ( int  tag) const
inline

Returns true if the field contains a value.

Parameters
tagthe tag of the field

Referenced by fix_algo::fill_reply_8_complex(), fix_algo::fill_reply_8_cross(), and fix_algo::mapTransactTimeToCmi().

std::string Parser::LiteFixMessage::i2str ( int  i) const
throw (
)
inline
void Parser::LiteFixMessage::indexGarbageCollect ( )
void Parser::LiteFixMessage::init ( int  fields)

The message constructor.

Parameters
fieldsinitial message capacity of fields
void Parser::LiteFixMessage::init ( int  new_index_length,
int  new_hashtbl_length 
)
inline

The message constructor.

Parameters
new_index_lengthinitial message capacity of fields
new_hashtbl_lengthinitial message capacity of unique tags
void Parser::LiteFixMessage::invalidatePerFieldStorage ( int  tagIndex)
inline
void Parser::LiteFixMessage::invalidatePerFieldStorage ( Utils::RawBuffer **  perFieldStoragePtr)
inline
bool Parser::LiteFixMessage::isAdministrativeMsg ( ) const
throw (
)
inlinevirtual

Returns true if the message is administrative.

Implements Engine::FIXMessage.

bool Parser::LiteFixMessage::isArenaStorage ( int  i) const
throw (
)
inline
bool Parser::LiteFixMessage::isBusinessMsgRejectMsg ( ) const
throw (
)
inlinevirtual

Returns true if the message is business reject.

Implements Engine::FIXMessage.

bool Parser::LiteFixMessage::isEmpty ( int  tag) const
inlinevirtual

Returns true if the field is empty/doesn't exist.

Parameters
tagthe tag of the field

Implements Engine::TagValue.

bool Parser::LiteFixMessage::isEqual ( int  tag,
Engine::TagValue const *  rv,
int  rvTag 
) const
inlinevirtual

Compares fields in the message and in the other TagValue.

Returns
true if both fields are absent or equal

Implements Engine::TagValue.

References Engine::FIXFieldValue::data_, Engine::TagValue::get(), and Engine::FIXFieldValue::length_.

bool Parser::LiteFixMessage::isExcludeTag ( int  tag,
int *  tags,
int  tags_length 
)
inline
bool Parser::LiteFixMessage::isFull ( ) const
throw (
)
inline

Returns true if the message contains maximum number of fields so the next addition will require the message rebuilding.

virtual bool Parser::LiteFixMessage::isLiteMessage ( ) const
inlinevirtual

Returns true if actual type of the message instance is LiteFixMessage.

Reimplemented from Engine::FIXMessage.

bool Parser::LiteFixMessage::isMessageBufferContinuous ( ) const
inline

Returns true if the message buffer is continuous.

bool Parser::LiteFixMessage::isOriginal ( ) const
inlinevirtual

Returns true if the message is not duplicate.

Implements Engine::FIXMessage.

References FIXFields::PossDupFlag.

bool Parser::LiteFixMessage::isOriginalMessageStorage ( int  i) const
throw (
)
inline
bool Parser::LiteFixMessage::isPerFieldStorage ( int  i) const
throw (
)
inline
bool Parser::LiteFixMessage::isPreparedMessage ( ) const
throw (
)
inline
bool Parser::LiteFixMessage::isRemoved ( int  index_offset) const
throw (
)
inline
bool Parser::LiteFixMessage::isSessionLevelRejectMsg ( ) const
throw (
)
inlinevirtual

Returns true if the message is session reject.

Implements Engine::FIXMessage.

bool Parser::LiteFixMessage::isSupported ( int  tag) const
throw (
)
inlinevirtual

Returns true if the tag is supported in the message.

Implements Engine::TagValue.

bool Parser::LiteFixMessage::isTagExistsAtIndex ( int  tagIndex) const
throw (
)
inline

Returns true if the field exists by the given index otherwise false.

void Parser::LiteFixMessage::makeStandalone ( )

Makes the message independent of the external message buffer.

Referenced by RiskCommon::findMessageInSessionByGlobID(), fix_algo::toLiteMessage(), fix_algo::turnToLiteMessage(), and fix_algo::turnToLiteMessageGlob().

void Parser::LiteFixMessage::move_and_wipe ( Utils::RawBuffer **  dst,
Utils::RawBuffer **  src,
int  count,
int &  hashtbl_remain_capacity 
)
inline
Utils::RawBuffer* Parser::LiteFixMessage::newPerFieldStorage ( ) const
inline
Utils::RawBuffer* Parser::LiteFixMessage::newStorageForEntry ( int  tagIndex,
int  length 
)
void Parser::LiteFixMessage::parse ( const char *  message,
int  messageLength,
bool  clearTheMessageBeforeUse = true,
bool  makeStandalone = false,
Engine::FIXTagVisitor callback = NULL 
)

Parses the input buffer and fills the existing LiteFixMessage with tags.

Parameters
messagea pointer to the buffer
messageLengththe buffer size
clearTheMessageBeforeUseif true the message will be cleared before parsing
makeStandaloneif true the buffer will be copied to the internal storage otherwise links to the passed buffer will be kept
callbackFIXTagVisitor will be called for each parsed tag. Optional.

Referenced by RiskCommon::findMessageInSessionByGlobID(), fix_algo::toLiteMessage(), fix_algo::turnToLiteMessage(), and fix_algo::turnToLiteMessageGlob().

void Parser::LiteFixMessage::parse ( const char *  message)
inline

Parses the ASCIIz string and fills the existing LiteFixMessage with tags.

Parameters
amessage pointer to the string
Note
the message refers to the string as an external buffer, call makeStandalone() to make the message independent
void Parser::LiteFixMessage::parse ( const std::string &  message)
inline

Parses the string and fills the existing LiteFixMessage with tags.

Parameters
messagethe message string
Note
the message refers to the string as an external buffer, call makeStandalone() to make the message independent
static bool Parser::LiteFixMessage::parseBoolean ( const char *  buffer,
int  count 
)
inlinestatic
static bool Parser::LiteFixMessage::parseBoolean_nothrow ( const char *  buffer,
int  count 
)
throw (
)
inlinestatic
static double Parser::LiteFixMessage::parseFloat ( const char *  buffer,
int  count 
)
inlinestatic
static System::i64 Parser::LiteFixMessage::parseInt ( const char *  buffer,
int  count 
)
inlinestatic
static bool Parser::LiteFixMessage::parseInt ( const char *  buffer,
int  count,
System::i64 valueRet 
)
throw (
)
inlinestatic
int Parser::LiteFixMessage::parseSome ( const char *  buf,
int  len,
int *  offset,
bool  clearTheMessageBeforeUse,
bool  isMakeStandalone,
Engine::FIXTagVisitor callback,
ParseError error 
)

Parses one message from the input buffer and fills the existing LiteFixMessage with tags.

Parameters
bufa pointer to the buffer
lenthe buffer size
offset[out]the message start offset in the buffer
clearTheMessageBeforeUseif true the message will be cleared before parsing
isMakeStandaloneif true the buffer will be copied to the internal storage otherwise links to the passed buffer will be kept
callbackFIXTagVisitor will be called for each parsed tag. Optional.
error[out]the parse error description
Returns
the message size in the buffer
int Parser::LiteFixMessage::perFieldStorage_length ( ) const
inline

Returns the message capacity of fields.

int Parser::LiteFixMessage::perFieldStorage_length ( int  index_length) const
inline
void Parser::LiteFixMessage::prepareContinuousBuffer ( )

Prepares an independent continuous message buffer.

bool Parser::LiteFixMessage::prepareCopyInPlace ( int  i,
int  oldLen,
int  length 
) const
throw (
)
inline
int Parser::LiteFixMessage::prepareToAddToStorage ( int  tag,
int  length 
)
inline
Engine::ProtocolID Parser::LiteFixMessage::protocolID ( ) const
throw (
)
inlinevirtual

Returns the ProtocolID of the message.

Implements Engine::FIXMessage.

References FIXFields::BeginString, and Engine::NA.

void Parser::LiteFixMessage::rehashHashtable ( bool  clearTable)
virtual void Parser::LiteFixMessage::release ( ) const
virtual

Destroys the message.

Implements Engine::FIXMessage.

virtual void Parser::LiteFixMessage::release ( )
virtual

Releases FIX message instance.

See Also
release(FIXMessage* msg)

Implements Engine::FIXMessage.

bool Parser::LiteFixMessage::remove ( int  tag)
inlinevirtual

Removes the field from the message.

Parameters
tagthe tag of the field
Returns
true if the field was removed

Implements Engine::TagValue.

void Parser::LiteFixMessage::remove ( const std::set< int > &  tags)
inlinevirtual

Removes fields from the message by the tags.

Implements Engine::TagValue.

bool Parser::LiteFixMessage::removeTag ( int  tag)
inline

Removes the field from the message.

Parameters
tagthe tag of the field
Returns
true if the field was removed

Referenced by fix_algo::fill_reply_8_cross(), fix_algo::reorderSMHForMiax(), and fix_algo::stripGTCPersistedProps().

void Parser::LiteFixMessage::removeTagAtIndex ( int  i)
inline

Removes the field from the message.

Parameters
ithe index of the field
void Parser::LiteFixMessage::removeTags ( const int *  tags,
int  count 
)
inline

Removes fields from the message.

Parameters
tagsthe array of tags to remove
countthe number of tags
virtual void Parser::LiteFixMessage::reserve ( int  tag,
Engine::PreparedFieldIndex  index,
std::size_t  size 
)
virtual

not implemented

Implements Engine::TagValue.

bool Parser::LiteFixMessage::reserveBytes ( int  size)
const char* Parser::LiteFixMessage::serializeWithExisitingHeaderAndTrailer ( Utils::RawBuffer buf,
int *  size,
bool  tryReuseExistingBuffer 
)
inline
void Parser::LiteFixMessage::set ( int  tag,
const char *  value,
int  length 
)
inline
bool Parser::LiteFixMessage::set ( int  tag,
Engine::FIXFieldValue const &  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::AsciiString  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
const ShortStrRef value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored
bool Parser::LiteFixMessage::set ( int  tag,
const ShortStrRefCtor value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored
template<int StringLength>
bool Parser::LiteFixMessage::set ( int  tag,
const ShortStr< StringLength > &  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored

References ShortStr< StringLength >::data_, and ShortStr< StringLength >::length_.

bool Parser::LiteFixMessage::set ( int  tag,
char const *  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored
bool Parser::LiteFixMessage::set ( int  tag,
const std::string &  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::MonthYear  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

References Engine::MonthYear::ValueSize.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::LocalMktDate  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

References Engine::LocalMktDate::ValueSize.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::UTCDateOnly  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

References Engine::UTCDateOnly::ValueSize.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::UTCTimeOnly  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::UTCTimestamp  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

References Engine::UTCTimestamp::ValueSizeWithMilliseconds.

bool Parser::LiteFixMessage::set ( int  tag,
System::i32  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
System::u32  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
System::i64  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
System::u64  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
double  value 
)
inlinevirtual

Inserts or updates the existing field in the message.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::Decimal  value 
)
inlinevirtual

Inserts or updates the existing field in the message.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
Engine::ByteArray  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
char  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
bool  value 
)
inlinevirtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
const Engine::MultipleString value 
)
virtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, mustn't be empty

Implements Engine::TagValue.

bool Parser::LiteFixMessage::set ( int  tag,
const Engine::MultipleChar value 
)
virtual

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, mustn't be empty

Implements Engine::TagValue.

void Parser::LiteFixMessage::set_double ( int  tag,
double  value 
)
inline

Inserts or updates the existing field in the message.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::setAtIndex ( int  tagIndex,
System::i64  value 
)
inline

Updates the field value.

Parameters
tagIndexthe index of the field
valuethe new value of the field
Exceptions
Utils::Exceptionif the field doesn't exist
void Parser::LiteFixMessage::setAtIndex ( int  tagIndex,
double  value 
)
inline

Updates the field value.

Parameters
tagIndexthe index of the field
valuethe new value of the field
Exceptions
Utils::Exceptionif the field doesn't exist
void Parser::LiteFixMessage::setAtIndex ( int  tagIndex,
const char *  value,
int  length 
)
inline

Updates the field value.

Parameters
tagIndexthe index of the field
valuethe new value of the field
valuethe length of the new value
Exceptions
Utils::Exceptionif the field doesn't exist
void Parser::LiteFixMessage::setBuffer ( char *  buf,
int  length 
)
throw (
)
inline
bool Parser::LiteFixMessage::setHeartBeatInterval ( int  hbi)
inlinevirtual

Sets the heartbeat interval.

Implements Engine::FIXMessage.

References FIXFields::HeartBtInt.

bool Parser::LiteFixMessage::seti ( int  tag,
Engine::FIXFieldValue const &  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored

Referenced by fix_algo::fill_reply_8_complex(), fix_algo::fill_reply_8_cross(), fix_algo::fillStreetCancel(), and fix_algo::reorderSMHForMiax().

bool Parser::LiteFixMessage::seti ( int  tag,
const Engine::AsciiString value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored
bool Parser::LiteFixMessage::seti ( int  tag,
char const *  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored
bool Parser::LiteFixMessage::seti ( int  tag,
const std::string &  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field, shouldn't be empty otherwise it is ignored
bool Parser::LiteFixMessage::seti ( int  tag,
Engine::UTCTimestamp  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

References Engine::UTCTimestamp::ValueSizeWithMilliseconds.

bool Parser::LiteFixMessage::seti ( int  tag,
System::i32  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required
bool Parser::LiteFixMessage::seti ( int  tag,
System::u32  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required
bool Parser::LiteFixMessage::seti ( int  tag,
System::u64  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required
bool Parser::LiteFixMessage::seti ( int  tag,
System::i64  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
Note
adds the leading '0' if the existing field length is greater than required
bool Parser::LiteFixMessage::seti ( int  tag,
double  value 
)
inline

Inserts or updates the existing field in the message.

Parameters
tagthe tag of the field
valuethe value of the field
bool Parser::LiteFixMessage::seti ( int  tag,
char  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
bool Parser::LiteFixMessage::seti ( int  tag,
bool  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::setIsPreparedMessage ( bool  isPreparedMessage)
throw (
)
inline
void Parser::LiteFixMessage::setMaxAvailInPlace ( int  i,
int  length 
)
throw (
)
inline
bool Parser::LiteFixMessage::setNoPadding ( int  tag,
System::u64  value 
)
inline

Inserts or updates the field value by the tag.

Parameters
tagthe tag of the field
valuethe value of the field

Referenced by CMI::convertAppMsgToFix(), and CMI::convertSessionLevelMsgToFix().

bool Parser::LiteFixMessage::setOrClear ( int  tag,
const Engine::AsciiString value 
)
inline

Sets a new value to the field or removes the field if the value is empty.

Parameters
tagthe tag of the field
valuethe value of the field
bool Parser::LiteFixMessage::setOrClear ( int  tag,
const std::string &  value 
)
inline

Sets a new value to the field or removes the field if the value is empty.

Parameters
tagthe tag of the field
valuethe value of the field
void Parser::LiteFixMessage::setSenderCompID ( Engine::AsciiString  senderCompID)
inlinevirtual

Sets the message sender.

Implements Engine::FIXMessage.

References FIXFields::SenderCompID.

void Parser::LiteFixMessage::setSenderCompIDi ( Engine::AsciiString  senderCompID)
inline

Sets the message sender.

References FIXFields::SenderCompID.

bool Parser::LiteFixMessage::setSeqNum ( int  msgSeqNum)
inlinevirtual

Sets the message sequence number.

Implements Engine::FIXMessage.

References FIXFields::MsgSeqNum.

Referenced by ILink3V5::binToFix(), ILink3V7::binToFix(), and ILink3::binToFix().

void Parser::LiteFixMessage::setTagAtIndex ( int  tagIndex,
const char *  value,
int  length 
)
inline

Sets the field value by the index.

Parameters
tagIndexthe index of the field
valuethe value of the field
lengththe length of the field value
void Parser::LiteFixMessage::setTagLength ( int  tag,
int  newPadWidth 
)

Sets the new length of the existing field value.

Truncates the trailing symbols or adds the leading '0' to the value.

Parameters
tagthe tag of the field
newPadWidththe new length of the field, values greater than 64 are truncated
void Parser::LiteFixMessage::setTargetCompID ( Engine::AsciiString  targetCompID)
inlinevirtual

Sets the message target.

Implements Engine::FIXMessage.

References FIXFields::TargetCompID.

void Parser::LiteFixMessage::setTargetCompIDi ( Engine::AsciiString  targetCompID)
inline

Sets the message target.

References FIXFields::TargetCompID.

bool Parser::LiteFixMessage::tagExists ( int  tag) const
throw (
)
inline

Returns true if the tag is found in the message.

void Parser::LiteFixMessage::throwParserError ( const char *  reason,
int  tag = 0 
)
int Parser::LiteFixMessage::toByteArrayAndReturnNextPosition ( char *  dst,
int  i,
int  tagIndex 
) const
inline
int Parser::LiteFixMessage::toByteArrayAndReturnNextPosition ( char *  dst,
int  offset 
) const
inline
int Parser::LiteFixMessage::toByteArrayAndReturnNextPosition ( char *  dst,
int  offset,
int *  excludedFields,
int  excludedFields_length 
)
inline
const char* Parser::LiteFixMessage::toRaw ( Utils::RawBuffer buf,
int *  size,
bool  tryReuseExistingBuffer,
bool  doSelfCheck = true 
) const

Serializes the message.

Parameters
[out]bufthe destination buffer to append the serialized message if the existing buffer cannot be reused
[out]sizethe size of the serialized message
tryReuseExistingBufferif true the method will try to reuse the existing (possibly external) buffer instead of the destination buffer
doSelfChecknot implemented, optional
Returns
a pointer to the serialized message
const char* Parser::LiteFixMessage::toRaw ( Engine::SecurityAttributes *  sa,
int *  size 
) const
inlinevirtual

Serializes the message.

Parameters
sais not used
[out]sizethe size of the serialized message
Returns
a pointer to the serialized message
Note
the pointer can points to the external buffer if the message is not standalone

Implements Engine::FIXMessage.

const char* Parser::LiteFixMessage::toRaw ( int *  size,
bool  tryReuseExistingBuffer 
) const
inline

Serializes the message.

Parameters
[out]sizethe size of the serialized message
tryReuseExistingBufferif true the method will try to reuse the existing (possibly external) buffer instead of the destination buffer
Returns
a pointer to the serialized message
const char* Parser::LiteFixMessage::toRaw ( int *  size) const
inlinevirtual

Serializes the message.

Parameters
[out]sizethe size of the serialized message
Returns
a pointer to the serialized message
Note
the pointer can points to the external buffer if the message is not standalone

Implements Engine::FIXMessage.

const char* Parser::LiteFixMessage::toRaw ( Engine::SecurityAttributes *  sa,
Utils::RawBuffer rawFixMsg,
int *  size 
) const
inline

Serializes the message.

Parameters
sais not used
[out]rawFixMsgthe destination buffer to write the serialized message if the existing buffer cannot be reused
[out]sizethe size of the serialized message
Returns
a pointer to the serialized message
Note
the pointer can points to the external buffer if the message is not standalone
const char* Parser::LiteFixMessage::toRaw ( Engine::SecurityAttributes *  sa,
Utils::RawBuffer rawFixMsg,
int *  size,
bool  calculateCRC 
) const
inline

Serializes the message.

Parameters
sais not used
[out]rawFixMsgthe destination buffer to write the serialized message if the existing buffer cannot be reused
[out]sizethe size of the serialized message
calculateCRCis not used
Returns
a pointer to the serialized message
Note
the pointer can points to the external buffer if the message is not standalone
const char* Parser::LiteFixMessage::toRaw ( Utils::RawBuffer rawFixMsg,
int *  size 
) const
inline

Serializes the message.

Parameters
[out]rawFixMsgthe destination buffer to append the serialized message if the existing buffer cannot be reused
[out]sizethe size of the serialized message
Returns
a pointer to the serialized message
Note
the pointer can points to the external buffer if the message is not standalone
const std::string* Parser::LiteFixMessage::toString ( char  substChar) const
virtual

Serializes the message to the internal string.

Parameters
substCharthe character to replace SOH and other non-printable symbols

Implements Engine::FIXMessage.

Engine::AsciiString Parser::LiteFixMessage::type ( ) const
throw (
)
inlinevirtual

Returns the message type.

Implements Engine::FIXMessage.

void Parser::LiteFixMessage::updateCheckSum ( char *  byteArray,
int  length 
)
inline
void Parser::LiteFixMessage::updateCheckSum ( )
inline

Updates the checksum in the original message buffer.

bool Parser::LiteFixMessage::updateValue ( int  tag,
const char *  value,
int  length,
MISSING_TAG_HANDLING  addIfNotExists 
)
inline

References unlikely().

bool Parser::LiteFixMessage::updateValue ( int  tag,
const char *  value,
int  length 
)
inline

References unlikely().

bool Parser::LiteFixMessage::updateValue ( int  tag,
System::i64  value,
MISSING_TAG_HANDLING  addIfNotExists 
)
inline
bool Parser::LiteFixMessage::updateValue ( int  tag,
System::i64  value 
)
inline
void Parser::LiteFixMessage::updateValueAtIndex ( int  tagIndex,
const char *  value,
int  length 
)
inline
void Parser::LiteFixMessage::updateValueAtIndex ( int  tagIndex,
System::i64  value 
)
inline
void Parser::LiteFixMessage::updateValueAtIndexNoPadding ( int  tagIndex,
System::i64  value 
)
inline
bool Parser::LiteFixMessage::updateValueNoPadding ( int  tag,
System::i64  value 
)
inline
void Parser::LiteFixMessage::visit ( Engine::FIXTagVisitor callback)

Invokes the visitor callback for all fields in the message.

int Parser::LiteFixMessage::whichTagAtIndex ( int  tagIndex) const
inline
virtual void Parser::LiteFixMessage::write ( int  tag,
std::ostream &  stream 
) const
virtual

not implemented

Implements Engine::TagValue.

Member Data Documentation

const int Parser::LiteFixMessage::ARENA_STORAGE_INITIAL_SIZE = 3 * 1024
static
Utils::RawBuffer Parser::LiteFixMessage::arenaStorage
const int Parser::LiteFixMessage::ENLARGE_TABLES_BY_RATIO = 3
static
const char Parser::LiteFixMessage::FIELD_SEPARATOR = '\001'
static
short Parser::LiteFixMessage::fieldCount
const int Parser::LiteFixMessage::FLAG_ALL_STORAGE_BITS = (FLAG_ORIGBUF_STORAGE | FLAG_ARENA_STORAGE | FLAG_PERFIELD_STORAGE | FLAG_ORIGBUF_BREAK)
static
const int Parser::LiteFixMessage::FLAG_ARENA_STORAGE = 2
static
const int Parser::LiteFixMessage::FLAG_MAX_AVAIL_INPLACE = 8
static
const int Parser::LiteFixMessage::FLAG_MAX_AVAIL_INPLACE_MASK = 0x7fc0
static
const int Parser::LiteFixMessage::FLAG_MAX_AVAIL_INPLACE_MAX = (0x7fff >> FLAG_MAX_AVAIL_INPLACE_SHIFT)
static
const int Parser::LiteFixMessage::FLAG_MAX_AVAIL_INPLACE_SHIFT = 6
static
const int Parser::LiteFixMessage::FLAG_ORIGBUF_BREAK = 16
static
const int Parser::LiteFixMessage::FLAG_ORIGBUF_STORAGE = 1
static
const int Parser::LiteFixMessage::FLAG_PERFIELD_STORAGE = 4
static
const int Parser::LiteFixMessage::FLAG_STORAGE_TYPE_BITS = (FLAG_ORIGBUF_STORAGE | FLAG_ARENA_STORAGE | FLAG_PERFIELD_STORAGE)
static
bool Parser::LiteFixMessage::hasAdjustedTags_ = false
const int Parser::LiteFixMessage::HASHTABLE_REDUNDANCY = 2
static
hashtbl_elem_t* Parser::LiteFixMessage::hashtbl
hashtbl_elem_t* Parser::LiteFixMessage::hashtbl_index
short Parser::LiteFixMessage::hashtbl_length
const int Parser::LiteFixMessage::HASHTBL_REMOVED_TAG = -1
static
short Parser::LiteFixMessage::hashtblElems
index_elem_t* Parser::LiteFixMessage::index
index_flags_t* Parser::LiteFixMessage::index_flags
short Parser::LiteFixMessage::index_length
const int Parser::LiteFixMessage::INDEX_REMOVED_TAG = 0
static
index_tagloc_t* Parser::LiteFixMessage::index_tagloc
const int Parser::LiteFixMessage::INIT_MAXFIELDS = 64
static
const char Parser::LiteFixMessage::isPreparedMessage_ = 1
static
const int Parser::LiteFixMessage::MAX_ALLOWED_TAG_NUMBER = 65535
static
const int Parser::LiteFixMessage::MAX_BYTES_IN_ARENA_STORAGE = ARENA_STORAGE_INITIAL_SIZE
static
const int Parser::LiteFixMessage::MAX_FIELD_COUNT = 32767
static
const int Parser::LiteFixMessage::MAX_HASHTBL_LENGTH = 32767
static
const int Parser::LiteFixMessage::MAX_INDEX_LENGTH = 32767
static
const int Parser::LiteFixMessage::MAX_MESSAGE_LENGTH = 32767
static
const int Parser::LiteFixMessage::NOTFOUND = -1
static
char* Parser::LiteFixMessage::origBuffer
short Parser::LiteFixMessage::origBufLength
const int Parser::LiteFixMessage::PERFIELD_STORAGE_INITIAL_SIZE = 32
static
Utils::RawBuffer** Parser::LiteFixMessage::perFieldStorage
Utils::RawBuffer Parser::LiteFixMessage::rawFixMsg_
mutable
const int Parser::LiteFixMessage::SERIALIZATION_BUFFER_INITIAL_SIZE = 512
static
std::string Parser::LiteFixMessage::stringMsg_
mutable