OnixS C++ FIX Engine  4.10.1
API Documentation
ISbeFieldEncoder Class Referenceabstract

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

Public Member Functions

virtual ~ISbeFieldEncoder () ONIXS_FIXENGINE_DEFAULT
 
virtual SbeWireSize queryFixedSize (unsigned version)=0
 
virtual void encode (SbeBinaryOutputStream out, unsigned version, const SbeConstFieldAccess &field)=0
 

Detailed Description

The interface must be implemented by the custom encoder that encodes a FIX field.

The encoder is attached to the particular field during the ISbeCustomCoderLibrary::queryEncoder.

Definition at line 1036 of file SbeCustomization.h.

Constructor & Destructor Documentation

virtual ~ISbeFieldEncoder ( )
virtual

Member Function Documentation

virtual void encode ( SbeBinaryOutputStream  out,
unsigned  version,
const SbeConstFieldAccess field 
)
pure virtual

Encodes the FIX field to the binary stream.

This method is used to encode the FIX field value to the binary data. The core encoder calls it if user code provided the custom encoder for the particular FIX field.

Note
If the field is a fixed-length field, the number of written bytes must be exactly the same as reported via queryFixedSize.
Parameters
outThe binary data stream for the encoded data.
versionThe version of the FIX message being encoded.
fieldThe FIX field to encode.
virtual SbeWireSize queryFixedSize ( unsigned  version)
pure virtual

Query for the size of the encoded field.

This method should return the size of the encoded field if the field has a fixed binary size. In a case of a variable-length field, the method is not called and is considered to return zero.


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