OnixS C++ FIX Engine 4.13.0
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 {
31class ONIXS_FIXENGINE_API ValidFieldValue
32{
33public:
35 std::string value() const;
36
38 std::string description() const;
39
40private:
41
42 friend class MessageOperator;
43
44 const char * value_;
45 const char * description_;
46
47 ValidFieldValue(const char * value, const char * description);
48};
49
51class ONIXS_FIXENGINE_API FieldInfo
52{
53public:
55 Tag tag() const;
56
58 bool isRequired() const;
59
61 std::vector<FieldInfo> childFields() const;
62
63private:
64
65 friend class MessageOperator;
66
67 const void * impl_;
68
69 FieldInfo(const void *);
70};
71
74{
75public:
81 Dictionary(const char * id);
82
86
88 const std::string & id() const;
89
93
98 const std::string & fieldName(Tag tag) const;
99
104 Tag fieldNumber(const std::string & name) const;
105
111 std::string fieldValueDescription(Tag tag, const std::string & value) const;
112
114 typedef std::vector<ValidFieldValue> ValidFieldValues;
115
122
124 typedef std::vector<std::string> MessageTypes;
125
128
133 std::string messageName(const std::string & type) const;
134
136 typedef std::vector<FieldInfo> FieldInfos;
137
139 FieldInfos messageFields(const std::string & type) const;
140
142 typedef std::vector<Tag> Tags;
143
145 Tags tags() const;
146
148 bool operator == (const Dictionary & other) const;
149
151 bool operator != (const Dictionary & other) const;
152
154 void swap(Dictionary & other);
155
156private:
157 friend class MessageOperator;
158
159 const void * impl_;
160
161 Dictionary(const void *);
162};
163}
164}
#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:136
const std::string & id() const
The dictionary unique identifier.
std::vector< Tag > Tags
The collection of tag numbers.
Definition Dictionary.h:142
ValidFieldValues validFieldValues(Tag tag) const
Returns valid field values (if they exist) of the corresponding FIX field.
std::string messageName(const std::string &type) const
Returns the message name by the given message type.
void swap(Dictionary &other)
Swaps two instances.
std::vector< std::string > MessageTypes
The collection of message types.
Definition Dictionary.h:124
std::vector< ValidFieldValue > ValidFieldValues
The collection of valid field values.
Definition Dictionary.h:114
std::string fieldValueDescription(Tag tag, const std::string &value) const
Returns the value description (if it exists) of the corresponding FIX field value.
friend class MessageOperator
Definition Dictionary.h:157
Tag fieldNumber(const std::string &name) const
Returns the tag number of the corresponding FIX field.
Dictionary(const char *id)
Initializes the dictionary according to the definition from the Engine configuration file.
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
Returns the name of the corresponding FIX field.
Dictionary(ProtocolVersion::Enum version)
Creates the dictionary that corresponds to the given FIX Protocol version.
ProtocolVersion::Enum version() const
The version of the FIX messaging specification (protocol) on which the dictionary is based.
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:65
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