OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers 18.2.0
API documentation
Loading...
Searching...
No Matches
Group.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
24
25namespace OnixS
26{
27 namespace Eurex
28 {
29 namespace MarketData
30 {
33
40 class ONIXS_EUREX_EMDI_API GroupInstance : public FieldSet
41 {
42 public:
45
47 GroupInstance& operator = (const GroupInstance&);
48
49 private:
50 friend class MessageOperator;
51
52 GroupInstance (const Message*, void*);
53 };
54
66 class ONIXS_EUREX_EMDI_API Group
67 {
68 public:
70 Group (const Group& other);
71
73 operator bool() const;
74
80 size_t size() const;
81
89 const GroupInstance at (size_t index) const;
90
98 const GroupInstance operator [] (size_t index) const;
99
101 Group& operator = (const Group& other);
102
103
105 void swap(Group&) throw();
106
107 private:
108 friend class MessageOperator;
109
110 const Message* container_;
111
112 void* impl_;
113
114 Group (const Message*, void*);
115 };
116
117 template<class Entry>
118 class TypedGroup : protected Group
119 {
120 public:
122 using Group::size;
123
125 bool empty() const
126 {
127 return 0 == size();
128 }
129
133 const Entry at (size_t index) const
134 {
135 if (index < size() )
136 return Entry (this->Group::operator[] (index) );
137
138 throw std::out_of_range ("Index");
139 }
140
144 Entry operator [] (size_t index) const
145 {
146 return Entry (this->Group::operator[] (index) );
147 }
148
149 protected:
150 explicit
151 TypedGroup (const Group& group)
152 : Group (group)
153 {
154 }
155 };
156 }
157 }
158}
#define ONIXS_EUREX_EMDI_API_DECL(typeKind, typeName)
Definition ABI.h:27
GroupInstance(const GroupInstance &other)
Initializes instance as reference to the other one.
const GroupInstance at(size_t index) const
Group(const Group &other)
Initializes instance as reference to given repeating group.
size_t size() const
Return number of instances in the repeating group.
bool empty() const
Indicates whether set has an entries.
Definition Group.h:125
const Entry at(size_t index) const
Definition Group.h:133
Entry operator[](size_t index) const
Definition Group.h:144
TypedGroup(const Group &group)
Definition Group.h:151