B2BITS FIX Antenna C++  2.27.1
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
Engine::FastCoder Class Reference

Encodes FIX messages to FAST messages. More...

#include <B2BITS_FastCoder.h>

Classes

class  Buffer
 Buffer. More...
 

Public Types

typedef System::u32 TID
 

Public Member Functions

void encode (Engine::FIXMessage const *msg, System::u32 tid, Buffer *buffer)
 Encodes the specified fix message to the fast message using the specified template id. More...
 
void encode (Engine::FIXMessage const *msg, Buffer *buffer)
 Encodes the specified fix message to the fast message. More...
 
 FastCoder (Impl *impl)
 Constructor. More...
 
std::auto_ptr< FIXMessagenewSkel (const std::string &msgType)
 Creates a skeleton of a fix message and returns it. More...
 
void operator delete (void *obj)
 Overloaded delete operator. More...
 
std::auto_ptr< FIXMessageparse (const std::string &rawMessage)
 Parses the specified std::string and creates a corresponding FIXMessage instance;. More...
 
void resetDictionary ()
 Resets the fast coder dictionary. More...
 
void tryEncode (Engine::FIXMessage const *msg, System::u32 tid)
 Checks if the message can be encoded without errors, using the specified template. More...
 
 ~FastCoder ()
 Destructor. More...
 

Protected Member Functions

 FastCoder (const FastCoder &)
 
FastCoderoperator= (const FastCoder &)
 

Detailed Description

Encodes FIX messages to FAST messages.

Member Typedef Documentation

◆ TID

typedef System::u32 Engine::FastCoder::TID

Constructor & Destructor Documentation

◆ FastCoder() [1/2]

Engine::FastCoder::FastCoder ( Impl *  impl)

Constructor.

◆ ~FastCoder()

Engine::FastCoder::~FastCoder ( )

Destructor.

◆ FastCoder() [2/2]

Engine::FastCoder::FastCoder ( const FastCoder )
protected

Member Function Documentation

◆ encode() [1/2]

void Engine::FastCoder::encode ( Engine::FIXMessage const *  msg,
System::u32  tid,
Buffer buffer 
)

Encodes the specified fix message to the fast message using the specified template id.

Parameters
[in]msg- pointer to fix message to be encoded.
[in]tid- template id
[out]buffer- pointer to buffer that will contain fast message after encoding
Exceptions
-an std::exception with detailed information if an error occurs.

◆ encode() [2/2]

void Engine::FastCoder::encode ( Engine::FIXMessage const *  msg,
Buffer buffer 
)

Encodes the specified fix message to the fast message.

Parameters
[in]msg- pointer to fix message to be encoded.
[out]buffer- pointer to buffer that will contain fast message after encoding
Exceptions
-an std::exception with detailed information if an error occurs.

◆ newSkel()

std::auto_ptr<FIXMessage> Engine::FastCoder::newSkel ( const std::string &  msgType)

Creates a skeleton of a fix message and returns it.

Parameters
[in]msgType- null-terminated std::string. Specifies type of new message.
Returns
instance of FIXMessage class.

◆ operator delete()

void Engine::FastCoder::operator delete ( void *  obj)

Overloaded delete operator.

◆ operator=()

FastCoder& Engine::FastCoder::operator= ( const FastCoder )
protected

◆ parse()

std::auto_ptr<FIXMessage> Engine::FastCoder::parse ( const std::string &  rawMessage)

Parses the specified std::string and creates a corresponding FIXMessage instance;.

Parameters
[in]rawMessage- null-terminated std::string. Should contain a raw fix message.
Returns
instance of FIXMessage class.

◆ resetDictionary()

void Engine::FastCoder::resetDictionary ( )

Resets the fast coder dictionary.

◆ tryEncode()

void Engine::FastCoder::tryEncode ( Engine::FIXMessage const *  msg,
System::u32  tid 
)

Checks if the message can be encoded without errors, using the specified template.

Silently returns a control if no errors are detected; otherwise throws an std::exception with detailed information. Usssualy used for debugging purpose only.

Parameters
[in]msg- pointer to a fix message to be checked.
[in]tid- template id.
Exceptions
anstd::exception with detailed information if any errors detected.