Ice 3.7 C++11 API Reference
Plugin.h
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 //
5 // Ice version 3.7.10
6 //
7 // <auto-generated>
8 //
9 // Generated from file `Plugin.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_Plugin_h__
17 #define __Ice_Plugin_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>
29 #include <Ice/LoggerF.h>
30 #include <Ice/BuiltinSequences.h>
31 #include <IceUtil/UndefSysMacros.h>
32 
33 #ifndef ICE_IGNORE_VERSION
34 # if ICE_INT_VERSION / 100 != 307
35 # error Ice version mismatch!
36 # endif
37 # if ICE_INT_VERSION % 100 >= 50
38 # error Beta header file detected
39 # endif
40 # if ICE_INT_VERSION % 100 < 10
41 # error Ice patch level mismatch!
42 # endif
43 #endif
44 
45 #ifndef ICE_API
46 # if defined(ICE_STATIC_LIBS)
47 # define ICE_API
48 # elif defined(ICE_API_EXPORTS)
49 # define ICE_API ICE_DECLSPEC_EXPORT
50 # else
51 # define ICE_API ICE_DECLSPEC_IMPORT
52 # endif
53 #endif
54 
55 #ifdef ICE_CPP11_MAPPING // C++11 mapping
56 
57 namespace Ice
58 {
59 
60 class Plugin;
61 class PluginManager;
62 
63 }
64 
65 namespace Ice
66 {
67 
77 class ICE_CLASS(ICE_API) Plugin
78 {
79 public:
80 
82 
86  virtual void initialize() = 0;
87 
91  virtual void destroy() = 0;
92 };
93 
99 class ICE_CLASS(ICE_API) PluginManager
100 {
101 public:
102 
104 
115  virtual void initializePlugins() = 0;
116 
123 
130  virtual ::std::shared_ptr<::Ice::Plugin> getPlugin(const ::std::string& name) = 0;
131 
138  virtual void addPlugin(const ::std::string& name, const ::std::shared_ptr<Plugin>& pi) = 0;
139 
143  virtual void destroy() noexcept = 0;
144 };
145 
146 }
147 
149 namespace Ice
150 {
151 
152 }
154 
156 namespace Ice
157 {
158 
159 using PluginPtr = ::std::shared_ptr<Plugin>;
160 
161 using PluginManagerPtr = ::std::shared_ptr<PluginManager>;
162 
163 }
165 
166 #else // C++98 mapping
167 
168 namespace Ice
169 {
170 
171 class Plugin;
173 ICE_API LocalObject* upCast(Plugin*);
175 typedef ::IceInternal::Handle< Plugin> PluginPtr;
176 
177 class PluginManager;
179 ICE_API LocalObject* upCast(PluginManager*);
181 typedef ::IceInternal::Handle< PluginManager> PluginManagerPtr;
182 
183 }
184 
185 namespace Ice
186 {
187 
197 class ICE_API Plugin : public virtual LocalObject
198 {
199 public:
200 
201  typedef PluginPtr PointerType;
202 
203  virtual ~Plugin();
204 
205 #ifdef ICE_CPP11_COMPILER
206  Plugin() = default;
207  Plugin(const Plugin&) = default;
208  Plugin& operator=(const Plugin&) = default;
209 #endif
210 
214  virtual void initialize() = 0;
215 
219  virtual void destroy() = 0;
220 };
221 
223 inline bool operator==(const Plugin& lhs, const Plugin& rhs)
224 {
225  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
226 }
227 
228 inline bool operator<(const Plugin& lhs, const Plugin& rhs)
229 {
230  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
231 }
233 
239 class ICE_API PluginManager : public virtual LocalObject
240 {
241 public:
242 
243  typedef PluginManagerPtr PointerType;
244 
245  virtual ~PluginManager();
246 
247 #ifdef ICE_CPP11_COMPILER
248  PluginManager() = default;
249  PluginManager(const PluginManager&) = default;
250  PluginManager& operator=(const PluginManager&) = default;
251 #endif
252 
263  virtual void initializePlugins() = 0;
264 
270  virtual StringSeq getPlugins() ICE_NOEXCEPT = 0;
271 
278  virtual PluginPtr getPlugin(const ::std::string& name) = 0;
279 
286  virtual void addPlugin(const ::std::string& name, const PluginPtr& pi) = 0;
287 
291  virtual void destroy() ICE_NOEXCEPT = 0;
292 };
293 
295 inline bool operator==(const PluginManager& lhs, const PluginManager& rhs)
296 {
297  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
298 }
299 
300 inline bool operator<(const PluginManager& lhs, const PluginManager& rhs)
301 {
302  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
303 }
305 
306 }
307 
309 namespace Ice
310 {
311 
312 }
314 
315 #endif
316 
318 #endif
Ice::Plugin::destroy
virtual void destroy()=0
Called when the communicator is being destroyed.
Optional.h
Ice::PluginManager::getPlugins
virtual ::Ice::StringSeq getPlugins() noexcept=0
Get a list of plugins installed.
Ice::Plugin
A communicator plug-in.
Definition: Plugin.h:78
StreamHelpers.h
Ice::PluginManager::~PluginManager
virtual ~PluginManager()
Ice::operator==
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
Ice::upCast
IceUtil::Shared * upCast(::Ice::LocalObject *)
ICE_NOEXCEPT
#define ICE_NOEXCEPT
Definition: Config.h:128
Ice::Plugin::~Plugin
virtual ~Plugin()
ICE_API
#define ICE_API
Definition: Config.h:197
ICE_MEMBER
#define ICE_MEMBER(API)
Definition: Config.h:177
Ice::initialize
CommunicatorPtr initialize(int &argc, const char *argv[], const InitializationData &initData=InitializationData(), int version=30710)
Initializes a new communicator.
Ice::PluginManager
Each communicator has a plug-in manager to administer the set of plug-ins.
Definition: Plugin.h:100
LocalObject.h
PushDisableWarnings.h
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
IceSSL::PluginPtr
::std::shared_ptr< Plugin > PluginPtr
Definition: Plugin.h:708
UndefSysMacros.h
Ice::PluginManager::initializePlugins
virtual void initializePlugins()=0
Initialize the configured plug-ins.
ObjectF.h
Ice::StringSeq
::std::vector<::std::string > StringSeq
A sequence of strings.
Definition: BuiltinSequences.h:96
Ice
Definition: BuiltinSequences.h:56
Comparable.h
BuiltinSequences.h
ScopedArray.h
Ice::Plugin::initialize
virtual void initialize()=0
Perform any necessary initialization steps.
Exception.h
ValueF.h
LoggerF.h
PopDisableWarnings.h