Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
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.11
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>
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 < 11
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
57namespace Ice
58{
59
60class Plugin;
61class PluginManager;
62
63}
64
65namespace Ice
66{
67
77class ICE_CLASS(ICE_API) Plugin
78{
79public:
80
82
86 virtual void initialize() = 0;
87
91 virtual void destroy() = 0;
92};
93
99class ICE_CLASS(ICE_API) PluginManager
100{
101public:
102
104
115 virtual void initializePlugins() = 0;
116
122 virtual ::Ice::StringSeq getPlugins() noexcept = 0;
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
149namespace Ice
150{
151
152}
154
156namespace Ice
157{
158
159using PluginPtr = ::std::shared_ptr<Plugin>;
160
161using PluginManagerPtr = ::std::shared_ptr<PluginManager>;
162
163}
165
166#else // C++98 mapping
167
168namespace Ice
169{
170
171class Plugin;
173ICE_API LocalObject* upCast(Plugin*);
175typedef ::IceInternal::Handle< Plugin> PluginPtr;
176
177class PluginManager;
179ICE_API LocalObject* upCast(PluginManager*);
181typedef ::IceInternal::Handle< PluginManager> PluginManagerPtr;
182
183}
184
185namespace Ice
186{
187
197class ICE_API Plugin : public virtual LocalObject
198{
199public:
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
223inline bool operator==(const Plugin& lhs, const Plugin& rhs)
224{
225 return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
226}
227
228inline bool operator<(const Plugin& lhs, const Plugin& rhs)
229{
230 return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
231}
233
239class ICE_API PluginManager : public virtual LocalObject
240{
241public:
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
295inline bool operator==(const PluginManager& lhs, const PluginManager& rhs)
296{
297 return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
298}
299
300inline 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
309namespace Ice
310{
311
312}
314
315#endif
316
318#endif
#define ICE_API
Definition Config.h:197
#define ICE_NOEXCEPT
Definition Config.h:128
#define ICE_MEMBER(API)
Definition Config.h:177
Each communicator has a plug-in manager to administer the set of plug-ins.
Definition Plugin.h:100
virtual ~PluginManager()
virtual void initializePlugins()=0
Initialize the configured plug-ins.
virtual void destroy() noexcept=0
Called when the communicator is being destroyed.
virtual ::std::shared_ptr<::Ice::Plugin > getPlugin(const ::std::string &name)=0
Obtain a plug-in by name.
virtual::Ice::StringSeq getPlugins() noexcept=0
Get a list of plugins installed.
virtual void addPlugin(const ::std::string &name, const ::std::shared_ptr< Plugin > &pi)=0
Install a new plug-in.
A communicator plug-in.
Definition Plugin.h:78
virtual ~Plugin()
virtual void destroy()=0
Called when the communicator is being destroyed.
virtual void initialize()=0
Perform any necessary initialization steps.
::std::shared_ptr< Plugin > PluginPtr
Definition OpenSSL.h:141
Definition BuiltinSequences.h:56
CommunicatorPtr initialize(int &argc, const char *argv[], const InitializationData &initData=InitializationData(), int version=30711)
Initializes a new communicator.
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
::std::vector<::std::string > StringSeq
A sequence of strings.
Definition BuiltinSequences.h:96
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184