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