Lumiera
0.pre.03
»edit your freedom«
|
#include "common/instancehandle.hpp"
Handle tracking the registration of an interface, deregistering it on deletion.
Depending on which flavour of the ctor is used, either (bulk) registration of interfaces or plugin loading is triggered. The interface type is defined by type parameter. Additionally, choosing a facade interface as second type parameter causes installation of a proxy, which implements the facade by routing calls through the basic interface represented by this handle. This proxy will be "closed" automatically when this InstanceHandle goes out of scope. Of course, the proxy needs to be implemented somewhere, typically in interfaceproxy.cpp
Definition at line 54 of file instancehandle.hpp.
Public Member Functions | |
InstanceHandle (string const &iName, uint version, size_t minminor, string const &impName) | |
Set up an InstanceHandle representing a plugin. More... | |
InstanceHandle (LumieraInterface descriptor) | |
Set up an InstanceHandle managing the registration and deregistration of interface(s). More... | |
I & | get () const |
directly access the instance via the CL interface | |
operator bool () const | |
bool | operator! () const |
FA * | operator-> () const |
act as smart pointer to allow access through the facade. More... | |
Private Member Functions | |
bool | isValid () const |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
LumieraInterface | desc_ |
facade::Link< I, FA > | facadeLink_ |
I * | instance_ |
|
inline |
Set up an InstanceHandle representing a plugin.
Should be placed at the client side.
iName | unmangled name of the interface |
version | major version |
minminor | minimum acceptable minor version number |
impName | unmangled name of the instance (implementation) |
Definition at line 198 of file instancehandle.hpp.
|
inline |
Set up an InstanceHandle managing the registration and deregistration of interface(s).
Should be placed at the service providing side.
a | (single) interface descriptor, which can be created with LUMIERA_INTERFACE_INSTANCE and referred to by LUMIERA_INTERFACE_REF |
Definition at line 213 of file instancehandle.hpp.
|
inline |
act as smart pointer to allow access through the facade.
operator*
Definition at line 234 of file instancehandle.hpp.