Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Lookup.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'Lookup.ice'.</auto-generated>
5// clang-format off
6
7#ifndef IceLocatorDiscovery_Lookup_h_
8#define IceLocatorDiscovery_Lookup_h_
9
11#include <Ice/Ice.h>
12#include <Ice/Locator.h>
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION != 30850
16# error Ice version mismatch: an exact match is required for beta generated code
17# endif
18#endif
19
20// NOLINTBEGIN(modernize-concat-nested-namespaces)
21
22/// IceLocatorDiscovery is an Ice plug-in that enables the discovery of Ice locators (such as IceGrid) via UDP
23/// multicast.
25{
26 class LookupReplyPrx;
27
28 class LookupPrx;
29}
30
31namespace IceLocatorDiscovery
32{
33 /// Represents a callback object implemented by IceLocatorDiscovery clients. It allows IceLocatorDiscovery clients
34 /// to receive replies to LookupPrx requests.
35 /// @see Lookup
36 class LookupReplyPrx : public Ice::Proxy<LookupReplyPrx, Ice::ObjectPrx>
37 {
38 public:
39 /// Constructs a proxy from a Communicator and a proxy string.
40 /// @param communicator The communicator of the new proxy.
41 /// @param proxyString The proxy string to parse.
42 LookupReplyPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
43
44 /// Copy constructor. Constructs with a copy of the contents of @p other.
45 /// @param other The proxy to copy from.
46 LookupReplyPrx(const LookupReplyPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
47
48 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
49 /// @param other The proxy to move from.
50 LookupReplyPrx(LookupReplyPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
51
52 ~LookupReplyPrx() override;
53
54 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
55 /// @param rhs The proxy to copy from.
56 /// @return A reference to this proxy.
58 {
59 if (this != &rhs)
60 {
62 }
63 return *this;
64 }
65
66 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
67 /// @param rhs The proxy to move from.
69 {
70 if (this != &rhs)
71 {
72 Ice::ObjectPrx::operator=(std::move(rhs));
73 }
74 return *this;
75 }
76
77 /// Provides a reply to a ::IceLocatorDiscovery::LookupPrx::findLocator request.
78 /// @param prx The proxy of the locator.
79 /// @param context The request context.
80 void foundLocator(const std::optional<::Ice::LocatorPrx>& prx, const Ice::Context& context = Ice::noExplicitContext) const;
81
82 /// Provides a reply to a ::IceLocatorDiscovery::LookupPrx::findLocator request.
83 /// @param prx The proxy of the locator.
84 /// @param context The request context.
85 /// @return A future that becomes available when the invocation completes.
86 [[nodiscard]] std::future<void> foundLocatorAsync(const std::optional<::Ice::LocatorPrx>& prx, const Ice::Context& context = Ice::noExplicitContext) const;
87
88 /// Provides a reply to a ::IceLocatorDiscovery::LookupPrx::findLocator request.
89 /// @param prx The proxy of the locator.
90 /// @param response The response callback.
91 /// @param exception The exception callback.
92 /// @param sent The sent callback.
93 /// @param context The request context.
94 /// @return A function that can be called to cancel the invocation locally.
95 // NOLINTNEXTLINE(modernize-use-nodiscard)
96 std::function<void()> foundLocatorAsync(const std::optional<::Ice::LocatorPrx>& prx, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
97
98 /// @private
99 void _iceI_foundLocator(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const std::optional<::Ice::LocatorPrx>&, const Ice::Context&) const;
100
101 /// Gets the type ID of the associated Slice interface.
102 /// @return The string `"::IceLocatorDiscovery::LookupReply"`.
103 static const char* ice_staticId() noexcept;
104
105 /// @private
106 static LookupReplyPrx _fromReference(IceInternal::ReferencePtr ref) { return LookupReplyPrx{std::move(ref)}; }
107
108 protected:
109 /// @private
110 LookupReplyPrx() = default;
111
112 /// @private
113 explicit LookupReplyPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
114 {
115 }
116 };
117
118 /// Looks for a locator using UDP multicast.
119 /// @remarks This interface is implemented by Ice locator implementations and can be used by clients to find
120 /// available Ice locators on the network.
121 /// Ice locator implementations provide a well-known `Ice/LocatorLookup` object accessible through UDP multicast.
122 /// Clients typically make a multicast `findLocator` request to find the locator proxy.
123 /// @see LookupReply
124 class LookupPrx : public Ice::Proxy<LookupPrx, Ice::ObjectPrx>
125 {
126 public:
127 /// Constructs a proxy from a Communicator and a proxy string.
128 /// @param communicator The communicator of the new proxy.
129 /// @param proxyString The proxy string to parse.
130 LookupPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
131
132 /// Copy constructor. Constructs with a copy of the contents of @p other.
133 /// @param other The proxy to copy from.
134 LookupPrx(const LookupPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
135
136 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
137 /// @param other The proxy to move from.
138 LookupPrx(LookupPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
139
140 ~LookupPrx() override;
141
142 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
143 /// @param rhs The proxy to copy from.
144 /// @return A reference to this proxy.
145 LookupPrx& operator=(const LookupPrx& rhs) noexcept
146 {
147 if (this != &rhs)
148 {
150 }
151 return *this;
152 }
153
154 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
155 /// @param rhs The proxy to move from.
157 {
158 if (this != &rhs)
159 {
160 Ice::ObjectPrx::operator=(std::move(rhs));
161 }
162 return *this;
163 }
164
165 /// Finds a locator proxy with the given @p instanceName.
166 /// @param instanceName Restrict the search to Ice registries configured with the given instance name. If
167 /// empty, all the available registries will reply.
168 /// @param reply The reply object to use to send the reply.
169 /// @param context The request context.
170 void findLocator(std::string_view instanceName, const std::optional<LookupReplyPrx>& reply, const Ice::Context& context = Ice::noExplicitContext) const;
171
172 /// Finds a locator proxy with the given @p instanceName.
173 /// @param instanceName Restrict the search to Ice registries configured with the given instance name. If
174 /// empty, all the available registries will reply.
175 /// @param reply The reply object to use to send the reply.
176 /// @param context The request context.
177 /// @return A future that becomes available when the invocation completes.
178 [[nodiscard]] std::future<void> findLocatorAsync(std::string_view instanceName, const std::optional<LookupReplyPrx>& reply, const Ice::Context& context = Ice::noExplicitContext) const;
179
180 /// Finds a locator proxy with the given @p instanceName.
181 /// @param instanceName Restrict the search to Ice registries configured with the given instance name. If
182 /// empty, all the available registries will reply.
183 /// @param reply The reply object to use to send the reply.
184 /// @param response The response callback.
185 /// @param exception The exception callback.
186 /// @param sent The sent callback.
187 /// @param context The request context.
188 /// @return A function that can be called to cancel the invocation locally.
189 // NOLINTNEXTLINE(modernize-use-nodiscard)
190 std::function<void()> findLocatorAsync(std::string_view instanceName, const std::optional<LookupReplyPrx>& reply, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
191
192 /// @private
193 void _iceI_findLocator(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::string_view, const std::optional<LookupReplyPrx>&, const Ice::Context&) const;
194
195 /// Gets the type ID of the associated Slice interface.
196 /// @return The string `"::IceLocatorDiscovery::Lookup"`.
197 static const char* ice_staticId() noexcept;
198
199 /// @private
200 static LookupPrx _fromReference(IceInternal::ReferencePtr ref) { return LookupPrx{std::move(ref)}; }
201
202 protected:
203 /// @private
204 LookupPrx() = default;
205
206 /// @private
207 explicit LookupPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
208 {
209 }
210 };
211}
212
213namespace IceLocatorDiscovery
214{
215 /// Represents a callback object implemented by IceLocatorDiscovery clients. It allows IceLocatorDiscovery clients
216 /// to receive replies to LookupPrx requests.
217 /// @see Lookup
218 class LookupReply : public virtual Ice::Object
219 {
220 public:
221 /// The associated proxy type.
223
224 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
225 /// @param request The incoming request.
226 /// @param sendResponse The callback to send the response.
227 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
228
229 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
230
231 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
232
233 /// Provides a reply to a ::IceLocatorDiscovery::LookupPrx::findLocator request.
234 /// @param prx The proxy of the locator.
235 /// @param current The Current object of the incoming request.
236 virtual void foundLocator(std::optional<::Ice::LocatorPrx> prx, const Ice::Current& current) = 0;
237
238 /// @private
239 void _iceD_foundLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
240
241 /// Gets the type ID of the associated Slice interface.
242 /// @return The string `"::IceLocatorDiscovery::LookupReply"`.
243 static const char* ice_staticId() noexcept;
244 };
245
246 /// A shared pointer to a LookupReply.
247 using LookupReplyPtr = std::shared_ptr<LookupReply>;
248
249 /// Looks for a locator using UDP multicast.
250 /// @remarks This interface is implemented by Ice locator implementations and can be used by clients to find
251 /// available Ice locators on the network.
252 /// Ice locator implementations provide a well-known `Ice/LocatorLookup` object accessible through UDP multicast.
253 /// Clients typically make a multicast `findLocator` request to find the locator proxy.
254 /// @see LookupReply
255 class Lookup : public virtual Ice::Object
256 {
257 public:
258 /// The associated proxy type.
260
261 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
262 /// @param request The incoming request.
263 /// @param sendResponse The callback to send the response.
264 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
265
266 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
267
268 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
269
270 /// Finds a locator proxy with the given @p instanceName.
271 /// @param instanceName Restrict the search to Ice registries configured with the given instance name. If
272 /// empty, all the available registries will reply.
273 /// @param reply The reply object to use to send the reply.
274 /// @param current The Current object of the incoming request.
275 virtual void findLocator(std::string instanceName, std::optional<LookupReplyPrx> reply, const Ice::Current& current) = 0;
276
277 /// @private
278 void _iceD_findLocator(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
279
280 /// Gets the type ID of the associated Slice interface.
281 /// @return The string `"::IceLocatorDiscovery::Lookup"`.
282 static const char* ice_staticId() noexcept;
283 };
284
285 /// A shared pointer to a Lookup.
286 using LookupPtr = std::shared_ptr<Lookup>;
287}
288
289// NOLINTEND(modernize-concat-nested-namespaces)
290
291#include <Ice/PopDisableWarnings.h>
292#endif
LookupPrx & operator=(LookupPrx &&rhs) noexcept
Move assignment operator.
Definition Lookup.h:156
std::function< void()> findLocatorAsync(std::string_view instanceName, const std::optional< LookupReplyPrx > &reply, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a locator proxy with the given instanceName.
LookupPrx(const LookupPrx &other) noexcept
Copy constructor.
Definition Lookup.h:134
void findLocator(std::string_view instanceName, const std::optional< LookupReplyPrx > &reply, const Ice::Context &context=Ice::noExplicitContext) const
Finds a locator proxy with the given instanceName.
LookupPrx(LookupPrx &&other) noexcept
Move constructor.
Definition Lookup.h:138
std::future< void > findLocatorAsync(std::string_view instanceName, const std::optional< LookupReplyPrx > &reply, const Ice::Context &context=Ice::noExplicitContext) const
Finds a locator proxy with the given instanceName.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
LookupPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Lookup.h:130
LookupPrx & operator=(const LookupPrx &rhs) noexcept
Copy assignment operator.
Definition Lookup.h:145
Looks for a locator using UDP multicast.
Definition Lookup.h:125
LookupReplyPrx(const LookupReplyPrx &other) noexcept
Copy constructor.
Definition Lookup.h:46
LookupReplyPrx(LookupReplyPrx &&other) noexcept
Move constructor.
Definition Lookup.h:50
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
LookupReplyPrx & operator=(const LookupReplyPrx &rhs) noexcept
Copy assignment operator.
Definition Lookup.h:57
void foundLocator(const std::optional<::Ice::LocatorPrx > &prx, const Ice::Context &context=Ice::noExplicitContext) const
Provides a reply to a IceLocatorDiscovery::LookupPrx::findLocator request.
std::future< void > foundLocatorAsync(const std::optional<::Ice::LocatorPrx > &prx, const Ice::Context &context=Ice::noExplicitContext) const
Provides a reply to a IceLocatorDiscovery::LookupPrx::findLocator request.
LookupReplyPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Lookup.h:42
LookupReplyPrx & operator=(LookupReplyPrx &&rhs) noexcept
Move assignment operator.
Definition Lookup.h:68
std::function< void()> foundLocatorAsync(const std::optional<::Ice::LocatorPrx > &prx, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Provides a reply to a IceLocatorDiscovery::LookupPrx::findLocator request.
Represents a callback object implemented by IceLocatorDiscovery clients.
Definition Lookup.h:37
LookupReplyPrx ProxyType
The associated proxy type.
Definition Lookup.h:222
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
virtual void foundLocator(std::optional<::Ice::LocatorPrx > prx, const Ice::Current &current)=0
Provides a reply to a IceLocatorDiscovery::LookupPrx::findLocator request.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
Represents a callback object implemented by IceLocatorDiscovery clients.
Definition Lookup.h:219
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void findLocator(std::string instanceName, std::optional< LookupReplyPrx > reply, const Ice::Current &current)=0
Finds a locator proxy with the given instanceName.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
LookupPrx ProxyType
The associated proxy type.
Definition Lookup.h:259
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
Looks for a locator using UDP multicast.
Definition Lookup.h:256
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
Object() noexcept=default
Default constructor.
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Provides typed proxy functions.
Definition Proxy.h:45
std::shared_ptr< LookupReply > LookupReplyPtr
A shared pointer to a LookupReply.
Definition Lookup.h:247
std::shared_ptr< Lookup > LookupPtr
A shared pointer to a Lookup.
Definition Lookup.h:286
IceLocatorDiscovery is an Ice plug-in that enables the discovery of Ice locators (such as IceGrid) vi...
Definition Lookup.h:25
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:28
The Ice RPC framework.
Definition SampleEvent.h:59
Provides information about an incoming request being dispatched.
Definition Current.h:18