Engine::FIXMsgProcessor Class Reference

#include <B2BITS_FIXMsgProcessor.h>

Collaboration diagram for Engine::FIXMsgProcessor:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Option {
  PROHIBIT_TAGS_WITHOUT_VALUE, VERIFY_DATA_TAGS_SEQUENCE, VERIFY_TAGS_VALUES, PROHIBIT_DUPLICATED_TAGS,
  VERIFY_REPERATING_GROUP_BOUNDS, CHECK_REQUIRED_TAGS, CHECK_REQUIRED_GROUP_FIELDS, ALLOW_ZERO_NUMINGROUP
}
enum  OptionState { ON, OFF }

Public Member Functions

virtual FIXMessageclone (const FIXMessage &fixMessage) const =0
virtual FIXMessagecreateReject (const FIXMessage &fixMessage, bool appReject=true) const =0
virtual FIXMessageparse (const std::string &rawMessage, SecurityAttributes *pSA=NULL, bool verifyBodyLength=false, bool verifyCheckSum=false, FIXVersion preferredVersion=NA) const =0
virtual FastMessageparseToFast (const char *buf, size_t size) const =0
virtual void check (const FIXMessage &fixMessage) const =0
virtual void checkFields (const FIXMessage &fixMessage) const =0
virtual void switchOption (Option option, OptionState state)=0
virtual OptionState optionState (Option option) const =0
virtual FastMessageconvertToFast (const FIXMessage &fixMessage, FIXVersion preferredVersion=NA) const =0
virtual FIXMessageconvertToFix (const FastMessage &fastMessage) const =0

Static Public Member Functions

static FIXMsgProcessorsingleton ()

Protected Member Functions

 FIXMsgProcessor ()
 Constructor.
virtual ~FIXMsgProcessor ()
 Destructor.

Static Protected Attributes

static FIXMsgProcessors_pSingleton


Detailed Description

Processes raw messages and provides message verification capabilities.

Member Enumeration Documentation

List of options available to control message parsing flow.

Enumerator:
PROHIBIT_TAGS_WITHOUT_VALUE  Message is treated as invalid if tag without value appeared.
VERIFY_DATA_TAGS_SEQUENCE  Controls order and length of raw data fields pair verification.
VERIFY_TAGS_VALUES  Enables/disables the verification of tag values (like date-time).
PROHIBIT_DUPLICATED_TAGS  Message is treated as invalid if any tag appears more than once.
VERIFY_REPERATING_GROUP_BOUNDS  Message is treated as invalid if the quantity of repeating group entries is less than specified in the leading field. Message with exceeding quantity of repeating group entries is allways treated as invalid.
CHECK_REQUIRED_TAGS  Verifies the presence of required and conditionally required tags of the message.
CHECK_REQUIRED_GROUP_FIELDS  Verifies the presence of required fields in repeating groups .
ALLOW_ZERO_NUMINGROUP  When true, parser will ignore group tags with 0 values. Exception fired otherwise.

Option state.

Enumerator:
ON  Turns option on.
OFF  Turns option off.


Member Function Documentation

static FIXMsgProcessor* Engine::FIXMsgProcessor::singleton (  )  [static]

Returns the instance of the class.

virtual FIXMessage* Engine::FIXMsgProcessor::clone ( const FIXMessage fixMessage  )  const [pure virtual]

Duplicates the given message.

Parameters:
fixMessage message to duplicate
Returns:
duplicated FIXMessage

virtual FIXMessage* Engine::FIXMsgProcessor::createReject ( const FIXMessage fixMessage,
bool  appReject = true 
) const [pure virtual]

Creates corresponding reject for the source message.

Parameters:
fixMessage message to be rejected
appReject when true application reject will be created, session when false
Returns:
reject FIXMessage

virtual FIXMessage* Engine::FIXMsgProcessor::parse ( const std::string &  rawMessage,
SecurityAttributes *  pSA = NULL,
bool  verifyBodyLength = false,
bool  verifyCheckSum = false,
FIXVersion  preferredVersion = NA 
) const [pure virtual]

Parses the input string and creates corresponding structured message.

Parameters:
rawMessage message to parse.
pSA pointer to SecurityAttributes class to decrypt input message. This parameter may be NULL if input message wasn't encrypted.
verifyBodyLength if true then conformance of the input message length to the 'BodyLength' field (tag 9) value will be checked.
verifyCheckSum if true then conformance of the input message checksum to the 'CheckSum' field (tag 10) value will be checked.
preferredVersion forces to use specified FIX version instead of using 'BeginString' field (tag 8) value.
Returns:
Instance of FIXMessage class.

virtual FastMessage* Engine::FIXMsgProcessor::parseToFast ( const char *  buf,
size_t  size 
) const [pure virtual]

Parses the input string (with FIX message) and creates corresponding structured FAST message.

Parameters:
rawMessage message to parse.
Returns:
Instance of FastMessage class.

virtual void Engine::FIXMsgProcessor::check ( const FIXMessage fixMessage  )  const [pure virtual]

Checks that the message contains all required and conditionally required fields.

Parameters:
fixMessage FIXMessage to check.
Exceptions:
Utils::Exception if any required and conditionally required field is absent.

virtual void Engine::FIXMsgProcessor::checkFields ( const FIXMessage fixMessage  )  const [pure virtual]

Checks that the message contains valid values of fields

Parameters:
fixMessage FIXMessage to check.
Exceptions:
Utils::Exception if any field contains invalid value

virtual void Engine::FIXMsgProcessor::switchOption ( Option  option,
OptionState  state 
) [pure virtual]

Changes state of particular parsing option.

Parameters:
option Option to change
state New state

virtual OptionState Engine::FIXMsgProcessor::optionState ( Option  option  )  const [pure virtual]

Returns the state of particular option.

Parameters:
option Option to ckeck
Returns:
the state of particular option.

virtual FastMessage* Engine::FIXMsgProcessor::convertToFast ( const FIXMessage fixMessage,
FIXVersion  preferredVersion = NA 
) const [pure virtual]

Convert FIX message into the corresponding Fast message of the required protocol

Parameters:
fixMessage - source FIX message
preferredVersion - required FAST protocol

virtual FIXMessage* Engine::FIXMsgProcessor::convertToFix ( const FastMessage fastMessage  )  const [pure virtual]

Convert FAST message into the corresponding FIX message

Parameters:
fastMessage - source FAST message


Member Data Documentation

Message processor instance.


The documentation for this class was generated from the following file:

Generated on Fri Apr 17 12:27:16 2009 for B2BITS FIX Antenna C++ by  doxygen 1.5.6