OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
EventBasedDecoder.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable ONIXS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19
20#if !defined(__ONIXS_EVENTBASEDDECODER_H__)
21#define __ONIXS_EVENTBASEDDECODER_H__
22
23#include <string>
24#include <vector>
25
26#include <OnixS/FIXEngine/ABI.h>
32
33namespace OnixS {
34namespace FIX {
37
38namespace FAST {
41{
42public:
50 EventBasedDecoder(const std::string & xmlTemplates, ProtocolVersion::Enum fixVersion,
51 bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits);
52
60 EventBasedDecoder(const std::string & xmlTemplates,
61 const OnixS::FIX::Dictionary & fixDictionary, bool decodeEachMessageIndependently,
63
71 EventBasedDecoder(const std::string & xmlTemplates, bool decodeEachMessageIndependently,
73
82 EventBasedDecoder(ProtocolVersion::Enum baseVersion, const std::string & xmlTemplates,
83 bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits);
84
95 EventBasedDecoder(ProtocolVersion::Enum baseVersion, const std::string & xmlTemplates,
96 const std::string & genericFixDictionaryId, bool decodeEachMessageIndependently,
98
101
105
116 bool decode(const char * buffer, size_t bufferSize, IDecodeListener * listener, size_t * usedSize); // Deprecated
117 bool decode(const unsigned char * buffer, size_t bufferSize, IDecodeListener * listener, size_t * usedSize);
118
128 bool decode(const std::vector<char> & chunk, IDecodeListener * listener, size_t * usedSize); // Deprecated
129 bool decode(const OnixS::Sockets::Bytes & chunk, IDecodeListener * listener, size_t * usedSize);
130
141 bool decodeSingleMessage(const char * buffer, size_t bufferSize, IDecodeListener * listener, size_t * usedSize); // Deprecated
142 bool decodeSingleMessage(const unsigned char * buffer, size_t bufferSize, IDecodeListener * listener, size_t * usedSize);
143
153 bool decodeSingleMessage(const std::vector<char> & chunk, IDecodeListener * listener, size_t * usedSize); // Deprecated
154 bool decodeSingleMessage(const OnixS::Sockets::Bytes & chunk, IDecodeListener * listener, size_t * usedSize);
155
164 static bool tryDecodeUnsignedInteger(const char * buffer, size_t bufferSize, unsigned int * value, size_t * fieldLength); // Deprecated
165 static bool tryDecodeUnsignedInteger(const unsigned char * buffer, size_t bufferSize, unsigned int * value, size_t * fieldLength);
166
170 void reset();
171
177private:
179
181 EventBasedDecoder & operator = (const EventBasedDecoder &);
182
183 class Impl;
184 Impl * impl_;
185};
186}
187}
188}
189
190#endif // __ONIXS_EVENTBASEDDECODER_H__
#define ONIXS_FIXENGINE_API_DECL(typeKind, typeName)
Definition ABI.h:57
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
Identifies the FIX messages dictionary.
Definition Dictionary.h:74
bool decodeSingleMessage(const OnixS::Sockets::Bytes &chunk, IDecodeListener *listener, size_t *usedSize)
EventBasedDecoder(ProtocolVersion::Enum baseVersion, const std::string &xmlTemplates, const std::string &genericFixDictionaryId, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
Creates a FAST to FIX Decoder for the FIX dictionary-independent mode.
bool decode(const unsigned char *buffer, size_t bufferSize, IDecodeListener *listener, size_t *usedSize)
bool decodeSingleMessage(const unsigned char *buffer, size_t bufferSize, IDecodeListener *listener, size_t *usedSize)
EventBasedDecoder(ProtocolVersion::Enum baseVersion, const std::string &xmlTemplates, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
Creates a FAST to FIX Decoder for the FIX dictionary-independent mode.
bool decode(const char *buffer, size_t bufferSize, IDecodeListener *listener, size_t *usedSize)
Decodes the given FAST stream chunk.
InputDataTraits::Enum inputDataTraits() const
Input data traits of the decoder.
static bool tryDecodeUnsignedInteger(const char *buffer, size_t bufferSize, unsigned int *value, size_t *fieldLength)
Decodes the FAST-encoded unsigned integer.
EventBasedDecoder(const std::string &xmlTemplates, ProtocolVersion::Enum fixVersion, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
Creates a FAST Decoder.
static bool tryDecodeUnsignedInteger(const unsigned char *buffer, size_t bufferSize, unsigned int *value, size_t *fieldLength)
~EventBasedDecoder(void)
The destructor.
OnixS::FIX::Dictionary fixDictionary() const
The FIX dictionary used by the decoder instance.
bool decode(const std::vector< char > &chunk, IDecodeListener *listener, size_t *usedSize)
Decodes the given FAST stream chunk.
void reset()
Resets the state of the previous values dictionaries (sets the state of the previous values to undefi...
EventBasedDecoder(const std::string &xmlTemplates, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
Creates a FAST to FIX Decoder for the FIX dictionary-independent mode.
bool decodeSingleMessage(const char *buffer, size_t bufferSize, IDecodeListener *listener, size_t *usedSize)
Decodes the first message from the given FAST stream chunk.
bool decodeSingleMessage(const std::vector< char > &chunk, IDecodeListener *listener, size_t *usedSize)
Decodes the first message from the given FAST stream chunk.
bool decode(const OnixS::Sockets::Bytes &chunk, IDecodeListener *listener, size_t *usedSize)
EventBasedDecoder(const std::string &xmlTemplates, const OnixS::FIX::Dictionary &fixDictionary, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
Creates a FAST Decoder.
The decode session's listener.
Encapsulates operations over a FIX Message.
Definition Message.h:52
std::vector< Byte > Bytes
Sequence of bytes.
Definition Definitions.h:43