OnixS C++ FIX Engine 4.14.0
Users' manual and API documentation
Loading...
Searching...
No Matches
FAST.h
Go to the documentation of this file.
1#pragma once
2/*
3* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4*
5* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6* and international copyright treaties.
7*
8* Access to and use of the software is governed by the terms of the applicable ONIXS Software
9* Services Agreement (the Agreement) and Customer end user license agreements granting
10* a non-assignable, non-transferable and non-exclusive license to use the software
11* for it's own data processing purposes under the terms defined in the Agreement.
12*
13* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14* of this source code or associated reference material to any other location for further reproduction
15* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
16*
17* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18* the terms of the Agreement is a violation of copyright law.
19*/
20
21#include <string>
22#include <vector>
23#include <map>
24
25#include <OnixS/FIXEngine/ABI.h>
30
31namespace OnixS {
32namespace FIX {
35
36namespace FAST {
39{
40public:
46 Encoder(const std::string & xmlTemplates, ProtocolVersion::Enum fixVersion, bool encodeEachMessageIndependently);
47
53 Encoder(const std::string & xmlTemplates, const std::string & fixDictionaryId, bool encodeEachMessageIndependently);
54
61 Encoder(const std::string & xmlTemplates, bool encodeEachMessageIndependently);
62
70 Encoder(ProtocolVersion::Enum baseVersion, const std::string & xmlTemplates, bool encodeEachMessageIndependently);
71
81 Encoder(ProtocolVersion::Enum baseVersion, const std::string & xmlTemplates, const std::string & genericFixDictionaryId, bool encodeEachMessageIndependently);
82
84 ~Encoder(void);
85
94 size_t encode(const OnixS::FIX::Message & fixMessage, int templateID, char * buffer, size_t bufferSize); // Deprecated
95 size_t encode(const OnixS::FIX::Message & fixMessage, int templateID, unsigned char * buffer, size_t bufferSize);
96
104 size_t encode(const OnixS::FIX::Message & fixMessage, char * buffer, size_t bufferSize); // Deprecated
105 size_t encode(const OnixS::FIX::Message & fixMessage, unsigned char * buffer, size_t bufferSize);
106
110 void reset();
111
117
118private:
120
121 Encoder(const Encoder &);
122 Encoder & operator = (const Encoder &);
123
124 class Impl;
125 Impl * impl_;
126};
127
130{
131public:
139 Decoder(const std::string & xmlTemplates, const OnixS::FIX::Dictionary & fixDictionary, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits);
140
148 Decoder(const std::string & xmlTemplates, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits);
149
158 Decoder(ProtocolVersion::Enum baseVersionForGeneratedDictionary, const std::string & xmlTemplates, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits);
159
170 Decoder(ProtocolVersion::Enum baseVersionForGeneratedDictionary,
171 const std::string & xmlTemplates, const std::string & genericFixDictionaryId,
172 bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits);
173
176
180
192 const OnixS::FIX::Message & decode(const char * buffer, size_t bufferSize); // Deprecated
193 const OnixS::FIX::Message & decode(const unsigned char * buffer, size_t bufferSize);
194
205 const OnixS::FIX::Message & decode(const std::vector<char> & chunk); // Deprecated
207
221 bool tryDecode(const char * buffer, size_t offset, size_t count, OnixS::FIX::Message * message, size_t * numberOfDecodedBytes); // Deprecated
222 bool tryDecode(const unsigned char * buffer, size_t offset, size_t count, OnixS::FIX::Message * message, size_t * numberOfDecodedBytes);
223
232 static bool tryDecodeUnsignedInteger(const char * buffer, size_t bufferSize, unsigned int * value, size_t * fieldLength); // Deprecated
233 static bool tryDecodeUnsignedInteger(const unsigned char * buffer, size_t bufferSize, unsigned int * value, size_t * fieldLength);
234
238 void reset();
239
245
261
266
273 static void generateFixDictionary(const std::string & fastTemplateXml,
274 const std::string & fixDictionaryId, std::string * fixDictionaryXml);
275
283 const std::string & fastTemplateXml, const std::string & fixDictionaryId,
284 std::string * fixDictionaryXml);
285private:
287
288 Decoder(const Decoder &);
289 Decoder & operator = (const Decoder &);
290
291 class Impl;
292 Impl * impl_;
293};
294
295}
296}
297}
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
Identifies the FIX messages dictionary.
Definition Dictionary.h:132
bool tryDecode(const unsigned char *buffer, size_t offset, size_t count, OnixS::FIX::Message *message, size_t *numberOfDecodedBytes)
const OnixS::FIX::Message & decode(const unsigned char *buffer, size_t bufferSize)
Decoder(const std::string &xmlTemplates, const OnixS::FIX::Dictionary &fixDictionary, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
void maximumNumberOfRepeatingGroupEntries(int value)
const OnixS::FIX::Message & decode(const std::vector< char > &chunk)
static void generateFixDictionary(const std::string &fastTemplateXml, const std::string &fixDictionaryId, std::string *fixDictionaryXml)
const OnixS::FIX::Message & decode(const char *buffer, size_t bufferSize)
Decoder(const std::string &xmlTemplates, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
Decoder(ProtocolVersion::Enum baseVersionForGeneratedDictionary, const std::string &xmlTemplates, const std::string &genericFixDictionaryId, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
InputDataTraits::Enum inputDataTraits() const
static bool tryDecodeUnsignedInteger(const char *buffer, size_t bufferSize, unsigned int *value, size_t *fieldLength)
int maximumNumberOfRepeatingGroupEntries() const
friend ONIXS_FIXENGINE_API_DECL(class, OnixS::FIX::Dictionary)
static void generateFixDictionary(ProtocolVersion::Enum baseVersion, const std::string &fastTemplateXml, const std::string &fixDictionaryId, std::string *fixDictionaryXml)
static bool tryDecodeUnsignedInteger(const unsigned char *buffer, size_t bufferSize, unsigned int *value, size_t *fieldLength)
OnixS::FIX::Dictionary fixDictionary() const
Decoder(ProtocolVersion::Enum baseVersionForGeneratedDictionary, const std::string &xmlTemplates, bool decodeEachMessageIndependently, InputDataTraits::Enum inputDataTraits)
bool tryDecode(const char *buffer, size_t offset, size_t count, OnixS::FIX::Message *message, size_t *numberOfDecodedBytes)
const OnixS::FIX::Message & decode(const OnixS::Sockets::Bytes &chunk)
~Decoder()
The destructor.
~Encoder(void)
The destructor.
size_t encode(const OnixS::FIX::Message &fixMessage, int templateID, char *buffer, size_t bufferSize)
size_t encode(const OnixS::FIX::Message &fixMessage, char *buffer, size_t bufferSize)
Encoder(ProtocolVersion::Enum baseVersion, const std::string &xmlTemplates, bool encodeEachMessageIndependently)
Encoder(const std::string &xmlTemplates, ProtocolVersion::Enum fixVersion, bool encodeEachMessageIndependently)
size_t encode(const OnixS::FIX::Message &fixMessage, unsigned char *buffer, size_t bufferSize)
Encoder(ProtocolVersion::Enum baseVersion, const std::string &xmlTemplates, const std::string &genericFixDictionaryId, bool encodeEachMessageIndependently)
Encoder(const std::string &xmlTemplates, bool encodeEachMessageIndependently)
size_t encode(const OnixS::FIX::Message &fixMessage, int templateID, unsigned char *buffer, size_t bufferSize)
friend ONIXS_FIXENGINE_API_DECL(class, OnixS::FIX::Dictionary)
OnixS::FIX::Dictionary fixDictionary() const
Encoder(const std::string &xmlTemplates, const std::string &fixDictionaryId, bool encodeEachMessageIndependently)
ONIXS_FIXENGINE_API_DECL(class, IEngineListener)
std::vector< Byte > Bytes
Sequence of bytes.
Definition Definitions.h:43