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