OnixS C++ FIX Engine  4.2.0
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.
fixVersionFIX Protocol version.
encodeEachMessageIndependentlyOption 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.
fixDictionaryIdFIX dictionary ID.
encodeEachMessageIndependentlyOption 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 FIX dictionary-independent mode.

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

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

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

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

Parameters
baseVersionVersion of FIX protocol which dictionary becomes base for the newly generated FIX dictionary.
xmlTemplatesXML-based FAST templates used to generate FIX dictionary. This FIX dictionary takes generic identifier generated on base of the XML contanet and baseVersion
encodeEachMessageIndependentlyOption 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 FIX dictionary-independent mode.

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

Note
New FIX dictionary instance will be generated if and only if there is no FIX dictionary with the same name.
Parameters
baseVersionVersion of FIX protocol which dictionary becomes base for the newly generated FIX dictionary.
xmlTemplatesXML-based FAST templates.
genericFixDictionaryIdIdentifier which is applied to generic FIX dictionary. This FIX dictionary is generated using xmlTemplates and baseVersion.
encodeEachMessageIndependentlyOption to reset the previous values dictionaries before encoding next FIX message.
~Encoder ( void  )

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
fixMessageSource FIX message to be encoded.
templateIDFAST Template Identifier which uniquely describes the encoding/decoding rules.
bufferSupplied buffer that will contain the FAST stream chunk.
bufferSizeSize 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
fixMessageSource FIX message to be encoded.
bufferSupplied buffer that will contain the FAST stream chunk.
bufferSizeSize 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

FIX dictionary used by the encoder instance.

Returns
FIX dictionary currently used by the encoder instance. If the encoder was initialized for FIX dictionary-independent mode, the method returns reference to 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: