Ice 3.7 C++11 API Reference
|
Go to the documentation of this file.
16 #ifndef __Ice_Plugin_h__
17 #define __Ice_Plugin_h__
33 #ifndef ICE_IGNORE_VERSION
34 # if ICE_INT_VERSION / 100 != 307
35 # error Ice version mismatch!
37 # if ICE_INT_VERSION % 100 >= 50
38 # error Beta header file detected
40 # if ICE_INT_VERSION % 100 < 10
41 # error Ice patch level mismatch!
46 # if defined(ICE_STATIC_LIBS)
48 # elif defined(ICE_API_EXPORTS)
49 # define ICE_API ICE_DECLSPEC_EXPORT
51 # define ICE_API ICE_DECLSPEC_IMPORT
55 #ifdef ICE_CPP11_MAPPING // C++11 mapping
130 virtual ::std::shared_ptr<::
Ice::
Plugin> getPlugin(const ::std::
string& name) = 0;
138 virtual
void addPlugin(const ::std::
string& name, const ::std::shared_ptr<
Plugin>& pi) = 0;
143 virtual
void destroy() noexcept = 0;
159 using PluginPtr = ::std::shared_ptr<Plugin>;
161 using PluginManagerPtr = ::std::shared_ptr<PluginManager>;
166 #else // C++98 mapping
175 typedef ::IceInternal::Handle< Plugin>
PluginPtr;
181 typedef ::IceInternal::Handle< PluginManager> PluginManagerPtr;
197 class ICE_API Plugin :
public virtual LocalObject
205 #ifdef ICE_CPP11_COMPILER
207 Plugin(
const Plugin&) =
default;
208 Plugin& operator=(
const Plugin&) =
default;
219 virtual void destroy() = 0;
223 inline bool operator==(
const Plugin& lhs,
const Plugin& rhs)
225 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
228 inline bool operator<(
const Plugin& lhs,
const Plugin& rhs)
230 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
239 class ICE_API PluginManager :
public virtual LocalObject
243 typedef PluginManagerPtr PointerType;
245 virtual ~PluginManager();
247 #ifdef ICE_CPP11_COMPILER
248 PluginManager() =
default;
249 PluginManager(
const PluginManager&) =
default;
250 PluginManager& operator=(
const PluginManager&) =
default;
263 virtual void initializePlugins() = 0;
278 virtual
PluginPtr getPlugin(const ::std::
string& name) = 0;
286 virtual
void addPlugin(const ::std::
string& name, const
PluginPtr& pi) = 0;
295 inline
bool operator==(const PluginManager& lhs, const PluginManager& rhs)
297 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
300 inline bool operator<(
const PluginManager& lhs,
const PluginManager& rhs)
302 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
virtual void destroy()=0
Called when the communicator is being destroyed.
virtual ::Ice::StringSeq getPlugins() noexcept=0
Get a list of plugins installed.
A communicator plug-in.
Definition: Plugin.h:78
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
IceUtil::Shared * upCast(::Ice::LocalObject *)
#define ICE_NOEXCEPT
Definition: Config.h:128
#define ICE_API
Definition: Config.h:197
#define ICE_MEMBER(API)
Definition: Config.h:177
CommunicatorPtr initialize(int &argc, const char *argv[], const InitializationData &initData=InitializationData(), int version=30710)
Initializes a new communicator.
Each communicator has a plug-in manager to administer the set of plug-ins.
Definition: Plugin.h:100
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
::std::shared_ptr< Plugin > PluginPtr
Definition: Plugin.h:708
virtual void initializePlugins()=0
Initialize the configured plug-ins.
::std::vector<::std::string > StringSeq
A sequence of strings.
Definition: BuiltinSequences.h:96
Definition: BuiltinSequences.h:56
virtual void initialize()=0
Perform any necessary initialization steps.