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