OnixS C++ FIX Engine  4.10.1
API Documentation
Encoder Class Reference

#include <OnixS/FIXEngine/FIX/FAST.h>

Public Member Functions

 Encoder (const std::string &xmlTemplates, ProtocolVersion::Enum fixVersion, bool encodeEachMessageIndependently)
 
 Encoder (const std::string &xmlTemplates, const std::string &fixDictionaryId, bool encodeEachMessageIndependently)
 
 Encoder (const std::string &xmlTemplates, bool encodeEachMessageIndependently)
 
 Encoder (ProtocolVersion::Enum baseVersion, const std::string &xmlTemplates, bool encodeEachMessageIndependently)
 
 Encoder (ProtocolVersion::Enum baseVersion, const std::string &xmlTemplates, const std::string &genericFixDictionaryId, bool encodeEachMessageIndependently)
 
 ~Encoder (void)
 
size_t encode (const OnixS::FIX::Message &fixMessage, int templateID, char *buffer, size_t bufferSize)
 
size_t encode (const OnixS::FIX::Message &fixMessage, int templateID, unsigned char *buffer, size_t bufferSize)
 
size_t encode (const OnixS::FIX::Message &fixMessage, char *buffer, size_t bufferSize)
 
size_t encode (const OnixS::FIX::Message &fixMessage, unsigned char *buffer, size_t bufferSize)
 
void reset ()
 
OnixS::FIX::Dictionary fixDictionary () const
 

Detailed Description

Definition at line 38 of file FAST.h.

Constructor & Destructor Documentation

Encoder ( const std::string &  xmlTemplates,
ProtocolVersion::Enum  fixVersion,
bool  encodeEachMessageIndependently 
)

Creates a FIX to FAST Encoder.

Parameters
xmlTemplatesXML-based FAST templates.
fixVersionThe FIX Protocol version.
encodeEachMessageIndependentlyThe option to reset the previous values dictionaries before encoding a new FIX message.
Encoder ( const std::string &  xmlTemplates,
const std::string &  fixDictionaryId,
bool  encodeEachMessageIndependently 
)

Creates a FIX to FAST Encoder.

Parameters
xmlTemplatesXML-based FAST templates.
fixDictionaryIdThe FIX dictionary ID.
encodeEachMessageIndependentlyThe option to reset the previous values dictionaries before encoding a new FIX message.
Encoder ( const std::string &  xmlTemplates,
bool  encodeEachMessageIndependently 
)

Creates a FIX to FAST Encoder for the FIX dictionary-independent mode.

The generic FIX dictionary is created by the provided FAST-template content, it uses the FIX 4.0 as a base and has a generic name.

Parameters
xmlTemplatesXML-based FAST templates.
encodeEachMessageIndependentlyThe option to reset the previous values dictionaries before encoding the next FIX message.
Encoder ( ProtocolVersion::Enum  baseVersion,
const std::string &  xmlTemplates,
bool  encodeEachMessageIndependently 
)

Creates a FIX to FAST Encoder for the FIX dictionary-independent mode.

The generic FIX dictionary is created by the provided FAST-template content, it uses the specified FIX dictionary as a base and has a generic name.

Parameters
baseVersionThis version of the FIX protocol becomes the base for the newly generated FIX dictionary.
xmlTemplatesXML-based FAST templates used to generate FIX dictionary. This FIX dictionary takes the generic identifier generated on a base of the XML content and baseVersion
encodeEachMessageIndependentlyThe option to reset the previous values dictionaries before encoding next FIX message.
Encoder ( ProtocolVersion::Enum  baseVersion,
const std::string &  xmlTemplates,
const std::string &  genericFixDictionaryId,
bool  encodeEachMessageIndependently 
)

Creates a FIX to FAST Encoder for the FIX dictionary-independent mode.

The generic FIX dictionary is created by the provided FAST-template content, it uses the specified FIX dictionary as a base and has the specified name.

Note
The new FIX dictionary instance will be generated if and only if there is no a FIX dictionary with the same name.
Parameters
baseVersionThis version of the FIX protocol becomes the base for the newly generated FIX dictionary.
xmlTemplatesXML-based FAST templates.
genericFixDictionaryIdThe identifier which is applied to the generic FIX dictionary. This FIX dictionary is generated using xmlTemplates and baseVersion.
encodeEachMessageIndependentlyThe option to reset the previous values dictionaries before encoding the next FIX message.
~Encoder ( void  )

The destructor.

Member Function Documentation

size_t encode ( const OnixS::FIX::Message fixMessage,
int  templateID,
char *  buffer,
size_t  bufferSize 
)

Encodes the given FIX message into a FAST stream.

Parameters
fixMessageThe source FIX message to be encoded.
templateIDThe FAST Template Identifier which uniquely describes the encoding/decoding rules.
bufferThe supplied buffer that will contain the FAST stream chunk.
bufferSizeThe size of the supplied buffer.
Returns
the size of the encoded FAST stream chunk.
size_t encode ( const OnixS::FIX::Message fixMessage,
int  templateID,
unsigned char *  buffer,
size_t  bufferSize 
)
size_t encode ( const OnixS::FIX::Message fixMessage,
char *  buffer,
size_t  bufferSize 
)

Encodes the given FIX message into a FAST stream using the default template ID.

Parameters
fixMessageThe source FIX message to be encoded.
bufferThe supplied buffer that will contain the FAST stream chunk.
bufferSizeThe size of the supplied buffer.
Returns
the size of the encoded FAST stream chunk.
size_t encode ( const OnixS::FIX::Message fixMessage,
unsigned char *  buffer,
size_t  bufferSize 
)
OnixS::FIX::Dictionary fixDictionary ( ) const

The FIX dictionary used by the encoder instance.

Returns
The FIX dictionary currently used by the encoder instance. If the encoder was initialized for the FIX dictionary-independent mode, the method returns a reference to the internally generated FIX dictionary.
void reset ( )

Resets the state of the previous values dictionaries (sets the state of the previous values to undefined).

See also
encodeEachMessageIndependently.

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