OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
Encoder Class Reference

Public Member Functions

 Encoder (const std::string &xmlTemplates, ISbeCustomCoderLibrary *customCoders=ONIXS_FIXENGINE_NULLPTR)
 ~Encoder (void)
size_t encode (const OnixS::FIX::Message &fixMessage, int templateID, int version, unsigned char *buffer, size_t bufferSize, size_t *rootBlockLength) const
size_t encodeWithHeader (const OnixS::FIX::Message &fixMessage, int templateID, int version, unsigned char *buffer, size_t bufferSize, size_t *rootBlockLength) const
unsigned schemaVersion () const
unsigned schemaId () const
std::string schemaSemanticVersion () const
std::string schemaHeaderType () const

Detailed Description

Definition at line 38 of file SBE.h.

Constructor & Destructor Documentation

◆ Encoder()

Encoder ( const std::string & xmlTemplates,
ISbeCustomCoderLibrary * customCoders = ONIXS_FIXENGINE_NULLPTR )

Creates a FIX to SBE Encoder.

Parameters
xmlTemplatesXML-based SBE templates.
customCodersThe custom coders library.

◆ ~Encoder()

~Encoder ( void )

Destructor.

Member Function Documentation

◆ encode()

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

Encodes the given FIX message into a SBE stream.

Parameters
[in]fixMessageThe source FIX message to be encoded.
[in]templateIDthe SBE Template Identifier which uniquely describes the encoding/decoding rules.
[in]versionThe version of the template.
[in]bufferThe supplied buffer that will contain the SBE stream chunk.
[in]bufferSizeThe size of the supplied buffer.
[out]rootBlockLengthThe size of the root block, used for the encoded message.
Returns
The size of the entire encoded SBE message.

◆ encodeWithHeader()

size_t encodeWithHeader ( const OnixS::FIX::Message & fixMessage,
int templateID,
int version,
unsigned char * buffer,
size_t bufferSize,
size_t * rootBlockLength ) const

Encodes the given FIX message into a SBE stream and prepends the message header.

Parameters
[in]fixMessageThe source FIX message to be encoded.
[in]templateIDThe SBE Template Identifier which uniquely describes the encoding/decoding rules.
[in]versionThe version of the template.
[in]bufferThe supplied buffer that will contain the SBE stream chunk.
[in]bufferSizeThe size of the supplied buffer.
[out]rootBlockLengthThe size of the root block, used for the encoded message.
Returns
The size of the entire encoded SBE message.

◆ schemaHeaderType()

std::string schemaHeaderType ( ) const

The name of the encoding type of the message header, which is the same for all messages in a schema.

◆ schemaId()

unsigned schemaId ( ) const

The schema identifier.

◆ schemaSemanticVersion()

std::string schemaSemanticVersion ( ) const

The semantic version of the SBE schema.

◆ schemaVersion()

unsigned schemaVersion ( ) const

The maximum known version of the SBE schema.