Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
IceStorm.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
4// <auto-generated>Generated from Slice file 'IceStorm.ice'.</auto-generated>
5// clang-format off
6
7#ifndef IceStorm_IceStorm_h_
8#define IceStorm_IceStorm_h_
9
11#include <Ice/Ice.h>
12#include <Ice/Identity.h>
13#include "Metrics.h"
14#include <IceStorm/Config.h>
15
16#ifndef ICE_DISABLE_VERSION
17# if ICE_INT_VERSION / 100 != 308
18# error Ice version mismatch!
19# endif
20# if ICE_INT_VERSION % 100 >= 50
21# error Beta header file detected
22# endif
23# if ICE_INT_VERSION % 100 < 0
24# error Ice patch level mismatch!
25# endif
26#endif
27
28#ifndef ICESTORM_API
29# if defined(ICESTORM_API_EXPORTS)
30# define ICESTORM_API ICE_DECLSPEC_EXPORT
31# else
32# define ICESTORM_API ICE_DECLSPEC_IMPORT
33# endif
34#endif
35
36// NOLINTBEGIN(modernize-concat-nested-namespaces)
37
38/// Lightweight publish/subscribe framework, available for all Ice language mappings.
39namespace IceStorm
40{
41 class TopicPrx;
42
43 struct LinkInfo;
44
45 /// A sequence of LinkInfo objects.
46 using LinkInfoSeq = std::vector<LinkInfo>;
47
48 /// Quality of service parameters.
49 /// @see TopicPrx::subscribeAndGetPublisher
50 using QoS = std::map<std::string, std::string>;
51
52 /// A dictionary of topic name to topic proxy.
53 using TopicDict = std::map<std::string, std::optional<TopicPrx>>;
54
55 class TopicManagerPrx;
56
57 class FinderPrx;
58}
59
60namespace IceStorm
61{
62 /// Represents an IceStorm topic. Publishers publish data to a topic (via the topic's publisher object), and
63 /// subscribers subscribe to a topic.
64 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceStorm::Topic`.
65 /// @see TopicManagerPrx
66 /// @headerfile IceStorm/IceStorm.h
67 class ICESTORM_API TopicPrx : public Ice::Proxy<TopicPrx, Ice::ObjectPrx>
68 {
69 public:
70 /// Constructs a proxy from a Communicator and a proxy string.
71 /// @param communicator The communicator of the new proxy.
72 /// @param proxyString The proxy string to parse.
73 TopicPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
74
75 /// Copy constructor. Constructs with a copy of the contents of @p other.
76 /// @param other The proxy to copy from.
77 TopicPrx(const TopicPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
78
79 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
80 /// @param other The proxy to move from.
81 TopicPrx(TopicPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
82
83 ~TopicPrx() override;
84
85 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
86 /// @param rhs The proxy to copy from.
87 /// @return A reference to this proxy.
88 TopicPrx& operator=(const TopicPrx& rhs) noexcept
89 {
90 if (this != &rhs)
91 {
93 }
94 return *this;
95 }
96
97 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
98 /// @param rhs The proxy to move from.
99 TopicPrx& operator=(TopicPrx&& rhs) noexcept
100 {
101 if (this != &rhs)
102 {
103 Ice::ObjectPrx::operator=(std::move(rhs));
104 }
105 return *this;
106 }
107
108 /// Gets the name of this topic.
109 /// @param context The request context.
110 /// @return The name of the topic.
111 /// @see ::IceStorm::TopicManagerPrx::create
112 std::string getName(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
113
114 /// Gets the name of this topic.
115 /// @param context The request context.
116 /// @return A future that becomes available when the invocation completes. This future holds:
117 /// - The name of the topic.
118 /// @see ::IceStorm::TopicManagerPrx::create
119 [[nodiscard]] std::future<std::string> getNameAsync(const Ice::Context& context = Ice::noExplicitContext) const;
120
121 /// Gets the name of this topic.
122 /// @param response The response callback. It accepts:
123 /// - The name of the topic.
124 /// @param exception The exception callback.
125 /// @param sent The sent callback.
126 /// @param context The request context.
127 /// @return A function that can be called to cancel the invocation locally.
128 /// @see ::IceStorm::TopicManagerPrx::create
129 // NOLINTNEXTLINE(modernize-use-nodiscard)
130 std::function<void()> getNameAsync(std::function<void(std::string)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
131
132 /// @private
133 void _iceI_getName(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, const Ice::Context&) const;
134
135 /// Gets a proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this
136 /// operation and then creates a proxy with the publisher type from this proxy. If a replicated IceStorm
137 /// deployment is used, this call may return a replicated proxy.
138 /// @param context The request context.
139 /// @return A proxy to publish data on this topic. This proxy is never null.
140 std::optional<Ice::ObjectPrx> getPublisher(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
141
142 /// Gets a proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this
143 /// operation and then creates a proxy with the publisher type from this proxy. If a replicated IceStorm
144 /// deployment is used, this call may return a replicated proxy.
145 /// @param context The request context.
146 /// @return A future that becomes available when the invocation completes. This future holds:
147 /// - A proxy to publish data on this topic. This proxy is never null.
148 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> getPublisherAsync(const Ice::Context& context = Ice::noExplicitContext) const;
149
150 /// Gets a proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this
151 /// operation and then creates a proxy with the publisher type from this proxy. If a replicated IceStorm
152 /// deployment is used, this call may return a replicated proxy.
153 /// @param response The response callback. It accepts:
154 /// - A proxy to publish data on this topic. This proxy is never null.
155 /// @param exception The exception callback.
156 /// @param sent The sent callback.
157 /// @param context The request context.
158 /// @return A function that can be called to cancel the invocation locally.
159 // NOLINTNEXTLINE(modernize-use-nodiscard)
160 std::function<void()> getPublisherAsync(std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
161
162 /// @private
163 void _iceI_getPublisher(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const Ice::Context&) const;
164
165 /// Gets a non-replicated proxy to a publisher object for this topic. To publish data to a topic, a publisher
166 /// calls this operation and then creates a proxy with the publisher type from this proxy.
167 /// @param context The request context.
168 /// @return A proxy to publish data on this topic. This proxy is never null.
169 std::optional<Ice::ObjectPrx> getNonReplicatedPublisher(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
170
171 /// Gets a non-replicated proxy to a publisher object for this topic. To publish data to a topic, a publisher
172 /// calls this operation and then creates a proxy with the publisher type from this proxy.
173 /// @param context The request context.
174 /// @return A future that becomes available when the invocation completes. This future holds:
175 /// - A proxy to publish data on this topic. This proxy is never null.
176 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> getNonReplicatedPublisherAsync(const Ice::Context& context = Ice::noExplicitContext) const;
177
178 /// Gets a non-replicated proxy to a publisher object for this topic. To publish data to a topic, a publisher
179 /// calls this operation and then creates a proxy with the publisher type from this proxy.
180 /// @param response The response callback. It accepts:
181 /// - A proxy to publish data on this topic. This proxy is never null.
182 /// @param exception The exception callback.
183 /// @param sent The sent callback.
184 /// @param context The request context.
185 /// @return A function that can be called to cancel the invocation locally.
186 // NOLINTNEXTLINE(modernize-use-nodiscard)
187 std::function<void()> getNonReplicatedPublisherAsync(std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
188
189 /// @private
190 void _iceI_getNonReplicatedPublisher(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const Ice::Context&) const;
191
192 /// Subscribes to this topic.
193 /// @param theQoS The quality of service parameters for this subscription.
194 /// @param subscriber The subscriber's proxy. This proxy cannot be null.
195 /// @param context The request context.
196 /// @return The per-subscriber publisher proxy. This proxy is never null.
197 /// @throws IceStorm::AlreadySubscribed Thrown when @p subscriber is already subscribed.
198 /// @throws IceStorm::BadQoS Thrown when @p theQoS is unavailable or invalid.
199 /// @see ::IceStorm::TopicPrx::unsubscribe
200 std::optional<Ice::ObjectPrx> subscribeAndGetPublisher(const QoS& theQoS, const std::optional<Ice::ObjectPrx>& subscriber, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
201
202 /// Subscribes to this topic.
203 /// @param theQoS The quality of service parameters for this subscription.
204 /// @param subscriber The subscriber's proxy. This proxy cannot be null.
205 /// @param context The request context.
206 /// @return A future that becomes available when the invocation completes. This future holds:
207 /// - The per-subscriber publisher proxy. This proxy is never null.
208 /// @see ::IceStorm::TopicPrx::unsubscribe
209 [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> subscribeAndGetPublisherAsync(const QoS& theQoS, const std::optional<Ice::ObjectPrx>& subscriber, const Ice::Context& context = Ice::noExplicitContext) const;
210
211 /// Subscribes to this topic.
212 /// @param theQoS The quality of service parameters for this subscription.
213 /// @param subscriber The subscriber's proxy. This proxy cannot be null.
214 /// @param response The response callback. It accepts:
215 /// - The per-subscriber publisher proxy. This proxy is never null.
216 /// @param exception The exception callback.
217 /// @param sent The sent callback.
218 /// @param context The request context.
219 /// @return A function that can be called to cancel the invocation locally.
220 /// @see ::IceStorm::TopicPrx::unsubscribe
221 // NOLINTNEXTLINE(modernize-use-nodiscard)
222 std::function<void()> subscribeAndGetPublisherAsync(const QoS& theQoS, const std::optional<Ice::ObjectPrx>& subscriber, std::function<void(std::optional<Ice::ObjectPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
223
224 /// @private
225 void _iceI_subscribeAndGetPublisher(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const QoS&, const std::optional<Ice::ObjectPrx>&, const Ice::Context&) const;
226
227 /// Unsubscribes the provided @p subscriber from this topic.
228 /// @param subscriber A proxy to an existing subscriber. This proxy is never null.
229 /// @param context The request context.
230 /// @see ::IceStorm::TopicPrx::subscribeAndGetPublisher
231 void unsubscribe(const std::optional<Ice::ObjectPrx>& subscriber, const Ice::Context& context = Ice::noExplicitContext) const;
232
233 /// Unsubscribes the provided @p subscriber from this topic.
234 /// @param subscriber A proxy to an existing subscriber. This proxy is never null.
235 /// @param context The request context.
236 /// @return A future that becomes available when the invocation completes.
237 /// @see ::IceStorm::TopicPrx::subscribeAndGetPublisher
238 [[nodiscard]] std::future<void> unsubscribeAsync(const std::optional<Ice::ObjectPrx>& subscriber, const Ice::Context& context = Ice::noExplicitContext) const;
239
240 /// Unsubscribes the provided @p subscriber from this topic.
241 /// @param subscriber A proxy to an existing subscriber. This proxy is never null.
242 /// @param response The response callback.
243 /// @param exception The exception callback.
244 /// @param sent The sent callback.
245 /// @param context The request context.
246 /// @return A function that can be called to cancel the invocation locally.
247 /// @see ::IceStorm::TopicPrx::subscribeAndGetPublisher
248 // NOLINTNEXTLINE(modernize-use-nodiscard)
249 std::function<void()> unsubscribeAsync(const std::optional<Ice::ObjectPrx>& subscriber, 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;
250
251 /// @private
252 void _iceI_unsubscribe(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const std::optional<Ice::ObjectPrx>&, const Ice::Context&) const;
253
254 /// Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
255 /// @param linkTo The topic to link to. This proxy cannot be null.
256 /// @param cost The cost of the link.
257 /// @param context The request context.
258 /// @throws IceStorm::LinkExists Thrown when a link to @p linkTo already exists.
259 void link(const std::optional<TopicPrx>& linkTo, std::int32_t cost, const Ice::Context& context = Ice::noExplicitContext) const;
260
261 /// Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
262 /// @param linkTo The topic to link to. This proxy cannot be null.
263 /// @param cost The cost of the link.
264 /// @param context The request context.
265 /// @return A future that becomes available when the invocation completes.
266 [[nodiscard]] std::future<void> linkAsync(const std::optional<TopicPrx>& linkTo, std::int32_t cost, const Ice::Context& context = Ice::noExplicitContext) const;
267
268 /// Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
269 /// @param linkTo The topic to link to. This proxy cannot be null.
270 /// @param cost The cost of the link.
271 /// @param response The response callback.
272 /// @param exception The exception callback.
273 /// @param sent The sent callback.
274 /// @param context The request context.
275 /// @return A function that can be called to cancel the invocation locally.
276 // NOLINTNEXTLINE(modernize-use-nodiscard)
277 std::function<void()> linkAsync(const std::optional<TopicPrx>& linkTo, std::int32_t cost, 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;
278
279 /// @private
280 void _iceI_link(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const std::optional<TopicPrx>&, std::int32_t, const Ice::Context&) const;
281
282 /// Destroys a link from this topic to the provided topic.
283 /// @param linkTo The topic to destroy the link to. This proxy cannot be null.
284 /// @param context The request context.
285 /// @throws IceStorm::NoSuchLink Thrown when a link to @p linkTo does not exist.
286 void unlink(const std::optional<TopicPrx>& linkTo, const Ice::Context& context = Ice::noExplicitContext) const;
287
288 /// Destroys a link from this topic to the provided topic.
289 /// @param linkTo The topic to destroy the link to. This proxy cannot be null.
290 /// @param context The request context.
291 /// @return A future that becomes available when the invocation completes.
292 [[nodiscard]] std::future<void> unlinkAsync(const std::optional<TopicPrx>& linkTo, const Ice::Context& context = Ice::noExplicitContext) const;
293
294 /// Destroys a link from this topic to the provided topic.
295 /// @param linkTo The topic to destroy the link to. This proxy cannot be null.
296 /// @param response The response callback.
297 /// @param exception The exception callback.
298 /// @param sent The sent callback.
299 /// @param context The request context.
300 /// @return A function that can be called to cancel the invocation locally.
301 // NOLINTNEXTLINE(modernize-use-nodiscard)
302 std::function<void()> unlinkAsync(const std::optional<TopicPrx>& linkTo, 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;
303
304 /// @private
305 void _iceI_unlink(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const std::optional<TopicPrx>&, const Ice::Context&) const;
306
307 /// Gets information on the current links.
308 /// @param context The request context.
309 /// @return A sequence of LinkInfo objects.
310 LinkInfoSeq getLinkInfoSeq(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
311
312 /// Gets information on the current links.
313 /// @param context The request context.
314 /// @return A future that becomes available when the invocation completes. This future holds:
315 /// - A sequence of LinkInfo objects.
316 [[nodiscard]] std::future<LinkInfoSeq> getLinkInfoSeqAsync(const Ice::Context& context = Ice::noExplicitContext) const;
317
318 /// Gets information on the current links.
319 /// @param response The response callback. It accepts:
320 /// - A sequence of LinkInfo objects.
321 /// @param exception The exception callback.
322 /// @param sent The sent callback.
323 /// @param context The request context.
324 /// @return A function that can be called to cancel the invocation locally.
325 // NOLINTNEXTLINE(modernize-use-nodiscard)
326 std::function<void()> getLinkInfoSeqAsync(std::function<void(::IceStorm::LinkInfoSeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
327
328 /// @private
329 void _iceI_getLinkInfoSeq(const std::shared_ptr<IceInternal::OutgoingAsyncT<LinkInfoSeq>>&, const Ice::Context&) const;
330
331 /// Gets the list of subscribers for this topic.
332 /// @param context The request context.
333 /// @return The sequence of Ice identities for the subscriber objects.
334 ::Ice::IdentitySeq getSubscribers(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
335
336 /// Gets the list of subscribers for this topic.
337 /// @param context The request context.
338 /// @return A future that becomes available when the invocation completes. This future holds:
339 /// - The sequence of Ice identities for the subscriber objects.
340 [[nodiscard]] std::future<::Ice::IdentitySeq> getSubscribersAsync(const Ice::Context& context = Ice::noExplicitContext) const;
341
342 /// Gets the list of subscribers for this topic.
343 /// @param response The response callback. It accepts:
344 /// - The sequence of Ice identities for the subscriber objects.
345 /// @param exception The exception callback.
346 /// @param sent The sent callback.
347 /// @param context The request context.
348 /// @return A function that can be called to cancel the invocation locally.
349 // NOLINTNEXTLINE(modernize-use-nodiscard)
350 std::function<void()> getSubscribersAsync(std::function<void(::Ice::IdentitySeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
351
352 /// @private
353 void _iceI_getSubscribers(const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::IdentitySeq>>&, const Ice::Context&) const;
354
355 /// Destroys this topic.
356 /// @param context The request context.
357 void destroy(const Ice::Context& context = Ice::noExplicitContext) const;
358
359 /// Destroys this topic.
360 /// @param context The request context.
361 /// @return A future that becomes available when the invocation completes.
362 [[nodiscard]] std::future<void> destroyAsync(const Ice::Context& context = Ice::noExplicitContext) const;
363
364 /// Destroys this topic.
365 /// @param response The response callback.
366 /// @param exception The exception callback.
367 /// @param sent The sent callback.
368 /// @param context The request context.
369 /// @return A function that can be called to cancel the invocation locally.
370 // NOLINTNEXTLINE(modernize-use-nodiscard)
371 std::function<void()> destroyAsync(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;
372
373 /// @private
374 void _iceI_destroy(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
375
376 /// Gets the type ID of the associated Slice interface.
377 /// @return The string `"::IceStorm::Topic"`.
378 static const char* ice_staticId() noexcept;
379
380 /// @private
381 static TopicPrx _fromReference(IceInternal::ReferencePtr ref) { return TopicPrx{std::move(ref)}; }
382
383 protected:
384 /// @private
385 TopicPrx() = default;
386
387 /// @private
388 explicit TopicPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
389 {
390 }
391 };
392
393 /// Represents an object that manages topics.
394 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceStorm::TopicManager`.
395 /// @see TopicPrx
396 /// @headerfile IceStorm/IceStorm.h
397 class ICESTORM_API TopicManagerPrx : public Ice::Proxy<TopicManagerPrx, Ice::ObjectPrx>
398 {
399 public:
400 /// Constructs a proxy from a Communicator and a proxy string.
401 /// @param communicator The communicator of the new proxy.
402 /// @param proxyString The proxy string to parse.
403 TopicManagerPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
404
405 /// Copy constructor. Constructs with a copy of the contents of @p other.
406 /// @param other The proxy to copy from.
407 TopicManagerPrx(const TopicManagerPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
408
409 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
410 /// @param other The proxy to move from.
411 TopicManagerPrx(TopicManagerPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
412
413 ~TopicManagerPrx() override;
414
415 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
416 /// @param rhs The proxy to copy from.
417 /// @return A reference to this proxy.
419 {
420 if (this != &rhs)
421 {
423 }
424 return *this;
425 }
426
427 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
428 /// @param rhs The proxy to move from.
430 {
431 if (this != &rhs)
432 {
433 Ice::ObjectPrx::operator=(std::move(rhs));
434 }
435 return *this;
436 }
437
438 /// Creates a new topic.
439 /// @param name The name of the topic.
440 /// @param context The request context.
441 /// @return A proxy to the new topic object. The returned proxy is never null.
442 /// @throws IceStorm::TopicExists Thrown when a topic with the same @p name already exists.
443 std::optional<TopicPrx> create(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
444
445 /// Creates a new topic.
446 /// @param name The name of the topic.
447 /// @param context The request context.
448 /// @return A future that becomes available when the invocation completes. This future holds:
449 /// - A proxy to the new topic object. The returned proxy is never null.
450 [[nodiscard]] std::future<std::optional<TopicPrx>> createAsync(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
451
452 /// Creates a new topic.
453 /// @param name The name of the topic.
454 /// @param response The response callback. It accepts:
455 /// - A proxy to the new topic object. The returned proxy is never null.
456 /// @param exception The exception callback.
457 /// @param sent The sent callback.
458 /// @param context The request context.
459 /// @return A function that can be called to cancel the invocation locally.
460 // NOLINTNEXTLINE(modernize-use-nodiscard)
461 std::function<void()> createAsync(std::string_view name, std::function<void(std::optional<::IceStorm::TopicPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
462
463 /// @private
464 void _iceI_create(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<TopicPrx>>>&, std::string_view, const Ice::Context&) const;
465
466 /// Retrieves a topic by name.
467 /// @param name The name of the topic.
468 /// @param context The request context.
469 /// @return A proxy to the topic object. The returned proxy is never null.
470 /// @throws IceStorm::NoSuchTopic Thrown when there is no topic named @p name.
471 std::optional<TopicPrx> retrieve(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
472
473 /// Retrieves a topic by name.
474 /// @param name The name of the topic.
475 /// @param context The request context.
476 /// @return A future that becomes available when the invocation completes. This future holds:
477 /// - A proxy to the topic object. The returned proxy is never null.
478 [[nodiscard]] std::future<std::optional<TopicPrx>> retrieveAsync(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
479
480 /// Retrieves a topic by name.
481 /// @param name The name of the topic.
482 /// @param response The response callback. It accepts:
483 /// - A proxy to the topic object. The returned proxy is never null.
484 /// @param exception The exception callback.
485 /// @param sent The sent callback.
486 /// @param context The request context.
487 /// @return A function that can be called to cancel the invocation locally.
488 // NOLINTNEXTLINE(modernize-use-nodiscard)
489 std::function<void()> retrieveAsync(std::string_view name, std::function<void(std::optional<::IceStorm::TopicPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
490
491 /// @private
492 void _iceI_retrieve(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<TopicPrx>>>&, std::string_view, const Ice::Context&) const;
493
494 /// Creates a new topic with the given name, or retrieves the existing topic with this name if it already
495 /// exists.
496 /// @param name The name of the topic.
497 /// @param context The request context.
498 /// @return A proxy to the topic object. The returned proxy is never null.
499 std::optional<TopicPrx> createOrRetrieve(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
500
501 /// Creates a new topic with the given name, or retrieves the existing topic with this name if it already
502 /// exists.
503 /// @param name The name of the topic.
504 /// @param context The request context.
505 /// @return A future that becomes available when the invocation completes. This future holds:
506 /// - A proxy to the topic object. The returned proxy is never null.
507 [[nodiscard]] std::future<std::optional<TopicPrx>> createOrRetrieveAsync(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
508
509 /// Creates a new topic with the given name, or retrieves the existing topic with this name if it already
510 /// exists.
511 /// @param name The name of the topic.
512 /// @param response The response callback. It accepts:
513 /// - A proxy to the topic object. The returned proxy is never null.
514 /// @param exception The exception callback.
515 /// @param sent The sent callback.
516 /// @param context The request context.
517 /// @return A function that can be called to cancel the invocation locally.
518 // NOLINTNEXTLINE(modernize-use-nodiscard)
519 std::function<void()> createOrRetrieveAsync(std::string_view name, std::function<void(std::optional<::IceStorm::TopicPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
520
521 /// @private
522 void _iceI_createOrRetrieve(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<TopicPrx>>>&, std::string_view, const Ice::Context&) const;
523
524 /// Retrieves all topics managed by this topic manager.
525 /// @param context The request context.
526 /// @return A dictionary of string, topic proxy pairs.
527 TopicDict retrieveAll(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
528
529 /// Retrieves all topics managed by this topic manager.
530 /// @param context The request context.
531 /// @return A future that becomes available when the invocation completes. This future holds:
532 /// - A dictionary of string, topic proxy pairs.
533 [[nodiscard]] std::future<TopicDict> retrieveAllAsync(const Ice::Context& context = Ice::noExplicitContext) const;
534
535 /// Retrieves all topics managed by this topic manager.
536 /// @param response The response callback. It accepts:
537 /// - A dictionary of string, topic proxy pairs.
538 /// @param exception The exception callback.
539 /// @param sent The sent callback.
540 /// @param context The request context.
541 /// @return A function that can be called to cancel the invocation locally.
542 // NOLINTNEXTLINE(modernize-use-nodiscard)
543 std::function<void()> retrieveAllAsync(std::function<void(::IceStorm::TopicDict)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
544
545 /// @private
546 void _iceI_retrieveAll(const std::shared_ptr<IceInternal::OutgoingAsyncT<TopicDict>>&, const Ice::Context&) const;
547
548 /// Gets the type ID of the associated Slice interface.
549 /// @return The string `"::IceStorm::TopicManager"`.
550 static const char* ice_staticId() noexcept;
551
552 /// @private
553 static TopicManagerPrx _fromReference(IceInternal::ReferencePtr ref) { return TopicManagerPrx{std::move(ref)}; }
554
555 protected:
556 /// @private
557 TopicManagerPrx() = default;
558
559 /// @private
560 explicit TopicManagerPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
561 {
562 }
563 };
564
565 /// Provides access to a TopicManagerPrx object via a fixed identity.
566 /// An IceStorm Finder is always registered with identity `IceStorm/Finder`. This allows clients to obtain the
567 /// associated TopicManager proxy with just the endpoint information of the object. For example, you can use the
568 /// Finder proxy `IceStorm/Finder:tcp -h somehost -p 4061` to get the TopicManager proxy
569 /// `MyIceStorm/TopicManager:tcp -h somehost -p 4061`.
570 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceStorm::Finder`.
571 /// @headerfile IceStorm/IceStorm.h
572 class ICESTORM_API FinderPrx : public Ice::Proxy<FinderPrx, Ice::ObjectPrx>
573 {
574 public:
575 /// Constructs a proxy from a Communicator and a proxy string.
576 /// @param communicator The communicator of the new proxy.
577 /// @param proxyString The proxy string to parse.
578 FinderPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
579
580 /// Copy constructor. Constructs with a copy of the contents of @p other.
581 /// @param other The proxy to copy from.
582 FinderPrx(const FinderPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
583
584 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
585 /// @param other The proxy to move from.
586 FinderPrx(FinderPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
587
588 ~FinderPrx() override;
589
590 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
591 /// @param rhs The proxy to copy from.
592 /// @return A reference to this proxy.
593 FinderPrx& operator=(const FinderPrx& rhs) noexcept
594 {
595 if (this != &rhs)
596 {
598 }
599 return *this;
600 }
601
602 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
603 /// @param rhs The proxy to move from.
605 {
606 if (this != &rhs)
607 {
608 Ice::ObjectPrx::operator=(std::move(rhs));
609 }
610 return *this;
611 }
612
613 /// Gets a proxy to the associated ::IceStorm::TopicManagerPrx. The proxy might point to several replicas.
614 /// @param context The request context.
615 /// @return The topic manager proxy. This proxy is never null.
616 std::optional<TopicManagerPrx> getTopicManager(const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
617
618 /// Gets a proxy to the associated ::IceStorm::TopicManagerPrx. The proxy might point to several replicas.
619 /// @param context The request context.
620 /// @return A future that becomes available when the invocation completes. This future holds:
621 /// - The topic manager proxy. This proxy is never null.
622 [[nodiscard]] std::future<std::optional<TopicManagerPrx>> getTopicManagerAsync(const Ice::Context& context = Ice::noExplicitContext) const;
623
624 /// Gets a proxy to the associated ::IceStorm::TopicManagerPrx. The proxy might point to several replicas.
625 /// @param response The response callback. It accepts:
626 /// - The topic manager proxy. This proxy is never null.
627 /// @param exception The exception callback.
628 /// @param sent The sent callback.
629 /// @param context The request context.
630 /// @return A function that can be called to cancel the invocation locally.
631 // NOLINTNEXTLINE(modernize-use-nodiscard)
632 std::function<void()> getTopicManagerAsync(std::function<void(std::optional<::IceStorm::TopicManagerPrx>)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
633
634 /// @private
635 void _iceI_getTopicManager(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<TopicManagerPrx>>>&, const Ice::Context&) const;
636
637 /// Gets the type ID of the associated Slice interface.
638 /// @return The string `"::IceStorm::Finder"`.
639 static const char* ice_staticId() noexcept;
640
641 /// @private
642 static FinderPrx _fromReference(IceInternal::ReferencePtr ref) { return FinderPrx{std::move(ref)}; }
643
644 protected:
645 /// @private
646 FinderPrx() = default;
647
648 /// @private
649 explicit FinderPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
650 {
651 }
652 };
653}
654
655namespace IceStorm
656{
657 /// Information about a topic link.
658 /// @remarks The Slice compiler generated this struct from Slice struct `::IceStorm::LinkInfo`.
659 /// @headerfile IceStorm/IceStorm.h
660 struct LinkInfo
661 {
662 /// The linked topic proxy. This proxy is never null.
663 std::optional<::IceStorm::TopicPrx> theTopic;
664
665 /// The name of the linked topic.
666 std::string name;
667
668 /// The cost of traversing this link.
669 std::int32_t cost;
670
671 /// Creates a tuple with all the fields of this struct.
672 /// @return A tuple with all the fields of this struct.
673 [[nodiscard]] std::tuple<const std::optional<::IceStorm::TopicPrx>&, const std::string&, const std::int32_t&> ice_tuple() const
674 {
675 return std::tie(theTopic, name, cost);
676 }
677
678 /// Outputs the name and value of each field of this instance to the stream.
679 /// @param os The output stream.
680 ICESTORM_API void ice_printFields(std::ostream& os) const;
681 };
682
683 /// Outputs the description of a LinkInfo to a stream, including all its fields.
684 /// @param os The output stream.
685 /// @param value The instance to output.
686 /// @return The output stream.
687 ICESTORM_API std::ostream& operator<<(std::ostream& os, const LinkInfo& value);
688
689 /// The exception that is thrown when attempting to create a link that already exists.
690 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceStorm::LinkExists`.
691 /// @headerfile IceStorm/IceStorm.h
692 class ICESTORM_API LinkExists : public Ice::UserException
693 {
694 public:
695 /// Default constructor.
696 LinkExists() noexcept = default;
697
698 /// One-shot constructor to initialize all data members.
699 /// @param name The name of the linked topic.
700 LinkExists(std::string name) noexcept :
701 name(std::move(name))
702 {
703 }
704
705 /// Copy constructor.
706 LinkExists(const LinkExists&) noexcept = default;
707
708 /// Creates a tuple with all the fields of this exception.
709 /// @return A tuple with all the fields of this exception.
710 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
711 {
712 return std::tie(name);
713 }
714
715 void ice_printFields(std::ostream& os) const override;
716 /// Gets the type ID of the associated Slice exception.
717 /// @return The string `"::IceStorm::LinkExists"`.
718 static const char* ice_staticId() noexcept;
719
720 [[nodiscard]] const char* ice_id() const noexcept override;
721
722 void ice_throw() const override;
723
724 /// The name of the linked topic.
725 std::string name;
726
727 protected:
728 /// @private
729 void _writeImpl(Ice::OutputStream*) const override;
730
731 /// @private
732 void _readImpl(Ice::InputStream*) override;
733 };
734
735 /// The exception that is thrown when attempting to remove a link that does not exist.
736 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceStorm::NoSuchLink`.
737 /// @headerfile IceStorm/IceStorm.h
738 class ICESTORM_API NoSuchLink : public Ice::UserException
739 {
740 public:
741 /// Default constructor.
742 NoSuchLink() noexcept = default;
743
744 /// One-shot constructor to initialize all data members.
745 /// @param name The name of the link that does not exist.
746 NoSuchLink(std::string name) noexcept :
747 name(std::move(name))
748 {
749 }
750
751 /// Copy constructor.
752 NoSuchLink(const NoSuchLink&) noexcept = default;
753
754 /// Creates a tuple with all the fields of this exception.
755 /// @return A tuple with all the fields of this exception.
756 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
757 {
758 return std::tie(name);
759 }
760
761 void ice_printFields(std::ostream& os) const override;
762 /// Gets the type ID of the associated Slice exception.
763 /// @return The string `"::IceStorm::NoSuchLink"`.
764 static const char* ice_staticId() noexcept;
765
766 [[nodiscard]] const char* ice_id() const noexcept override;
767
768 void ice_throw() const override;
769
770 /// The name of the link that does not exist.
771 std::string name;
772
773 protected:
774 /// @private
775 void _writeImpl(Ice::OutputStream*) const override;
776
777 /// @private
778 void _readImpl(Ice::InputStream*) override;
779 };
780
781 /// The exception that is thrown when attempting to subscribe a proxy for which a subscription already exists.
782 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceStorm::AlreadySubscribed`.
783 /// @headerfile IceStorm/IceStorm.h
784 class ICESTORM_API AlreadySubscribed : public Ice::UserException
785 {
786 public:
787 /// Gets the type ID of the associated Slice exception.
788 /// @return The string `"::IceStorm::AlreadySubscribed"`.
789 static const char* ice_staticId() noexcept;
790
791 [[nodiscard]] const char* ice_id() const noexcept override;
792
793 void ice_throw() const override;
794
795 protected:
796 /// @private
797 void _writeImpl(Ice::OutputStream*) const override;
798
799 /// @private
800 void _readImpl(Ice::InputStream*) override;
801 };
802
803 /// The exception that is thrown when attempting to subscribe with an invalid QoS.
804 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceStorm::BadQoS`.
805 /// @headerfile IceStorm/IceStorm.h
806 class ICESTORM_API BadQoS : public Ice::UserException
807 {
808 public:
809 /// Default constructor.
810 BadQoS() noexcept = default;
811
812 /// One-shot constructor to initialize all data members.
813 /// @param reason The reason for the failure.
814 BadQoS(std::string reason) noexcept :
815 reason(std::move(reason))
816 {
817 }
818
819 /// Copy constructor.
820 BadQoS(const BadQoS&) noexcept = default;
821
822 /// Creates a tuple with all the fields of this exception.
823 /// @return A tuple with all the fields of this exception.
824 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
825 {
826 return std::tie(reason);
827 }
828
829 void ice_printFields(std::ostream& os) const override;
830 /// Gets the type ID of the associated Slice exception.
831 /// @return The string `"::IceStorm::BadQoS"`.
832 static const char* ice_staticId() noexcept;
833
834 [[nodiscard]] const char* ice_id() const noexcept override;
835
836 void ice_throw() const override;
837
838 /// The reason for the failure.
839 std::string reason;
840
841 protected:
842 /// @private
843 void _writeImpl(Ice::OutputStream*) const override;
844
845 /// @private
846 void _readImpl(Ice::InputStream*) override;
847 };
848
849 /// The exception that is thrown when attempting to create a topic that already exists.
850 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceStorm::TopicExists`.
851 /// @headerfile IceStorm/IceStorm.h
852 class ICESTORM_API TopicExists : public Ice::UserException
853 {
854 public:
855 /// Default constructor.
856 TopicExists() noexcept = default;
857
858 /// One-shot constructor to initialize all data members.
859 /// @param name The name of the topic that already exists.
860 TopicExists(std::string name) noexcept :
861 name(std::move(name))
862 {
863 }
864
865 /// Copy constructor.
866 TopicExists(const TopicExists&) noexcept = default;
867
868 /// Creates a tuple with all the fields of this exception.
869 /// @return A tuple with all the fields of this exception.
870 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
871 {
872 return std::tie(name);
873 }
874
875 void ice_printFields(std::ostream& os) const override;
876 /// Gets the type ID of the associated Slice exception.
877 /// @return The string `"::IceStorm::TopicExists"`.
878 static const char* ice_staticId() noexcept;
879
880 [[nodiscard]] const char* ice_id() const noexcept override;
881
882 void ice_throw() const override;
883
884 /// The name of the topic that already exists.
885 std::string name;
886
887 protected:
888 /// @private
889 void _writeImpl(Ice::OutputStream*) const override;
890
891 /// @private
892 void _readImpl(Ice::InputStream*) override;
893 };
894
895 /// The exception that is thrown when attempting to retrieve a topic that does not exist.
896 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceStorm::NoSuchTopic`.
897 /// @headerfile IceStorm/IceStorm.h
898 class ICESTORM_API NoSuchTopic : public Ice::UserException
899 {
900 public:
901 /// Default constructor.
902 NoSuchTopic() noexcept = default;
903
904 /// One-shot constructor to initialize all data members.
905 /// @param name The name of the topic that does not exist.
906 NoSuchTopic(std::string name) noexcept :
907 name(std::move(name))
908 {
909 }
910
911 /// Copy constructor.
912 NoSuchTopic(const NoSuchTopic&) noexcept = default;
913
914 /// Creates a tuple with all the fields of this exception.
915 /// @return A tuple with all the fields of this exception.
916 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
917 {
918 return std::tie(name);
919 }
920
921 void ice_printFields(std::ostream& os) const override;
922 /// Gets the type ID of the associated Slice exception.
923 /// @return The string `"::IceStorm::NoSuchTopic"`.
924 static const char* ice_staticId() noexcept;
925
926 [[nodiscard]] const char* ice_id() const noexcept override;
927
928 void ice_throw() const override;
929
930 /// The name of the topic that does not exist.
931 std::string name;
932
933 protected:
934 /// @private
935 void _writeImpl(Ice::OutputStream*) const override;
936
937 /// @private
938 void _readImpl(Ice::InputStream*) override;
939 };
940
941 /// @cond INTERNAL
942 using Ice::Tuple::operator<;
943 using Ice::Tuple::operator<=;
944 using Ice::Tuple::operator>;
945 using Ice::Tuple::operator>=;
946 using Ice::Tuple::operator==;
947 using Ice::Tuple::operator!=;
948 /// @endcond
949}
950
951namespace IceStorm
952{
953 /// Represents an IceStorm topic. Publishers publish data to a topic (via the topic's publisher object), and
954 /// subscribers subscribe to a topic.
955 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceStorm::Topic`.
956 /// @see TopicManagerPrx
957 /// @headerfile IceStorm/IceStorm.h
958 class ICESTORM_API Topic : public virtual Ice::Object
959 {
960 public:
961 /// The associated proxy type.
962 using ProxyType = TopicPrx;
963
964 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
965 /// @param request The incoming request.
966 /// @param sendResponse The callback to send the response.
967 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
968
969 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
970
971 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
972
973 /// Gets the name of this topic.
974 /// @param current The Current object of the incoming request.
975 /// @return The name of the topic.
976 /// @see ::IceStorm::TopicManagerPrx::create
977 [[nodiscard]] virtual std::string getName(const Ice::Current& current) const = 0;
978
979 /// @private
980 void _iceD_getName(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
981
982 /// Gets a proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this
983 /// operation and then creates a proxy with the publisher type from this proxy. If a replicated IceStorm
984 /// deployment is used, this call may return a replicated proxy.
985 /// @param current The Current object of the incoming request.
986 /// @return A proxy to publish data on this topic. This proxy is never null.
987 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> getPublisher(const Ice::Current& current) const = 0;
988
989 /// @private
990 void _iceD_getPublisher(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
991
992 /// Gets a non-replicated proxy to a publisher object for this topic. To publish data to a topic, a publisher
993 /// calls this operation and then creates a proxy with the publisher type from this proxy.
994 /// @param current The Current object of the incoming request.
995 /// @return A proxy to publish data on this topic. This proxy is never null.
996 [[nodiscard]] virtual std::optional<Ice::ObjectPrx> getNonReplicatedPublisher(const Ice::Current& current) const = 0;
997
998 /// @private
999 void _iceD_getNonReplicatedPublisher(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1000
1001 /// Subscribes to this topic.
1002 /// @param theQoS The quality of service parameters for this subscription.
1003 /// @param subscriber The subscriber's proxy. This proxy cannot be null.
1004 /// @param current The Current object of the incoming request.
1005 /// @return The per-subscriber publisher proxy. This proxy is never null.
1006 /// @throws IceStorm::AlreadySubscribed Thrown when @p subscriber is already subscribed.
1007 /// @throws IceStorm::BadQoS Thrown when @p theQoS is unavailable or invalid.
1008 /// @see ::IceStorm::TopicPrx::unsubscribe
1009 virtual std::optional<Ice::ObjectPrx> subscribeAndGetPublisher(QoS theQoS, std::optional<Ice::ObjectPrx> subscriber, const Ice::Current& current) = 0;
1010
1011 /// @private
1012 void _iceD_subscribeAndGetPublisher(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1013
1014 /// Unsubscribes the provided @p subscriber from this topic.
1015 /// @param subscriber A proxy to an existing subscriber. This proxy is never null.
1016 /// @param current The Current object of the incoming request.
1017 /// @see ::IceStorm::TopicPrx::subscribeAndGetPublisher
1018 virtual void unsubscribe(std::optional<Ice::ObjectPrx> subscriber, const Ice::Current& current) = 0;
1019
1020 /// @private
1021 void _iceD_unsubscribe(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1022
1023 /// Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
1024 /// @param linkTo The topic to link to. This proxy cannot be null.
1025 /// @param cost The cost of the link.
1026 /// @param current The Current object of the incoming request.
1027 /// @throws IceStorm::LinkExists Thrown when a link to @p linkTo already exists.
1028 virtual void link(std::optional<TopicPrx> linkTo, std::int32_t cost, const Ice::Current& current) = 0;
1029
1030 /// @private
1031 void _iceD_link(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1032
1033 /// Destroys a link from this topic to the provided topic.
1034 /// @param linkTo The topic to destroy the link to. This proxy cannot be null.
1035 /// @param current The Current object of the incoming request.
1036 /// @throws IceStorm::NoSuchLink Thrown when a link to @p linkTo does not exist.
1037 virtual void unlink(std::optional<TopicPrx> linkTo, const Ice::Current& current) = 0;
1038
1039 /// @private
1040 void _iceD_unlink(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1041
1042 /// Gets information on the current links.
1043 /// @param current The Current object of the incoming request.
1044 /// @return A sequence of LinkInfo objects.
1045 [[nodiscard]] virtual LinkInfoSeq getLinkInfoSeq(const Ice::Current& current) const = 0;
1046
1047 /// @private
1048 void _iceD_getLinkInfoSeq(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1049
1050 /// Gets the list of subscribers for this topic.
1051 /// @param current The Current object of the incoming request.
1052 /// @return The sequence of Ice identities for the subscriber objects.
1053 [[nodiscard]] virtual ::Ice::IdentitySeq getSubscribers(const Ice::Current& current) const = 0;
1054
1055 /// @private
1056 void _iceD_getSubscribers(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1057
1058 /// Destroys this topic.
1059 /// @param current The Current object of the incoming request.
1060 virtual void destroy(const Ice::Current& current) = 0;
1061
1062 /// @private
1063 void _iceD_destroy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1064
1065 /// Gets the type ID of the associated Slice interface.
1066 /// @return The string `"::IceStorm::Topic"`.
1067 static const char* ice_staticId() noexcept;
1068 };
1069
1070 /// A shared pointer to a Topic.
1071 using TopicPtr = std::shared_ptr<Topic>;
1072
1073 /// Represents an object that manages topics.
1074 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceStorm::TopicManager`.
1075 /// @see TopicPrx
1076 /// @headerfile IceStorm/IceStorm.h
1077 class ICESTORM_API TopicManager : public virtual Ice::Object
1078 {
1079 public:
1080 /// The associated proxy type.
1081 using ProxyType = TopicManagerPrx;
1082
1083 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1084 /// @param request The incoming request.
1085 /// @param sendResponse The callback to send the response.
1086 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1087
1088 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1089
1090 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1091
1092 /// Creates a new topic.
1093 /// @param name The name of the topic.
1094 /// @param current The Current object of the incoming request.
1095 /// @return A proxy to the new topic object. The returned proxy is never null.
1096 /// @throws IceStorm::TopicExists Thrown when a topic with the same @p name already exists.
1097 virtual std::optional<TopicPrx> create(std::string name, const Ice::Current& current) = 0;
1098
1099 /// @private
1100 void _iceD_create(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1101
1102 /// Retrieves a topic by name.
1103 /// @param name The name of the topic.
1104 /// @param current The Current object of the incoming request.
1105 /// @return A proxy to the topic object. The returned proxy is never null.
1106 /// @throws IceStorm::NoSuchTopic Thrown when there is no topic named @p name.
1107 virtual std::optional<TopicPrx> retrieve(std::string name, const Ice::Current& current) = 0;
1108
1109 /// @private
1110 void _iceD_retrieve(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1111
1112 /// Creates a new topic with the given name, or retrieves the existing topic with this name if it already
1113 /// exists.
1114 /// @param name The name of the topic.
1115 /// @param current The Current object of the incoming request.
1116 /// @return A proxy to the topic object. The returned proxy is never null.
1117 virtual std::optional<TopicPrx> createOrRetrieve(std::string name, const Ice::Current& current) = 0;
1118
1119 /// @private
1120 void _iceD_createOrRetrieve(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1121
1122 /// Retrieves all topics managed by this topic manager.
1123 /// @param current The Current object of the incoming request.
1124 /// @return A dictionary of string, topic proxy pairs.
1125 virtual TopicDict retrieveAll(const Ice::Current& current) = 0;
1126
1127 /// @private
1128 void _iceD_retrieveAll(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1129
1130 /// Gets the type ID of the associated Slice interface.
1131 /// @return The string `"::IceStorm::TopicManager"`.
1132 static const char* ice_staticId() noexcept;
1133 };
1134
1135 /// A shared pointer to a TopicManager.
1136 using TopicManagerPtr = std::shared_ptr<TopicManager>;
1137
1138 /// Provides access to a TopicManagerPrx object via a fixed identity.
1139 /// An IceStorm Finder is always registered with identity `IceStorm/Finder`. This allows clients to obtain the
1140 /// associated TopicManager proxy with just the endpoint information of the object. For example, you can use the
1141 /// Finder proxy `IceStorm/Finder:tcp -h somehost -p 4061` to get the TopicManager proxy
1142 /// `MyIceStorm/TopicManager:tcp -h somehost -p 4061`.
1143 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceStorm::Finder`.
1144 /// @headerfile IceStorm/IceStorm.h
1145 class ICESTORM_API Finder : public virtual Ice::Object
1146 {
1147 public:
1148 /// The associated proxy type.
1149 using ProxyType = FinderPrx;
1150
1151 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1152 /// @param request The incoming request.
1153 /// @param sendResponse The callback to send the response.
1154 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1155
1156 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1157
1158 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1159
1160 /// Gets a proxy to the associated ::IceStorm::TopicManagerPrx. The proxy might point to several replicas.
1161 /// @param current The Current object of the incoming request.
1162 /// @return The topic manager proxy. This proxy is never null.
1163 virtual std::optional<TopicManagerPrx> getTopicManager(const Ice::Current& current) = 0;
1164
1165 /// @private
1166 void _iceD_getTopicManager(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1167
1168 /// Gets the type ID of the associated Slice interface.
1169 /// @return The string `"::IceStorm::Finder"`.
1170 static const char* ice_staticId() noexcept;
1171 };
1172
1173 /// A shared pointer to a Finder.
1174 using FinderPtr = std::shared_ptr<Finder>;
1175}
1176
1177namespace IceStorm
1178{
1179 /// Represents an IceStorm topic. Publishers publish data to a topic (via the topic's publisher object), and
1180 /// subscribers subscribe to a topic.
1181 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceStorm::Topic`.
1182 /// @see TopicManagerPrx
1183 /// @headerfile IceStorm/IceStorm.h
1184 class ICESTORM_API AsyncTopic : public virtual Ice::Object
1185 {
1186 public:
1187 /// The associated proxy type.
1189
1190 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1191 /// @param request The incoming request.
1192 /// @param sendResponse The callback to send the response.
1193 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1194
1195 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1196
1197 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1198
1199 /// Gets the name of this topic.
1200 /// @param response The response callback. It accepts:
1201 /// - The name of the topic.
1202 /// @param exception The exception callback.
1203 /// @param current The Current object of the incoming request.
1204 /// @see ::IceStorm::TopicManagerPrx::create
1205 virtual void getNameAsync(std::function<void(std::string_view returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1206
1207 /// @private
1208 void _iceD_getName(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1209
1210 /// Gets a proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this
1211 /// operation and then creates a proxy with the publisher type from this proxy. If a replicated IceStorm
1212 /// deployment is used, this call may return a replicated proxy.
1213 /// @param response The response callback. It accepts:
1214 /// - A proxy to publish data on this topic. This proxy is never null.
1215 /// @param exception The exception callback.
1216 /// @param current The Current object of the incoming request.
1217 virtual void getPublisherAsync(std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1218
1219 /// @private
1220 void _iceD_getPublisher(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1221
1222 /// Gets a non-replicated proxy to a publisher object for this topic. To publish data to a topic, a publisher
1223 /// calls this operation and then creates a proxy with the publisher type from this proxy.
1224 /// @param response The response callback. It accepts:
1225 /// - A proxy to publish data on this topic. This proxy is never null.
1226 /// @param exception The exception callback.
1227 /// @param current The Current object of the incoming request.
1228 virtual void getNonReplicatedPublisherAsync(std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1229
1230 /// @private
1231 void _iceD_getNonReplicatedPublisher(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1232
1233 /// Subscribes to this topic.
1234 /// @param theQoS The quality of service parameters for this subscription.
1235 /// @param subscriber The subscriber's proxy. This proxy cannot be null.
1236 /// @param response The response callback. It accepts:
1237 /// - The per-subscriber publisher proxy. This proxy is never null.
1238 /// @param exception The exception callback.
1239 /// @param current The Current object of the incoming request.
1240 /// @throws IceStorm::AlreadySubscribed Thrown when @p subscriber is already subscribed.
1241 /// @throws IceStorm::BadQoS Thrown when @p theQoS is unavailable or invalid.
1242 /// @see ::IceStorm::TopicPrx::unsubscribe
1243 virtual void subscribeAndGetPublisherAsync(QoS theQoS, std::optional<Ice::ObjectPrx> subscriber, std::function<void(const std::optional<Ice::ObjectPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1244
1245 /// @private
1246 void _iceD_subscribeAndGetPublisher(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1247
1248 /// Unsubscribes the provided @p subscriber from this topic.
1249 /// @param subscriber A proxy to an existing subscriber. This proxy is never null.
1250 /// @param response The response callback.
1251 /// @param exception The exception callback.
1252 /// @param current The Current object of the incoming request.
1253 /// @see ::IceStorm::TopicPrx::subscribeAndGetPublisher
1254 virtual void unsubscribeAsync(std::optional<Ice::ObjectPrx> subscriber, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1255
1256 /// @private
1257 void _iceD_unsubscribe(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1258
1259 /// Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
1260 /// @param linkTo The topic to link to. This proxy cannot be null.
1261 /// @param cost The cost of the link.
1262 /// @param response The response callback.
1263 /// @param exception The exception callback.
1264 /// @param current The Current object of the incoming request.
1265 /// @throws IceStorm::LinkExists Thrown when a link to @p linkTo already exists.
1266 virtual void linkAsync(std::optional<TopicPrx> linkTo, std::int32_t cost, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1267
1268 /// @private
1269 void _iceD_link(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1270
1271 /// Destroys a link from this topic to the provided topic.
1272 /// @param linkTo The topic to destroy the link to. This proxy cannot be null.
1273 /// @param response The response callback.
1274 /// @param exception The exception callback.
1275 /// @param current The Current object of the incoming request.
1276 /// @throws IceStorm::NoSuchLink Thrown when a link to @p linkTo does not exist.
1277 virtual void unlinkAsync(std::optional<TopicPrx> linkTo, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1278
1279 /// @private
1280 void _iceD_unlink(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1281
1282 /// Gets information on the current links.
1283 /// @param response The response callback. It accepts:
1284 /// - A sequence of LinkInfo objects.
1285 /// @param exception The exception callback.
1286 /// @param current The Current object of the incoming request.
1287 virtual void getLinkInfoSeqAsync(std::function<void(const LinkInfoSeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1288
1289 /// @private
1290 void _iceD_getLinkInfoSeq(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1291
1292 /// Gets the list of subscribers for this topic.
1293 /// @param response The response callback. It accepts:
1294 /// - The sequence of Ice identities for the subscriber objects.
1295 /// @param exception The exception callback.
1296 /// @param current The Current object of the incoming request.
1297 virtual void getSubscribersAsync(std::function<void(const ::Ice::IdentitySeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) const = 0;
1298
1299 /// @private
1300 void _iceD_getSubscribers(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>) const;
1301
1302 /// Destroys this topic.
1303 /// @param response The response callback.
1304 /// @param exception The exception callback.
1305 /// @param current The Current object of the incoming request.
1306 virtual void destroyAsync(std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1307
1308 /// @private
1309 void _iceD_destroy(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1310
1311 /// Gets the type ID of the associated Slice interface.
1312 /// @return The string `"::IceStorm::Topic"`.
1313 static const char* ice_staticId() noexcept;
1314 };
1315
1316 /// A shared pointer to an AsyncTopic.
1317 using AsyncTopicPtr = std::shared_ptr<AsyncTopic>;
1318
1319 /// Represents an object that manages topics.
1320 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceStorm::TopicManager`.
1321 /// @see TopicPrx
1322 /// @headerfile IceStorm/IceStorm.h
1323 class ICESTORM_API AsyncTopicManager : public virtual Ice::Object
1324 {
1325 public:
1326 /// The associated proxy type.
1328
1329 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1330 /// @param request The incoming request.
1331 /// @param sendResponse The callback to send the response.
1332 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1333
1334 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1335
1336 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1337
1338 /// Creates a new topic.
1339 /// @param name The name of the topic.
1340 /// @param response The response callback. It accepts:
1341 /// - A proxy to the new topic object. The returned proxy is never null.
1342 /// @param exception The exception callback.
1343 /// @param current The Current object of the incoming request.
1344 /// @throws IceStorm::TopicExists Thrown when a topic with the same @p name already exists.
1345 virtual void createAsync(std::string name, std::function<void(const std::optional<TopicPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1346
1347 /// @private
1348 void _iceD_create(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1349
1350 /// Retrieves a topic by name.
1351 /// @param name The name of the topic.
1352 /// @param response The response callback. It accepts:
1353 /// - A proxy to the topic object. The returned proxy is never null.
1354 /// @param exception The exception callback.
1355 /// @param current The Current object of the incoming request.
1356 /// @throws IceStorm::NoSuchTopic Thrown when there is no topic named @p name.
1357 virtual void retrieveAsync(std::string name, std::function<void(const std::optional<TopicPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1358
1359 /// @private
1360 void _iceD_retrieve(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1361
1362 /// Creates a new topic with the given name, or retrieves the existing topic with this name if it already
1363 /// exists.
1364 /// @param name The name of the topic.
1365 /// @param response The response callback. It accepts:
1366 /// - A proxy to the topic object. The returned proxy is never null.
1367 /// @param exception The exception callback.
1368 /// @param current The Current object of the incoming request.
1369 virtual void createOrRetrieveAsync(std::string name, std::function<void(const std::optional<TopicPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1370
1371 /// @private
1372 void _iceD_createOrRetrieve(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1373
1374 /// Retrieves all topics managed by this topic manager.
1375 /// @param response The response callback. It accepts:
1376 /// - A dictionary of string, topic proxy pairs.
1377 /// @param exception The exception callback.
1378 /// @param current The Current object of the incoming request.
1379 virtual void retrieveAllAsync(std::function<void(const TopicDict& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1380
1381 /// @private
1382 void _iceD_retrieveAll(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1383
1384 /// Gets the type ID of the associated Slice interface.
1385 /// @return The string `"::IceStorm::TopicManager"`.
1386 static const char* ice_staticId() noexcept;
1387 };
1388
1389 /// A shared pointer to an AsyncTopicManager.
1390 using AsyncTopicManagerPtr = std::shared_ptr<AsyncTopicManager>;
1391
1392 /// Provides access to a TopicManagerPrx object via a fixed identity.
1393 /// An IceStorm Finder is always registered with identity `IceStorm/Finder`. This allows clients to obtain the
1394 /// associated TopicManager proxy with just the endpoint information of the object. For example, you can use the
1395 /// Finder proxy `IceStorm/Finder:tcp -h somehost -p 4061` to get the TopicManager proxy
1396 /// `MyIceStorm/TopicManager:tcp -h somehost -p 4061`.
1397 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceStorm::Finder`.
1398 /// @headerfile IceStorm/IceStorm.h
1399 class ICESTORM_API AsyncFinder : public virtual Ice::Object
1400 {
1401 public:
1402 /// The associated proxy type.
1404
1405 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
1406 /// @param request The incoming request.
1407 /// @param sendResponse The callback to send the response.
1408 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
1409
1410 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
1411
1412 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
1413
1414 /// Gets a proxy to the associated ::IceStorm::TopicManagerPrx. The proxy might point to several replicas.
1415 /// @param response The response callback. It accepts:
1416 /// - The topic manager proxy. This proxy is never null.
1417 /// @param exception The exception callback.
1418 /// @param current The Current object of the incoming request.
1419 virtual void getTopicManagerAsync(std::function<void(const std::optional<TopicManagerPrx>& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1420
1421 /// @private
1422 void _iceD_getTopicManager(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1423
1424 /// Gets the type ID of the associated Slice interface.
1425 /// @return The string `"::IceStorm::Finder"`.
1426 static const char* ice_staticId() noexcept;
1427 };
1428
1429 /// A shared pointer to an AsyncFinder.
1430 using AsyncFinderPtr = std::shared_ptr<AsyncFinder>;
1431}
1432
1433namespace Ice
1434{
1435 /// @cond INTERNAL
1436 template<>
1437 struct StreamableTraits<::IceStorm::LinkInfo>
1438 {
1439 static constexpr StreamHelperCategory helper = StreamHelperCategoryStruct;
1440 static constexpr int minWireSize = 7;
1441 static constexpr bool fixedLength = false;
1442 };
1443
1444 template<>
1445 struct StreamReader<::IceStorm::LinkInfo>
1446 {
1447 /// Unmarshals a ::IceStorm::LinkInfo from the input stream.
1448 static void read(InputStream* istr, ::IceStorm::LinkInfo& v)
1449 {
1450 istr->readAll(v.theTopic, v.name, v.cost);
1451 }
1452 };
1453 /// @endcond
1454}
1455
1456// NOLINTEND(modernize-concat-nested-namespaces)
1457
1458#include <Ice/PopDisableWarnings.h>
1459#endif
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
The exception that is thrown when attempting to subscribe a proxy for which a subscription already ex...
Definition IceStorm.h:785
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
FinderPrx ProxyType
The associated proxy type.
Definition IceStorm.h:1403
virtual void getTopicManagerAsync(std::function< void(const std::optional< TopicManagerPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets a proxy to the associated IceStorm::TopicManagerPrx.
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,...
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.
Provides access to a TopicManagerPrx object via a fixed identity.
Definition IceStorm.h:1400
virtual void createAsync(std::string name, std::function< void(const std::optional< TopicPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Creates a new topic.
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,...
virtual void retrieveAsync(std::string name, std::function< void(const std::optional< TopicPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Retrieves a topic by name.
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 retrieveAllAsync(std::function< void(const TopicDict &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Retrieves all topics managed by this topic manager.
TopicManagerPrx ProxyType
The associated proxy type.
Definition IceStorm.h:1327
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void createOrRetrieveAsync(std::string name, std::function< void(const std::optional< TopicPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Creates a new topic with the given name, or retrieves the existing topic with this name if it already...
Represents an object that manages topics.
Definition IceStorm.h:1324
virtual void getNonReplicatedPublisherAsync(std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets a non-replicated proxy to a publisher object for this topic.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void unlinkAsync(std::optional< TopicPrx > linkTo, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Destroys a link from this topic to the provided topic.
virtual void getLinkInfoSeqAsync(std::function< void(const LinkInfoSeq &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets information on the current links.
virtual void destroyAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Destroys this topic.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
virtual void subscribeAndGetPublisherAsync(QoS theQoS, std::optional< Ice::ObjectPrx > subscriber, std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Subscribes to this topic.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
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,...
virtual void getSubscribersAsync(std::function< void(const ::Ice::IdentitySeq &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets the list of subscribers for this topic.
virtual void linkAsync(std::optional< TopicPrx > linkTo, std::int32_t cost, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Creates a link to another topic.
TopicPrx ProxyType
The associated proxy type.
Definition IceStorm.h:1188
virtual void getPublisherAsync(std::function< void(const std::optional< Ice::ObjectPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets a proxy to a publisher object for this topic.
virtual void getNameAsync(std::function< void(std::string_view returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current) const =0
Gets the name of this topic.
virtual void unsubscribeAsync(std::optional< Ice::ObjectPrx > subscriber, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Unsubscribes the provided subscriber from this topic.
Represents an IceStorm topic.
Definition IceStorm.h:1185
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition IceStorm.h:824
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
std::string reason
The reason for the failure.
Definition IceStorm.h:839
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
BadQoS(const BadQoS &) noexcept=default
Copy constructor.
BadQoS() noexcept=default
Default constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
FinderPrx(const FinderPrx &other) noexcept
Copy constructor.
Definition IceStorm.h:582
FinderPrx(FinderPrx &&other) noexcept
Move constructor.
Definition IceStorm.h:586
FinderPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition IceStorm.h:578
std::function< void()> getTopicManagerAsync(std::function< void(std::optional<::IceStorm::TopicManagerPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated IceStorm::TopicManagerPrx.
std::future< std::optional< TopicManagerPrx > > getTopicManagerAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated IceStorm::TopicManagerPrx.
FinderPrx & operator=(FinderPrx &&rhs) noexcept
Move assignment operator.
Definition IceStorm.h:604
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
FinderPrx & operator=(const FinderPrx &rhs) noexcept
Copy assignment operator.
Definition IceStorm.h:593
std::optional< TopicManagerPrx > getTopicManager(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the associated IceStorm::TopicManagerPrx.
Provides access to a TopicManagerPrx object via a fixed identity.
Definition IceStorm.h:573
LinkExists() noexcept=default
Default constructor.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
LinkExists(const LinkExists &) noexcept=default
Copy constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
std::string name
The name of the linked topic.
Definition IceStorm.h:725
void ice_throw() const override
Throws this exception.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition IceStorm.h:710
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition IceStorm.h:916
void ice_throw() const override
Throws this exception.
std::string name
The name of the topic that does not exist.
Definition IceStorm.h:931
NoSuchTopic(const NoSuchTopic &) noexcept=default
Copy constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
NoSuchTopic() noexcept=default
Default constructor.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
const char * ice_id() const noexcept override
Returns the type ID of this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::string name
The name of the topic that already exists.
Definition IceStorm.h:885
TopicExists(const TopicExists &) noexcept=default
Copy constructor.
TopicExists() noexcept=default
Default constructor.
void ice_throw() const override
Throws this exception.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition IceStorm.h:870
TopicManagerPrx & operator=(const TopicManagerPrx &rhs) noexcept
Copy assignment operator.
Definition IceStorm.h:418
std::optional< TopicPrx > createOrRetrieve(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new topic with the given name, or retrieves the existing topic with this name if it already...
TopicManagerPrx(TopicManagerPrx &&other) noexcept
Move constructor.
Definition IceStorm.h:411
TopicDict retrieveAll(const Ice::Context &context=Ice::noExplicitContext) const
Retrieves all topics managed by this topic manager.
TopicManagerPrx(const TopicManagerPrx &other) noexcept
Copy constructor.
Definition IceStorm.h:407
std::function< void()> createAsync(std::string_view name, std::function< void(std::optional<::IceStorm::TopicPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new topic.
std::optional< TopicPrx > retrieve(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves a topic by name.
std::function< void()> retrieveAsync(std::string_view name, std::function< void(std::optional<::IceStorm::TopicPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves a topic by name.
std::future< TopicDict > retrieveAllAsync(const Ice::Context &context=Ice::noExplicitContext) const
Retrieves all topics managed by this topic manager.
std::function< void()> retrieveAllAsync(std::function< void(::IceStorm::TopicDict)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves all topics managed by this topic manager.
std::future< std::optional< TopicPrx > > createAsync(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new topic.
std::optional< TopicPrx > create(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new topic.
TopicManagerPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition IceStorm.h:403
std::future< std::optional< TopicPrx > > createOrRetrieveAsync(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new topic with the given name, or retrieves the existing topic with this name if it already...
std::future< std::optional< TopicPrx > > retrieveAsync(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves a topic by name.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::function< void()> createOrRetrieveAsync(std::string_view name, std::function< void(std::optional<::IceStorm::TopicPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a new topic with the given name, or retrieves the existing topic with this name if it already...
TopicManagerPrx & operator=(TopicManagerPrx &&rhs) noexcept
Move assignment operator.
Definition IceStorm.h:429
Represents an object that manages topics.
Definition IceStorm.h:398
void link(const std::optional< TopicPrx > &linkTo, std::int32_t cost, const Ice::Context &context=Ice::noExplicitContext) const
Creates a link to another topic.
void unsubscribe(const std::optional< Ice::ObjectPrx > &subscriber, const Ice::Context &context=Ice::noExplicitContext) const
Unsubscribes the provided subscriber from this topic.
std::future< LinkInfoSeq > getLinkInfoSeqAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets information on the current links.
std::function< void()> getNonReplicatedPublisherAsync(std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a non-replicated proxy to a publisher object for this topic.
std::function< void()> getSubscribersAsync(std::function< void(::Ice::IdentitySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the list of subscribers for this topic.
TopicPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition IceStorm.h:73
std::optional< Ice::ObjectPrx > subscribeAndGetPublisher(const QoS &theQoS, const std::optional< Ice::ObjectPrx > &subscriber, const Ice::Context &context=Ice::noExplicitContext) const
Subscribes to this topic.
std::future< std::optional< Ice::ObjectPrx > > subscribeAndGetPublisherAsync(const QoS &theQoS, const std::optional< Ice::ObjectPrx > &subscriber, const Ice::Context &context=Ice::noExplicitContext) const
Subscribes to this topic.
std::function< void()> linkAsync(const std::optional< TopicPrx > &linkTo, std::int32_t cost, 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
Creates a link to another topic.
std::function< void()> destroyAsync(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
Destroys this topic.
TopicPrx(TopicPrx &&other) noexcept
Move constructor.
Definition IceStorm.h:81
TopicPrx & operator=(TopicPrx &&rhs) noexcept
Move assignment operator.
Definition IceStorm.h:99
std::future< void > unsubscribeAsync(const std::optional< Ice::ObjectPrx > &subscriber, const Ice::Context &context=Ice::noExplicitContext) const
Unsubscribes the provided subscriber from this topic.
std::future<::Ice::IdentitySeq > getSubscribersAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the list of subscribers for this topic.
LinkInfoSeq getLinkInfoSeq(const Ice::Context &context=Ice::noExplicitContext) const
Gets information on the current links.
std::optional< Ice::ObjectPrx > getPublisher(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to a publisher object for this topic.
std::future< void > linkAsync(const std::optional< TopicPrx > &linkTo, std::int32_t cost, const Ice::Context &context=Ice::noExplicitContext) const
Creates a link to another topic.
TopicPrx & operator=(const TopicPrx &rhs) noexcept
Copy assignment operator.
Definition IceStorm.h:88
std::function< void()> getPublisherAsync(std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to a publisher object for this topic.
std::future< void > destroyAsync(const Ice::Context &context=Ice::noExplicitContext) const
Destroys this topic.
std::function< void()> getLinkInfoSeqAsync(std::function< void(::IceStorm::LinkInfoSeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets information on the current links.
std::function< void()> unsubscribeAsync(const std::optional< Ice::ObjectPrx > &subscriber, 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
Unsubscribes the provided subscriber from this topic.
std::optional< Ice::ObjectPrx > getNonReplicatedPublisher(const Ice::Context &context=Ice::noExplicitContext) const
Gets a non-replicated proxy to a publisher object for this topic.
std::function< void()> subscribeAndGetPublisherAsync(const QoS &theQoS, const std::optional< Ice::ObjectPrx > &subscriber, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Subscribes to this topic.
std::future< std::optional< Ice::ObjectPrx > > getNonReplicatedPublisherAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a non-replicated proxy to a publisher object for this topic.
void destroy(const Ice::Context &context=Ice::noExplicitContext) const
Destroys this topic.
std::function< void()> unlinkAsync(const std::optional< TopicPrx > &linkTo, 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
Destroys a link from this topic to the provided topic.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::function< void()> getNameAsync(std::function< void(std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the name of this topic.
std::future< void > unlinkAsync(const std::optional< TopicPrx > &linkTo, const Ice::Context &context=Ice::noExplicitContext) const
Destroys a link from this topic to the provided topic.
std::string getName(const Ice::Context &context=Ice::noExplicitContext) const
Gets the name of this topic.
::Ice::IdentitySeq getSubscribers(const Ice::Context &context=Ice::noExplicitContext) const
Gets the list of subscribers for this topic.
std::future< std::string > getNameAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the name of this topic.
TopicPrx(const TopicPrx &other) noexcept
Copy constructor.
Definition IceStorm.h:77
std::future< std::optional< Ice::ObjectPrx > > getPublisherAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to a publisher object for this topic.
void unlink(const std::optional< TopicPrx > &linkTo, const Ice::Context &context=Ice::noExplicitContext) const
Destroys a link from this topic to the provided topic.
Represents an IceStorm topic.
Definition IceStorm.h:68
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
Abstract base class for all exceptions defined in Slice.
std::shared_ptr< TopicManager > TopicManagerPtr
A shared pointer to a TopicManager.
Definition IceStorm.h:1136
std::map< std::string, std::optional< TopicPrx > > TopicDict
A dictionary of topic name to topic proxy.
Definition IceStorm.h:53
std::shared_ptr< AsyncTopic > AsyncTopicPtr
A shared pointer to an AsyncTopic.
Definition IceStorm.h:1317
std::vector< LinkInfo > LinkInfoSeq
A sequence of LinkInfo objects.
Definition IceStorm.h:46
std::shared_ptr< Topic > TopicPtr
A shared pointer to a Topic.
Definition IceStorm.h:1071
std::shared_ptr< AsyncFinder > AsyncFinderPtr
A shared pointer to an AsyncFinder.
Definition IceStorm.h:1430
std::shared_ptr< Finder > FinderPtr
A shared pointer to a Finder.
Definition IceStorm.h:1174
std::map< std::string, std::string > QoS
Quality of service parameters.
Definition IceStorm.h:50
std::ostream & operator<<(std::ostream &os, const LinkInfo &value)
Outputs the description of a LinkInfo to a stream, including all its fields.
std::shared_ptr< AsyncTopicManager > AsyncTopicManagerPtr
A shared pointer to an AsyncTopicManager.
Definition IceStorm.h:1390
Lightweight publish/subscribe framework, available for all Ice language mappings.
Definition IceStorm.h:40
std::vector< Identity > IdentitySeq
A sequence of identities.
Definition Identity.h:37
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:34
The Ice RPC framework.
Definition SampleEvent.h:66
std::int32_t cost
The cost of traversing this link.
Definition IceStorm.h:669
void ice_printFields(std::ostream &os) const
Outputs the name and value of each field of this instance to the stream.
std::optional<::IceStorm::TopicPrx > theTopic
The linked topic proxy. This proxy is never null.
Definition IceStorm.h:663
std::tuple< const std::optional<::IceStorm::TopicPrx > &, const std::string &, const std::int32_t & > ice_tuple() const
Creates a tuple with all the fields of this struct.
Definition IceStorm.h:673
std::string name
The name of the linked topic.
Definition IceStorm.h:666
Information about a topic link.
Definition IceStorm.h:661
Provides information about an incoming request being dispatched.
Definition Current.h:18