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 <IceUtil/PushDisableWarnings.h>
25 #include <Ice/ProxyF.h>
26 #include <Ice/ObjectF.h>
27 #include <Ice/ValueF.h>
28 #include <Ice/Exception.h>
29 #include <Ice/LocalObject.h>
30 #include <Ice/StreamHelpers.h>
31 #include <Ice/Comparable.h>
32 #include <Ice/Proxy.h>
33 #include <Ice/Object.h>
34 #include <Ice/GCObject.h>
35 #include <Ice/Value.h>
36 #include <Ice/Incoming.h>
37 #include <Ice/FactoryTableInit.h>
38 #include <IceUtil/ScopedArray.h>
39 #include <Ice/Optional.h>
40 #include <Ice/ExceptionHelpers.h>
41 #include <Ice/Identity.h>
42 #include <IceStorm/IceStorm.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 
59 namespace IceStorm
60 {
61 
62  struct SubscriberRecordKey
63  {
66 
67  std::tuple<const ::Ice::Identity&, const ::Ice::Identity&> ice_tuple() const
68  {
69  return std::tie(topic, id);
70  }
71  };
72 
73  struct SubscriberRecord
74  {
75  ::std::string topicName;
77  bool link;
78  ::std::shared_ptr<::Ice::ObjectPrx> obj;
79  ::IceStorm::QoS theQoS;
80  int cost;
81  ::std::shared_ptr<::IceStorm::TopicPrx> theTopic;
82 
83  std::tuple<const ::std::string&, const ::Ice::Identity&, const bool&, const ::std::shared_ptr<::Ice::ObjectPrx>&, const ::IceStorm::QoS&, const int&, const ::std::shared_ptr<::IceStorm::TopicPrx>&> ice_tuple() const
84  {
85  return std::tie(topicName, id, link, obj, theQoS, cost, theTopic);
86  }
87  };
88 
89  using SubscriberRecordSeq = ::std::vector<::IceStorm::SubscriberRecord>;
90 
91  using Ice::operator<;
92  using Ice::operator<=;
93  using Ice::operator>;
94  using Ice::operator>=;
95  using Ice::operator==;
96  using Ice::operator!=;
97 
98 }
99 
100 namespace Ice
101 {
102 
103  template<>
104  struct StreamableTraits<::IceStorm::SubscriberRecordKey>
105  {
106  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
107  static const int minWireSize = 4;
108  static const bool fixedLength = false;
109  };
110 
111  template<typename S>
112  struct StreamReader<::IceStorm::SubscriberRecordKey, S>
113  {
114  static void read(S* istr, ::IceStorm::SubscriberRecordKey& v)
115  {
116  istr->readAll(v.topic, v.id);
117  }
118  };
119 
120  template<>
121  struct StreamableTraits<::IceStorm::SubscriberRecord>
122  {
123  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
124  static const int minWireSize = 13;
125  static const bool fixedLength = false;
126  };
127 
128  template<typename S>
129  struct StreamReader<::IceStorm::SubscriberRecord, S>
130  {
131  static void read(S* istr, ::IceStorm::SubscriberRecord& v)
132  {
133  istr->readAll(v.topicName, v.id, v.link, v.obj, v.theQoS, v.cost, v.theTopic);
134  }
135  };
136 
137 }
138 
139 #else // C++98 mapping
140 
141 namespace IceProxy
142 {
143 
144 }
145 
146 namespace IceStorm
147 {
148 
150  {
153 
154  bool operator==(const SubscriberRecordKey& rhs_) const
155  {
156  if (this == &rhs_)
157  {
158  return true;
159  }
160  if (topic != rhs_.topic)
161  {
162  return false;
163  }
164  if (id != rhs_.id)
165  {
166  return false;
167  }
168  return true;
169  }
170 
171  bool operator<(const SubscriberRecordKey& rhs_) const
172  {
173  if (this == &rhs_)
174  {
175  return false;
176  }
177  if (topic < rhs_.topic)
178  {
179  return true;
180  }
181  else if (rhs_.topic < topic)
182  {
183  return false;
184  }
185  if (id < rhs_.id)
186  {
187  return true;
188  }
189  else if (rhs_.id < id)
190  {
191  return false;
192  }
193  return false;
194  }
195 
196  bool operator!=(const SubscriberRecordKey& rhs_) const
197  {
198  return !operator==(rhs_);
199  }
200  bool operator<=(const SubscriberRecordKey& rhs_) const
201  {
202  return operator<(rhs_) || operator==(rhs_);
203  }
204  bool operator>(const SubscriberRecordKey& rhs_) const
205  {
206  return !operator<(rhs_) && !operator==(rhs_);
207  }
208  bool operator>=(const SubscriberRecordKey& rhs_) const
209  {
210  return !operator<(rhs_);
211  }
212  };
213 
215  {
216  ::std::string topicName;
218  bool link;
219  ::Ice::ObjectPrx obj;
220  ::IceStorm::QoS theQoS;
223  };
224 
225  typedef ::std::vector< ::IceStorm::SubscriberRecord> SubscriberRecordSeq;
226 
227 }
228 
229 namespace IceProxy
230 {
231 
232 }
233 
234 namespace Ice
235 {
236 
237  template<>
238  struct StreamableTraits< ::IceStorm::SubscriberRecordKey>
239  {
240  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
241  static const int minWireSize = 4;
242  static const bool fixedLength = false;
243  };
244 
245  template<typename S>
246  struct StreamWriter< ::IceStorm::SubscriberRecordKey, S>
247  {
248  static void write(S* ostr, const ::IceStorm::SubscriberRecordKey& v)
249  {
250  ostr->write(v.topic);
251  ostr->write(v.id);
252  }
253  };
254 
255  template<typename S>
256  struct StreamReader< ::IceStorm::SubscriberRecordKey, S>
257  {
258  static void read(S* istr, ::IceStorm::SubscriberRecordKey& v)
259  {
260  istr->read(v.topic);
261  istr->read(v.id);
262  }
263  };
264 
265  template<>
266  struct StreamableTraits< ::IceStorm::SubscriberRecord>
267  {
268  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
269  static const int minWireSize = 13;
270  static const bool fixedLength = false;
271  };
272 
273  template<typename S>
274  struct StreamWriter< ::IceStorm::SubscriberRecord, S>
275  {
276  static void write(S* ostr, const ::IceStorm::SubscriberRecord& v)
277  {
278  ostr->write(v.topicName);
279  ostr->write(v.id);
280  ostr->write(v.link);
281  ostr->write(v.obj);
282  ostr->write(v.theQoS);
283  ostr->write(v.cost);
284  ostr->write(v.theTopic);
285  }
286  };
287 
288  template<typename S>
289  struct StreamReader< ::IceStorm::SubscriberRecord, S>
290  {
291  static void read(S* istr, ::IceStorm::SubscriberRecord& v)
292  {
293  istr->read(v.topicName);
294  istr->read(v.id);
295  istr->read(v.link);
296  istr->read(v.obj);
297  istr->read(v.theQoS);
298  istr->read(v.cost);
299  istr->read(v.theTopic);
300  }
301  };
302 
303 }
304 
305 #endif
306 
307 #include <IceUtil/PopDisableWarnings.h>
308 #endif
IceStorm::SubscriberRecordSeq
::std::vector< ::IceStorm::SubscriberRecord > SubscriberRecordSeq
Definition: SubscriberRecord.h:225
Ice::StreamWriter< ::IceStorm::SubscriberRecord, S >::write
static void write(S *ostr, const ::IceStorm::SubscriberRecord &v)
Definition: SubscriberRecord.h:276
IceStorm
Definition: DBTypes.ice:22
IceStorm::SubscriberRecordKey::operator>=
bool operator>=(const SubscriberRecordKey &rhs_) const
Definition: SubscriberRecord.h:208
IceProxy
Definition: DBTypes.h:115
IceStorm::SubscriberRecordKey::topic
::Ice::Identity topic
Definition: SubscriberRecord.h:151
IceStorm::SubscriberRecordKey
The key for persistent subscribers, or topics.
Definition: SubscriberRecord.h:149
Ice::StreamReader< ::IceStorm::SubscriberRecordKey, S >::read
static void read(S *istr, ::IceStorm::SubscriberRecordKey &v)
Definition: SubscriberRecord.h:258
IceStorm::SubscriberRecordKey::operator<
bool operator<(const SubscriberRecordKey &rhs_) const
Definition: SubscriberRecord.h:171
IceStorm::SubscriberRecord::theQoS
::IceStorm::QoS theQoS
Definition: SubscriberRecord.h:220
IceStorm::SubscriberRecord
Used to store persistent information for persistent subscribers.
Definition: SubscriberRecord.h:214
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
Ice::StreamWriter< ::IceStorm::SubscriberRecordKey, S >::write
static void write(S *ostr, const ::IceStorm::SubscriberRecordKey &v)
Definition: SubscriberRecord.h:248
armarx::read
void read(auto &eigen, auto *table)
Definition: FTSensorCalibrationGuiWidgetController.cpp:462
IceStorm::SubscriberRecord::obj
::Ice::ObjectPrx obj
Definition: SubscriberRecord.h:219
IceStorm::SubscriberRecordKey::operator!=
bool operator!=(const SubscriberRecordKey &rhs_) const
Definition: SubscriberRecord.h:196
Ice
Definition: DBTypes.cpp:64
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
IceStorm::SubscriberRecord::cost
::Ice::Int cost
Definition: SubscriberRecord.h:221
IceStorm::SubscriberRecord::theTopic
::IceStorm::TopicPrx theTopic
Definition: SubscriberRecord.h:222
IceStorm::SubscriberRecordKey::operator<=
bool operator<=(const SubscriberRecordKey &rhs_) const
Definition: SubscriberRecord.h:200
IceStorm::SubscriberRecordKey::id
::Ice::Identity id
Definition: SubscriberRecord.h:152
IceInternal::ProxyHandle< ::IceProxy::IceStorm::Topic >
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
IceStorm::SubscriberRecord::id
::Ice::Identity id
Definition: SubscriberRecord.h:217
Ice::StreamReader< ::IceStorm::SubscriberRecord, S >::read
static void read(S *istr, ::IceStorm::SubscriberRecord &v)
Definition: SubscriberRecord.h:291
IceStorm::SubscriberRecordKey::operator>
bool operator>(const SubscriberRecordKey &rhs_) const
Definition: SubscriberRecord.h:204
IceStorm::SubscriberRecord::link
bool link
Definition: SubscriberRecord.h:218
IceStorm::SubscriberRecordKey::operator==
bool operator==(const SubscriberRecordKey &rhs_) const
Definition: SubscriberRecord.h:154
IceStorm::SubscriberRecord::topicName
::std::string topicName
Definition: SubscriberRecord.h:216