FIX::MessageCracker Class Reference

Takes in a generic Message and produces an object that represents its specific version and message type. More...

`#include <MessageCracker.h>`

Inheritance diagram for FIX::MessageCracker:
[legend]
Collaboration diagram for FIX::MessageCracker:
[legend]

## Public Member Functions

void | crack (const Message &message, const SessionID &sessionID)
void | crack (const Message &message, const SessionID &sessionID, const BeginString &beginString)
void | crack (const Message &message, const SessionID &sessionID, const ApplVerID &applVerID)
void | crack (Message &message, const SessionID &sessionID)
void | crack (Message &message, const SessionID &sessionID, const BeginString &beginString)
void | crack (Message &message, const SessionID &sessionID, const ApplVerID &applVerID)

## Detailed Description

Takes in a generic Message and produces an object that represents its specific version and message type.

Definition at line 42 of file MessageCracker.h.

## Member Function Documentation

## crack() [1/6]

void FIX::MessageCracker::crack | ( | const Message & | message,
|  | const SessionID & | sessionID
| ) |  |

inline

Definition at line 55 of file MessageCracker.h.

{
const FIX::BeginString& beginString =
FIELD_GET_REF( message.getHeader(), BeginString );
crack( message, sessionID, beginString );
}
FIELD_GET_REF
#define FIELD_GET_REF(MAP, FLD)
Definition FieldMap.h:376
FIX::MessageCracker::crack
void crack(const Message &message, const SessionID &sessionID)
Definition MessageCracker.h:55

References crack(), FIELD_GET_REF, and FIX::Message::getHeader().

Referenced by crack(), crack(), crack(), crack(), crack(), and crack().

## crack() [2/6]

void FIX::MessageCracker::crack | ( | const Message & | message,
|  | const SessionID & | sessionID,
|  | const ApplVerID & | applVerID
| ) |  |

inline

Definition at line 98 of file MessageCracker.h.

{
if ( applVerID == ApplVerID_FIX40 )
((FIX40::MessageCracker&)(*this)).crack((const FIX40::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX41 )
((FIX41::MessageCracker&)(*this)).crack((const FIX41::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX42 )
((FIX42::MessageCracker&)(*this)).crack((const FIX42::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX43 )
((FIX43::MessageCracker&)(*this)).crack((const FIX43::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX44 )
((FIX44::MessageCracker&)(*this)).crack((const FIX44::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX50 )
((FIX50::MessageCracker&)(*this)).crack((const FIX50::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX50SP1 )
((FIX50SP1::MessageCracker&)(*this)).crack((const FIX50SP1::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX50SP2 )
((FIX50SP2::MessageCracker&)(*this)).crack((const FIX50SP2::Message&) message, sessionID);
}

References crack().

## crack() [3/6]

void FIX::MessageCracker::crack | ( | const Message & | message,
|  | const SessionID & | sessionID,
|  | const BeginString & | beginString
| ) |  |

inline

Definition at line 64 of file MessageCracker.h.

{
if ( beginString == BeginString_FIX40 )
((FIX40::MessageCracker&)(*this)).crack((const FIX40::Message&) message, sessionID);
else if ( beginString == BeginString_FIX41 )
((FIX41::MessageCracker&)(*this)).crack((const FIX41::Message&) message, sessionID);
else if ( beginString == BeginString_FIX42 )
((FIX42::MessageCracker&)(*this)).crack((const FIX42::Message&) message, sessionID);
else if ( beginString == BeginString_FIX43 )
((FIX43::MessageCracker&)(*this)).crack((const FIX43::Message&) message, sessionID);
else if ( beginString == BeginString_FIX44 )
((FIX44::MessageCracker&)(*this)).crack((const FIX44::Message&) message, sessionID);
else if ( beginString == BeginString_FIXT11 )
{
if( message.isAdmin() )
{
((FIXT11::MessageCracker&)(*this)).crack((const FIXT11::Message&) message, sessionID);
}
else
{
ApplVerID applVerID;
if(!message.getHeader().getFieldIfSet(applVerID))
{
Session* pSession = Session::lookupSession( sessionID );
applVerID = pSession->getSenderDefaultApplVerID();
}
crack( message, sessionID, applVerID );
}
}
}
FIX::Session::lookupSession
static Session * lookupSession(const SessionID &)
Definition Session.cpp:1496
FIX::BeginString_FIX41
const char BeginString_FIX41[]
Definition Values.h:35
FIX::BeginString_FIX40
const char BeginString_FIX40[]
Definition Values.h:36
FIX::BeginString_FIX42
const char BeginString_FIX42[]
Definition Values.h:34
FIX::BeginString_FIXT11
const char BeginString_FIXT11[]
Definition Values.h:30
FIX::BeginString_FIX43
const char BeginString_FIX43[]
Definition Values.h:33
FIX::BeginString_FIX44
const char BeginString_FIX44[]
Definition Values.h:32

References FIX::BeginString_FIX40, FIX::BeginString_FIX41, FIX::BeginString_FIX42, FIX::BeginString_FIX43, FIX::BeginString_FIX44, FIX::BeginString_FIXT11, crack(), FIX::FieldMap::getFieldIfSet(), FIX::Message::getHeader(), FIX::Session::getSenderDefaultApplVerID(), FIX::Message::isAdmin(), and FIX::Session::lookupSession().

## crack() [4/6]

void FIX::MessageCracker::crack | ( | Message & | message,
|  | const SessionID & | sessionID
| ) |  |

inline

Definition at line 120 of file MessageCracker.h.

{
const FIX::BeginString& beginString =
FIELD_GET_REF( message.getHeader(), BeginString );
crack( message, sessionID, beginString );
}

References crack(), FIELD_GET_REF, and FIX::Message::getHeader().

## crack() [5/6]

void FIX::MessageCracker::crack | ( | Message & | message,
|  | const SessionID & | sessionID,
|  | const ApplVerID & | applVerID
| ) |  |

inline

Definition at line 163 of file MessageCracker.h.

{
if ( applVerID == ApplVerID_FIX40 )
((FIX40::MessageCracker&)(*this)).crack((FIX40::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX41 )
((FIX41::MessageCracker&)(*this)).crack((FIX41::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX42 )
((FIX42::MessageCracker&)(*this)).crack((FIX42::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX43 )
((FIX43::MessageCracker&)(*this)).crack((FIX43::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX44 )
((FIX44::MessageCracker&)(*this)).crack((FIX44::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX50 )
((FIX50::MessageCracker&)(*this)).crack((FIX50::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX50SP1 )
((FIX50SP1::MessageCracker&)(*this)).crack((FIX50SP1::Message&) message, sessionID);
if ( applVerID == ApplVerID_FIX50SP2 )
((FIX50SP2::MessageCracker&)(*this)).crack((FIX50SP2::Message&) message, sessionID);
}

References crack().

## crack() [6/6]

void FIX::MessageCracker::crack | ( | Message & | message,
|  | const SessionID & | sessionID,
|  | const BeginString & | beginString
| ) |  |

inline

Definition at line 129 of file MessageCracker.h.

{
if ( beginString == BeginString_FIX40 )
((FIX40::MessageCracker&)(*this)).crack((FIX40::Message&) message, sessionID);
else if ( beginString == BeginString_FIX41 )
((FIX41::MessageCracker&)(*this)).crack((FIX41::Message&) message, sessionID);
else if ( beginString == BeginString_FIX42 )
((FIX42::MessageCracker&)(*this)).crack((FIX42::Message&) message, sessionID);
else if ( beginString == BeginString_FIX43 )
((FIX43::MessageCracker&)(*this)).crack((FIX43::Message&) message, sessionID);
else if ( beginString == BeginString_FIX44 )
((FIX44::MessageCracker&)(*this)).crack((FIX44::Message&) message, sessionID);
else if ( beginString == BeginString_FIXT11 )
{
if( message.isAdmin() )
{
((FIXT11::MessageCracker&)(*this)).crack((FIXT11::Message&) message, sessionID);
}
else
{
ApplVerID applVerID;
if(!message.getHeader().getFieldIfSet(applVerID))
{
Session* pSession = Session::lookupSession( sessionID );
applVerID = pSession->getSenderDefaultApplVerID();
}
crack( message, sessionID, applVerID );
}
}
}

References FIX::BeginString_FIX40, FIX::BeginString_FIX41, FIX::BeginString_FIX42, FIX::BeginString_FIX43, FIX::BeginString_FIX44, FIX::BeginString_FIXT11, crack(), FIX::FieldMap::getFieldIfSet(), FIX::Message::getHeader(), FIX::Session::getSenderDefaultApplVerID(), FIX::Message::isAdmin(), and FIX::Session::lookupSession().

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

- MessageCracker.h