SubscriberRecord.h
Go to the documentation of this file.
1// **********************************************************************
2//
3// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
4//
5// This copy of Ice is licensed to you under the terms described in the
6// ICE_LICENSE file included in this distribution.
7//
8// **********************************************************************
9//
10// Ice version 3.7.0
11//
12// <auto-generated>
13//
14// Generated from file `SubscriberRecord.ice'
15//
16// Warning: do not edit this file.
17//
18// </auto-generated>
19//
20
21#ifndef __IceStorm_SubscriberRecord_h__
22#define __IceStorm_SubscriberRecord_h__
23
24#include <Ice/Comparable.h>
25#include <Ice/Exception.h>
26#include <Ice/ExceptionHelpers.h>
27#include <Ice/FactoryTableInit.h>
28#include <Ice/GCObject.h>
29#include <Ice/Identity.h>
30#include <Ice/Incoming.h>
31#include <Ice/LocalObject.h>
32#include <Ice/Object.h>
33#include <Ice/ObjectF.h>
34#include <Ice/Optional.h>
35#include <Ice/Proxy.h>
36#include <Ice/ProxyF.h>
37#include <Ice/StreamHelpers.h>
38#include <Ice/Value.h>
39#include <Ice/ValueF.h>
40#include <IceStorm/IceStorm.h>
41#include <IceUtil/PushDisableWarnings.h>
42#include <IceUtil/ScopedArray.h>
43#include <IceUtil/UndefSysMacros.h>
44
45#ifndef ICE_IGNORE_VERSION
46#if ICE_INT_VERSION / 100 != 307
47#error Ice version mismatch!
48#endif
49#if ICE_INT_VERSION % 100 > 50
50#error Beta header file detected
51#endif
52#if ICE_INT_VERSION % 100 < 0
53#error Ice patch level mismatch!
54#endif
55#endif
56
57#ifdef ICE_CPP11_MAPPING // C++11 mapping
58
59namespace IceStorm
60{
61
63 {
64 ::Ice::Identity topic;
65 ::Ice::Identity id;
66
67 std::tuple<const ::Ice::Identity&, const ::Ice::Identity&>
68 ice_tuple() const
69 {
70 return std::tie(topic, id);
71 }
72 };
73
74 struct SubscriberRecord
75 {
76 ::std::string topicName;
77 ::Ice::Identity id;
78 bool link;
79 ::std::shared_ptr<::Ice::ObjectPrx> obj;
80 ::IceStorm::QoS theQoS;
81 int cost;
82 ::std::shared_ptr<::IceStorm::TopicPrx> theTopic;
83
84 std::tuple<const ::std::string&,
85 const ::Ice::Identity&,
86 const bool&,
87 const ::std::shared_ptr<::Ice::ObjectPrx>&,
88 const ::IceStorm::QoS&,
89 const int&,
90 const ::std::shared_ptr<::IceStorm::TopicPrx>&>
91 ice_tuple() const
92 {
93 return std::tie(topicName, id, link, obj, theQoS, cost, theTopic);
94 }
95 };
96
97 using SubscriberRecordSeq = ::std::vector<::IceStorm::SubscriberRecord>;
98
99 using Ice::operator<;
100 using Ice::operator<=;
101 using Ice::operator>;
102 using Ice::operator>=;
103 using Ice::operator==;
104 using Ice::operator!=;
105
106} // namespace IceStorm
107
108namespace Ice
109{
110
111 template <>
112 struct StreamableTraits<::IceStorm::SubscriberRecordKey>
113 {
114 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
115 static const int minWireSize = 4;
116 static const bool fixedLength = false;
117 };
118
119 template <typename S>
120 struct StreamReader<::IceStorm::SubscriberRecordKey, S>
121 {
122 static void
123 read(S* istr, ::IceStorm::SubscriberRecordKey& v)
124 {
125 istr->readAll(v.topic, v.id);
126 }
127 };
128
129 template <>
130 struct StreamableTraits<::IceStorm::SubscriberRecord>
131 {
132 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
133 static const int minWireSize = 13;
134 static const bool fixedLength = false;
135 };
136
137 template <typename S>
138 struct StreamReader<::IceStorm::SubscriberRecord, S>
139 {
140 static void
141 read(S* istr, ::IceStorm::SubscriberRecord& v)
142 {
143 istr->readAll(v.topicName, v.id, v.link, v.obj, v.theQoS, v.cost, v.theTopic);
144 }
145 };
146
147} // namespace Ice
148
149#else // C++98 mapping
150
151namespace IceProxy
152{
153
154}
155
156namespace IceStorm
157{
158
160 {
161 ::Ice::Identity topic;
162 ::Ice::Identity id;
163
164 bool
166 {
167 if (this == &rhs_)
168 {
169 return true;
170 }
171 if (topic != rhs_.topic)
172 {
173 return false;
174 }
175 if (id != rhs_.id)
176 {
177 return false;
178 }
179 return true;
180 }
181
182 bool
183 operator<(const SubscriberRecordKey& rhs_) const
184 {
185 if (this == &rhs_)
186 {
187 return false;
188 }
189 if (topic < rhs_.topic)
190 {
191 return true;
192 }
193 else if (rhs_.topic < topic)
194 {
195 return false;
196 }
197 if (id < rhs_.id)
198 {
199 return true;
200 }
201 else if (rhs_.id < id)
202 {
203 return false;
204 }
205 return false;
206 }
207
208 bool
210 {
211 return !operator==(rhs_);
212 }
213
214 bool
215 operator<=(const SubscriberRecordKey& rhs_) const
216 {
217 return operator<(rhs_) || operator==(rhs_);
218 }
219
220 bool
222 {
223 return !operator<(rhs_) && !operator==(rhs_);
224 }
225
226 bool
228 {
229 return !operator<(rhs_);
230 }
231 };
232
234 {
235 ::std::string topicName;
236 ::Ice::Identity id;
237 bool link;
238 ::Ice::ObjectPrx obj;
239 ::IceStorm::QoS theQoS;
240 ::Ice::Int cost;
242 };
243
244 typedef ::std::vector<::IceStorm::SubscriberRecord> SubscriberRecordSeq;
245
246} // namespace IceStorm
247
248namespace IceProxy
249{
250
251}
252
253namespace Ice
254{
255
256 template <>
257 struct StreamableTraits<::IceStorm::SubscriberRecordKey>
258 {
259 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
260 static const int minWireSize = 4;
261 static const bool fixedLength = false;
262 };
263
264 template <typename S>
265 struct StreamWriter<::IceStorm::SubscriberRecordKey, S>
266 {
267 static void
268 write(S* ostr, const ::IceStorm::SubscriberRecordKey& v)
269 {
270 ostr->write(v.topic);
271 ostr->write(v.id);
272 }
273 };
274
275 template <typename S>
276 struct StreamReader<::IceStorm::SubscriberRecordKey, S>
277 {
278 static void
280 {
281 istr->read(v.topic);
282 istr->read(v.id);
283 }
284 };
285
286 template <>
287 struct StreamableTraits<::IceStorm::SubscriberRecord>
288 {
289 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
290 static const int minWireSize = 13;
291 static const bool fixedLength = false;
292 };
293
294 template <typename S>
295 struct StreamWriter<::IceStorm::SubscriberRecord, S>
296 {
297 static void
298 write(S* ostr, const ::IceStorm::SubscriberRecord& v)
299 {
300 ostr->write(v.topicName);
301 ostr->write(v.id);
302 ostr->write(v.link);
303 ostr->write(v.obj);
304 ostr->write(v.theQoS);
305 ostr->write(v.cost);
306 ostr->write(v.theTopic);
307 }
308 };
309
310 template <typename S>
311 struct StreamReader<::IceStorm::SubscriberRecord, S>
312 {
313 static void
315 {
316 istr->read(v.topicName);
317 istr->read(v.id);
318 istr->read(v.link);
319 istr->read(v.obj);
320 istr->read(v.theQoS);
321 istr->read(v.cost);
322 istr->read(v.theTopic);
323 }
324 };
325
326} // namespace Ice
327
328#endif
329
330#include <IceUtil/PopDisableWarnings.h>
331#endif
::IceInternal::ProxyHandle<::IceProxy::IceStorm::Topic > TopicPrx
Definition IceManager.h:70
::std::vector<::IceStorm::SubscriberRecord > SubscriberRecordSeq
double v(double t, double v0, double a0, double j)
Definition CtrlUtil.h:39
void read(auto &eigen, auto *table)
The key for persistent subscribers, or topics.
bool operator>=(const SubscriberRecordKey &rhs_) const
bool operator<(const SubscriberRecordKey &rhs_) const
bool operator==(const SubscriberRecordKey &rhs_) const
bool operator!=(const SubscriberRecordKey &rhs_) const
bool operator>(const SubscriberRecordKey &rhs_) const
bool operator<=(const SubscriberRecordKey &rhs_) const
Used to store persistent information for persistent subscribers.
::IceStorm::TopicPrx theTopic
static void read(S *istr, ::IceStorm::SubscriberRecordKey &v)
static void read(S *istr, ::IceStorm::SubscriberRecord &v)
static void write(S *ostr, const ::IceStorm::SubscriberRecordKey &v)
static void write(S *ostr, const ::IceStorm::SubscriberRecord &v)