Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
Identity.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4//
5// Ice version 3.7.11
6//
7// <auto-generated>
8//
9// Generated from file `Identity.ice'
10//
11// Warning: do not edit this file.
12//
13// </auto-generated>
14//
15
16#ifndef __Ice_Identity_h__
17#define __Ice_Identity_h__
18
20#include <Ice/ProxyF.h>
21#include <Ice/ObjectF.h>
22#include <Ice/ValueF.h>
23#include <Ice/Exception.h>
24#include <Ice/LocalObject.h>
25#include <Ice/StreamHelpers.h>
26#include <Ice/Comparable.h>
27#include <IceUtil/ScopedArray.h>
28#include <Ice/Optional.h>
30
31#ifndef ICE_IGNORE_VERSION
32# if ICE_INT_VERSION / 100 != 307
33# error Ice version mismatch!
34# endif
35# if ICE_INT_VERSION % 100 >= 50
36# error Beta header file detected
37# endif
38# if ICE_INT_VERSION % 100 < 11
39# error Ice patch level mismatch!
40# endif
41#endif
42
43#ifndef ICE_API
44# if defined(ICE_STATIC_LIBS)
45# define ICE_API /**/
46# elif defined(ICE_API_EXPORTS)
47# define ICE_API ICE_DECLSPEC_EXPORT
48# else
49# define ICE_API ICE_DECLSPEC_IMPORT
50# endif
51#endif
52
53#ifdef ICE_CPP11_MAPPING // C++11 mapping
54
55namespace Ice
56{
57
66struct Identity
67{
71 ::std::string name;
75 ::std::string category;
76
81 std::tuple<const ::std::string&, const ::std::string&> ice_tuple() const
82 {
83 return std::tie(name, category);
84 }
85};
86
90using ObjectDict = ::std::map<Identity, ::std::shared_ptr<Object>>;
91
95using IdentitySeq = ::std::vector<Identity>;
96
97using Ice::operator<;
98using Ice::operator<=;
99using Ice::operator>;
100using Ice::operator>=;
101using Ice::operator==;
102using Ice::operator!=;
103
104}
105
107namespace Ice
108{
109
110template<>
111struct StreamableTraits<::Ice::Identity>
112{
113 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
114 static const int minWireSize = 2;
115 static const bool fixedLength = false;
116};
117
118template<typename S>
119struct StreamReader<::Ice::Identity, S>
120{
121 static void read(S* istr, ::Ice::Identity& v)
122 {
123 istr->readAll(v.name, v.category);
124 }
125};
126
127}
129
130#else // C++98 mapping
131
132namespace Ice
133{
134
144{
148 ::std::string name;
152 ::std::string category;
153
154 bool operator==(const Identity& rhs_) const
155 {
156 if(this == &rhs_)
157 {
158 return true;
159 }
160 if(name != rhs_.name)
161 {
162 return false;
163 }
164 if(category != rhs_.category)
165 {
166 return false;
167 }
168 return true;
169 }
170
171 bool operator<(const Identity& rhs_) const
172 {
173 if(this == &rhs_)
174 {
175 return false;
176 }
177 if(name < rhs_.name)
178 {
179 return true;
180 }
181 else if(rhs_.name < name)
182 {
183 return false;
184 }
185 if(category < rhs_.category)
186 {
187 return true;
188 }
189 else if(rhs_.category < category)
190 {
191 return false;
192 }
193 return false;
194 }
195
196 bool operator!=(const Identity& rhs_) const
197 {
198 return !operator==(rhs_);
199 }
200 bool operator<=(const Identity& rhs_) const
201 {
202 return operator<(rhs_) || operator==(rhs_);
203 }
204 bool operator>(const Identity& rhs_) const
205 {
206 return !operator<(rhs_) && !operator==(rhs_);
207 }
208 bool operator>=(const Identity& rhs_) const
209 {
210 return !operator<(rhs_);
211 }
212};
213
217typedef ::std::map<Identity, ObjectPtr> ObjectDict;
218
222typedef ::std::vector<Identity> IdentitySeq;
223
224}
225
227namespace Ice
228{
229
230template<>
231struct StreamableTraits< ::Ice::Identity>
232{
233 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
234 static const int minWireSize = 2;
235 static const bool fixedLength = false;
236};
237
238template<typename S>
239struct StreamWriter< ::Ice::Identity, S>
240{
241 static void write(S* ostr, const ::Ice::Identity& v)
242 {
243 ostr->write(v.name);
244 ostr->write(v.category);
245 }
246};
247
248template<typename S>
249struct StreamReader< ::Ice::Identity, S>
250{
251 static void read(S* istr, ::Ice::Identity& v)
252 {
253 istr->read(v.name);
254 istr->read(v.category);
255 }
256};
257
258}
260
261#endif
262
264#endif
Definition BuiltinSequences.h:113
::std::vector< Identity > IdentitySeq
A sequence of identities.
Definition Identity.h:222
::std::map< Identity, ObjectPtr > ObjectDict
A mapping between identities and Ice objects.
Definition Identity.h:217
The identity of an Ice object.
Definition Identity.h:144
bool operator>=(const Identity &rhs_) const
Definition Identity.h:208
bool operator==(const Identity &rhs_) const
Definition Identity.h:154
bool operator!=(const Identity &rhs_) const
Definition Identity.h:196
::std::string category
The Ice object category.
Definition Identity.h:152
bool operator<=(const Identity &rhs_) const
Definition Identity.h:200
::std::string name
The name of the Ice object.
Definition Identity.h:148
bool operator<(const Identity &rhs_) const
Definition Identity.h:171
bool operator>(const Identity &rhs_) const
Definition Identity.h:204