OnixS C++ FIX Engine 4.14.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Dictionary.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#pragma once
21
22#include <string>
23#include <vector>
24
27
28namespace OnixS {
29namespace FIX {
30
87
89class ONIXS_FIXENGINE_API ValidFieldValue
90{
91public:
93 std::string value() const;
94
96 std::string description() const;
97
98private:
99
100 friend class MessageOperator;
101
102 const char * value_;
103 const char * description_;
104
105 ValidFieldValue(const char * value, const char * description);
106};
107
109class ONIXS_FIXENGINE_API FieldInfo
110{
111public:
113 Tag tag() const;
114
116 bool isRequired() const;
117
119 std::vector<FieldInfo> childFields() const;
120
121private:
122
123 friend class MessageOperator;
124
125 const void * impl_;
126
127 FieldInfo(const void *);
128};
129
132{
133public:
139 Dictionary(const char * id);
140
144
146 const std::string & id() const;
147
151
156 const std::string & fieldName(Tag tag) const;
157
166
171 Tag fieldNumber(const std::string & name) const;
172
178 std::string fieldValueDescription(Tag tag, const std::string & value) const;
179
181 typedef std::vector<ValidFieldValue> ValidFieldValues;
182
189
191 typedef std::vector<std::string> MessageTypes;
192
195
200 std::string messageName(const std::string & type) const;
201
203 typedef std::vector<FieldInfo> FieldInfos;
204
206 FieldInfos messageFields(const std::string & type) const;
207
209 typedef std::vector<Tag> Tags;
210
212 Tags tags() const;
213
215 bool operator == (const Dictionary & other) const;
216
218 bool operator != (const Dictionary & other) const;
219
221 void swap(Dictionary & other);
222
223private:
224 friend class MessageOperator;
225
226 const void * impl_;
227
228 Dictionary(const void *);
229};
230}
231}
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
MessageTypes messageTypes() const
Returns a collection of types of all messages available in this particular FIX dictionary.
std::vector< FieldInfo > FieldInfos
The collection of the FIX field information.
Definition Dictionary.h:203
const std::string & id() const
The dictionary unique identifier.
std::vector< Tag > Tags
The collection of tag numbers.
Definition Dictionary.h:209
ValidFieldValues validFieldValues(Tag tag) const
std::string messageName(const std::string &type) const
void swap(Dictionary &other)
Swaps two instances.
FieldValueTypes::Enum fieldType(Tag tag) const
std::vector< std::string > MessageTypes
The collection of message types.
Definition Dictionary.h:191
std::vector< ValidFieldValue > ValidFieldValues
The collection of valid field values.
Definition Dictionary.h:181
std::string fieldValueDescription(Tag tag, const std::string &value) const
friend class MessageOperator
Definition Dictionary.h:224
Tag fieldNumber(const std::string &name) const
Dictionary(const char *id)
FieldInfos messageFields(const std::string &type) const
Returns a collection of field descriptions that belong to the given message.
Tags tags() const
Returns a collection of all tags which belong to the dialect.
const std::string & fieldName(Tag tag) const
Dictionary(ProtocolVersion::Enum version)
ProtocolVersion::Enum version() const
Tag tag() const
Returns the tag number of the corresponding FIX field.
std::vector< FieldInfo > childFields() const
Returns the collection of child fields if this field identifies the repeating group.
friend class MessageOperator
Definition Dictionary.h:123
bool isRequired() const
Indicates if this field is a required one.
std::string description() const
Returns a valid value description of the corresponding FIX field.
std::string value() const
Returns a valid value of the corresponding FIX field.
unsigned Tag
Alias for tag numbers.
Definition Tag.h:28
Collection of field value FIX types.
Definition Dictionary.h:32
static ONIXS_FIXENGINE_API Enum parse(const std::string &fieldValueType)
static ONIXS_FIXENGINE_API const char * toString(Enum fieldValueType)