Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
ValueFactory.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4//
5// Ice version 3.7.11
6//
7// <auto-generated>
8//
9// Generated from file `ValueFactory.ice'
10//
11// Warning: do not edit this file.
12//
13// </auto-generated>
14//
15
16#ifndef __Ice_ValueFactory_h__
17#define __Ice_ValueFactory_h__
18
20#include <Ice/ProxyF.h>
21#include <Ice/ObjectF.h>
22#include <Ice/ValueF.h>
23#include <Ice/Exception.h>
24#include <Ice/LocalObject.h>
25#include <Ice/StreamHelpers.h>
26#include <Ice/Comparable.h>
27#include <IceUtil/ScopedArray.h>
28#include <Ice/Optional.h>
30
31#ifndef ICE_IGNORE_VERSION
32# if ICE_INT_VERSION / 100 != 307
33# error Ice version mismatch!
34# endif
35# if ICE_INT_VERSION % 100 >= 50
36# error Beta header file detected
37# endif
38# if ICE_INT_VERSION % 100 < 11
39# error Ice patch level mismatch!
40# endif
41#endif
42
43#ifndef ICE_API
44# if defined(ICE_STATIC_LIBS)
45# define ICE_API /**/
46# elif defined(ICE_API_EXPORTS)
47# define ICE_API ICE_DECLSPEC_EXPORT
48# else
49# define ICE_API ICE_DECLSPEC_IMPORT
50# endif
51#endif
52
53#ifdef ICE_CPP11_MAPPING // C++11 mapping
54
55namespace Ice
56{
57
59
60}
61
62namespace Ice
63{
64
77using ValueFactory = ::std::function<::std::shared_ptr<Value>(const ::std::string& type)>;
78
86class ICE_CLASS(ICE_API) ValueFactoryManager
87{
88public:
89
90 ICE_MEMBER(ICE_API) virtual ~ValueFactoryManager();
91
132 virtual void add(ValueFactory factory, const ::std::string& id) = 0;
133
141 virtual ::Ice::ValueFactory find(const ::std::string& id) const noexcept = 0;
142};
143
144}
145
147namespace Ice
148{
149
150}
152
154namespace Ice
155{
156
157using ValueFactoryManagerPtr = ::std::shared_ptr<ValueFactoryManager>;
158
159}
161
162#else // C++98 mapping
163
164namespace Ice
165{
166
167class ValueFactory;
171typedef ::IceInternal::Handle< ValueFactory> ValueFactoryPtr;
172
177typedef ::IceInternal::Handle< ValueFactoryManager> ValueFactoryManagerPtr;
178
179}
180
181namespace Ice
182{
183
192class ICE_API ValueFactory : public virtual LocalObject
193{
194public:
195
197
198 virtual ~ValueFactory();
199
200#ifdef ICE_CPP11_COMPILER
201 ValueFactory() = default;
202 ValueFactory(const ValueFactory&) = default;
203 ValueFactory& operator=(const ValueFactory&) = default;
204#endif
205
218 virtual ValuePtr create(const ::std::string& type) = 0;
219};
220
222inline bool operator==(const ValueFactory& lhs, const ValueFactory& rhs)
223{
224 return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
225}
226
227inline bool operator<(const ValueFactory& lhs, const ValueFactory& rhs)
228{
229 return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
230}
232
241{
242public:
243
245
247
248#ifdef ICE_CPP11_COMPILER
249 ValueFactoryManager() = default;
252#endif
253
294 virtual void add(const ValueFactoryPtr& factory, const ::std::string& id) = 0;
295
303 virtual ValueFactoryPtr find(const ::std::string& id) const ICE_NOEXCEPT = 0;
304};
305
307inline bool operator==(const ValueFactoryManager& lhs, const ValueFactoryManager& rhs)
308{
309 return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
310}
311
312inline bool operator<(const ValueFactoryManager& lhs, const ValueFactoryManager& rhs)
313{
314 return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
315}
317
318}
319
321namespace Ice
322{
323
324}
326
327#endif
328
330#endif
#define ICE_API
Definition Config.h:197
#define ICE_NOEXCEPT
Definition Config.h:128
#define ICE_MEMBER(API)
Definition Config.h:177
Shared & operator=(const Shared &)
Definition Shared.h:94
Base class for local Slice classes and interfaces.
Definition LocalObject.h:25
A value factory manager maintains a collection of value factories.
Definition ValueFactory.h:241
ValueFactoryManagerPtr PointerType
Definition ValueFactory.h:244
virtual ValueFactoryPtr find(const ::std::string &id) const =0
Find an value factory registered with this communicator.
virtual void add(const ValueFactoryPtr &factory, const ::std::string &id)=0
Add a value factory.
A factory for values.
Definition ValueFactory.h:193
ValueFactoryPtr PointerType
Definition ValueFactory.h:196
virtual ~ValueFactory()
virtual ValuePtr create(const ::std::string &type)=0
Create a new value for a given value type.
Definition BuiltinSequences.h:113
::IceInternal::Handle< ValueFactoryManager > ValueFactoryManagerPtr
Definition ValueFactory.h:177
::IceInternal::Handle< ValueFactory > ValueFactoryPtr
Definition ValueFactory.h:171
ObjectPtr ValuePtr
Definition ObjectF.h:22
IceUtil::Shared * upCast(::Ice::AsyncResult *)