Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
PropertiesAdmin.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'PropertiesAdmin.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_PropertiesAdmin_h_
8#define Ice_PropertiesAdmin_h_
9
11#include <Ice/Ice.h>
12#include "PropertyDict.h"
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION != 30850
16# error Ice version mismatch: an exact match is required for beta generated code
17# endif
18#endif
19
20// NOLINTBEGIN(modernize-concat-nested-namespaces)
21
22namespace Ice
23{
25}
26
27namespace Ice
28{
29 /// Provides remote access to the properties of a communicator.
30 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::PropertiesAdmin`.
31 /// @headerfile Ice/Ice.h
32 class ICE_API PropertiesAdminPrx : public Ice::Proxy<PropertiesAdminPrx, Ice::ObjectPrx>
33 {
34 public:
35 /// Constructs a proxy from a Communicator and a proxy string.
36 /// @param communicator The communicator of the new proxy.
37 /// @param proxyString The proxy string to parse.
38 PropertiesAdminPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
39
40 /// Copy constructor. Constructs with a copy of the contents of @p other.
41 /// @param other The proxy to copy from.
42 PropertiesAdminPrx(const PropertiesAdminPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
43
44 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
45 /// @param other The proxy to move from.
46 PropertiesAdminPrx(PropertiesAdminPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
47
48 ~PropertiesAdminPrx() override;
49
50 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
51 /// @param rhs The proxy to copy from.
52 /// @return A reference to this proxy.
54 {
55 if (this != &rhs)
56 {
58 }
59 return *this;
60 }
61
62 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
63 /// @param rhs The proxy to move from.
65 {
66 if (this != &rhs)
67 {
68 Ice::ObjectPrx::operator=(std::move(rhs));
69 }
70 return *this;
71 }
72
73 /// Gets a property by key.
74 /// @param key The property key.
75 /// @param context The request context.
76 /// @return The property value. This value is empty if the property is not set.
77 std::string getProperty(std::string_view key, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
78
79 /// Gets a property by key.
80 /// @param key The property key.
81 /// @param context The request context.
82 /// @return A future that becomes available when the invocation completes. This future holds:
83 /// - The property value. This value is empty if the property is not set.
84 [[nodiscard]] std::future<std::string> getPropertyAsync(std::string_view key, const Ice::Context& context = Ice::noExplicitContext) const;
85
86 /// Gets a property by key.
87 /// @param key The property key.
88 /// @param response The response callback. It accepts:
89 /// - The property value. This value is empty if the property is not set.
90 /// @param exception The exception callback.
91 /// @param sent The sent callback.
92 /// @param context The request context.
93 /// @return A function that can be called to cancel the invocation locally.
94 // NOLINTNEXTLINE(modernize-use-nodiscard)
95 std::function<void()> getPropertyAsync(std::string_view key, 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;
96
97 /// @private
98 void _iceI_getProperty(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, std::string_view, const Ice::Context&) const;
99
100 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
101 /// are returned.
102 /// @param prefix The prefix to search for. May be empty.
103 /// @param context The request context.
104 /// @return The matching property set.
105 PropertyDict getPropertiesForPrefix(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
106
107 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
108 /// are returned.
109 /// @param prefix The prefix to search for. May be empty.
110 /// @param context The request context.
111 /// @return A future that becomes available when the invocation completes. This future holds:
112 /// - The matching property set.
113 [[nodiscard]] std::future<PropertyDict> getPropertiesForPrefixAsync(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const;
114
115 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
116 /// are returned.
117 /// @param prefix The prefix to search for. May be empty.
118 /// @param response The response callback. It accepts:
119 /// - The matching property set.
120 /// @param exception The exception callback.
121 /// @param sent The sent callback.
122 /// @param context The request context.
123 /// @return A function that can be called to cancel the invocation locally.
124 // NOLINTNEXTLINE(modernize-use-nodiscard)
125 std::function<void()> getPropertiesForPrefixAsync(std::string_view prefix, std::function<void(::Ice::PropertyDict)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
126
127 /// @private
128 void _iceI_getPropertiesForPrefix(const std::shared_ptr<IceInternal::OutgoingAsyncT<PropertyDict>>&, std::string_view, const Ice::Context&) const;
129
130 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
131 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
132 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
133 /// entries in @p newProperties are not affected by this update.
134 /// @param newProperties Properties to add, change, or remove.
135 /// @param context The request context.
136 void setProperties(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
137
138 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
139 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
140 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
141 /// entries in @p newProperties are not affected by this update.
142 /// @param newProperties Properties to add, change, or remove.
143 /// @param context The request context.
144 /// @return A future that becomes available when the invocation completes.
145 [[nodiscard]] std::future<void> setPropertiesAsync(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
146
147 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
148 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
149 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
150 /// entries in @p newProperties are not affected by this update.
151 /// @param newProperties Properties to add, change, or remove.
152 /// @param response The response callback.
153 /// @param exception The exception callback.
154 /// @param sent The sent callback.
155 /// @param context The request context.
156 /// @return A function that can be called to cancel the invocation locally.
157 // NOLINTNEXTLINE(modernize-use-nodiscard)
158 std::function<void()> setPropertiesAsync(const PropertyDict& newProperties, 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;
159
160 /// @private
161 void _iceI_setProperties(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const PropertyDict&, const Ice::Context&) const;
162
163 /// Gets the type ID of the associated Slice interface.
164 /// @return The string `"::Ice::PropertiesAdmin"`.
165 static const char* ice_staticId() noexcept;
166
167 /// @private
168 static PropertiesAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return PropertiesAdminPrx{std::move(ref)}; }
169
170 protected:
171 /// @private
172 PropertiesAdminPrx() = default;
173
174 /// @private
175 explicit PropertiesAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
176 {
177 }
178 };
179}
180
181namespace Ice
182{
183 /// Provides remote access to the properties of a communicator.
184 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::PropertiesAdmin`.
185 /// @headerfile Ice/Ice.h
186 class ICE_API PropertiesAdmin : public virtual Ice::Object
187 {
188 public:
189 /// The associated proxy type.
191
192 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
193 /// @param request The incoming request.
194 /// @param sendResponse The callback to send the response.
195 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
196
197 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
198
199 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
200
201 /// Gets a property by key.
202 /// @param key The property key.
203 /// @param current The Current object of the incoming request.
204 /// @return The property value. This value is empty if the property is not set.
205 virtual std::string getProperty(std::string key, const Ice::Current& current) = 0;
206
207 /// @private
208 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
209
210 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
211 /// are returned.
212 /// @param prefix The prefix to search for. May be empty.
213 /// @param current The Current object of the incoming request.
214 /// @return The matching property set.
215 virtual PropertyDict getPropertiesForPrefix(std::string prefix, const Ice::Current& current) = 0;
216
217 /// @private
218 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
219
220 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
221 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
222 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
223 /// entries in @p newProperties are not affected by this update.
224 /// @param newProperties Properties to add, change, or remove.
225 /// @param current The Current object of the incoming request.
226 virtual void setProperties(PropertyDict newProperties, const Ice::Current& current) = 0;
227
228 /// @private
229 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
230
231 /// Gets the type ID of the associated Slice interface.
232 /// @return The string `"::Ice::PropertiesAdmin"`.
233 static const char* ice_staticId() noexcept;
234 };
235
236 /// A shared pointer to a PropertiesAdmin.
237 using PropertiesAdminPtr = std::shared_ptr<PropertiesAdmin>;
238}
239
240namespace Ice
241{
242 /// Provides remote access to the properties of a communicator.
243 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::PropertiesAdmin`.
244 /// @headerfile Ice/Ice.h
245 class ICE_API AsyncPropertiesAdmin : public virtual Ice::Object
246 {
247 public:
248 /// The associated proxy type.
250
251 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
252 /// @param request The incoming request.
253 /// @param sendResponse The callback to send the response.
254 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
255
256 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
257
258 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
259
260 /// Gets a property by key.
261 /// @param key The property key.
262 /// @param response The response callback. It accepts:
263 /// - The property value. This value is empty if the property is not set.
264 /// @param exception The exception callback.
265 /// @param current The Current object of the incoming request.
266 virtual void getPropertyAsync(std::string key, std::function<void(std::string_view returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
267
268 /// @private
269 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
270
271 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
272 /// are returned.
273 /// @param prefix The prefix to search for. May be empty.
274 /// @param response The response callback. It accepts:
275 /// - The matching property set.
276 /// @param exception The exception callback.
277 /// @param current The Current object of the incoming request.
278 virtual void getPropertiesForPrefixAsync(std::string prefix, std::function<void(const PropertyDict& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
279
280 /// @private
281 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
282
283 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
284 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
285 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
286 /// entries in @p newProperties are not affected by this update.
287 /// @param newProperties Properties to add, change, or remove.
288 /// @param response The response callback.
289 /// @param exception The exception callback.
290 /// @param current The Current object of the incoming request.
291 virtual void setPropertiesAsync(PropertyDict newProperties, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
292
293 /// @private
294 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
295
296 /// Gets the type ID of the associated Slice interface.
297 /// @return The string `"::Ice::PropertiesAdmin"`.
298 static const char* ice_staticId() noexcept;
299 };
300
301 /// A shared pointer to an AsyncPropertiesAdmin.
303}
304
305// NOLINTEND(modernize-concat-nested-namespaces)
306
307#include <Ice/PopDisableWarnings.h>
308#endif
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
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 setPropertiesAsync(PropertyDict newProperties, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Updates the communicator's properties with the given property set.
virtual void getPropertiesForPrefixAsync(std::string prefix, std::function< void(const PropertyDict &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets all properties whose keys begin with prefix.
PropertiesAdminPrx ProxyType
The associated proxy type.
virtual void getPropertyAsync(std::string key, std::function< void(std::string_view returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets a property by key.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Provides remote access to the properties of a communicator.
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
std::string getProperty(std::string_view key, const Ice::Context &context=Ice::noExplicitContext) const
Gets a property by key.
std::function< void()> getPropertyAsync(std::string_view key, 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 a property by key.
std::future< PropertyDict > getPropertiesForPrefixAsync(std::string_view prefix, const Ice::Context &context=Ice::noExplicitContext) const
Gets all properties whose keys begin with prefix.
std::function< void()> getPropertiesForPrefixAsync(std::string_view prefix, std::function< void(::Ice::PropertyDict)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets all properties whose keys begin with prefix.
std::future< std::string > getPropertyAsync(std::string_view key, const Ice::Context &context=Ice::noExplicitContext) const
Gets a property by key.
std::function< void()> setPropertiesAsync(const PropertyDict &newProperties, 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
Updates the communicator's properties with the given property set.
PropertyDict getPropertiesForPrefix(std::string_view prefix, const Ice::Context &context=Ice::noExplicitContext) const
Gets all properties whose keys begin with prefix.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< void > setPropertiesAsync(const PropertyDict &newProperties, const Ice::Context &context=Ice::noExplicitContext) const
Updates the communicator's properties with the given property set.
PropertiesAdminPrx & operator=(PropertiesAdminPrx &&rhs) noexcept
Move assignment operator.
PropertiesAdminPrx & operator=(const PropertiesAdminPrx &rhs) noexcept
Copy assignment operator.
PropertiesAdminPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
void setProperties(const PropertyDict &newProperties, const Ice::Context &context=Ice::noExplicitContext) const
Updates the communicator's properties with the given property set.
PropertiesAdminPrx(const PropertiesAdminPrx &other) noexcept
Copy constructor.
PropertiesAdminPrx(PropertiesAdminPrx &&other) noexcept
Move constructor.
Provides remote access to the properties of a communicator.
PropertiesAdminPrx ProxyType
The associated proxy type.
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 setProperties(PropertyDict newProperties, const Ice::Current &current)=0
Updates the communicator's properties with the given property set.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
virtual PropertyDict getPropertiesForPrefix(std::string prefix, const Ice::Current &current)=0
Gets all properties whose keys begin with prefix.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual std::string getProperty(std::string key, const Ice::Current &current)=0
Gets a property by key.
Provides remote access to the properties of a communicator.
Provides typed proxy functions.
Definition Proxy.h:45
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::shared_ptr< PropertiesAdmin > PropertiesAdminPtr
A shared pointer to a PropertiesAdmin.
std::shared_ptr< AsyncPropertiesAdmin > AsyncPropertiesAdminPtr
A shared pointer to an AsyncPropertiesAdmin.
std::map< std::string, std::string, std::less<> > PropertyDict
A simple collection of properties, represented as a dictionary of key/value pairs.
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
Provides information about an incoming request being dispatched.
Definition Current.h:18