![]() |
Lumiera 0.pre.04~rc.1
»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 183 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. | |
| InstanceHandle (LumieraInterface descriptor) | |
| Set up an InstanceHandle managing the registration and deregistration of interface(s). | |
| ~InstanceHandle () | |
| FA * | operator-> () const |
| act as smart pointer to allow access through the facade. | |
| I & | get () const |
| directly access the instance via the CL interface | |
| operator bool () const | |
| bool | operator! () const |
Private Member Functions | |
| bool | isValid () const |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
| LumieraInterface | desc_ |
| I * | instance_ |
| facade::Link< I, FA > | facadeLink_ |
|
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 |
Definition at line 221 of file instancehandle.hpp.
References InstanceHandle< I, FA >::desc_, InstanceHandle< I, FA >::instance_, lumiera_interface_close(), and lumiera_interfaceregistry_remove_interface().
Here is the call graph for this function:
|
inline |
act as smart pointer to allow access through the facade.
operator* Definition at line 234 of file instancehandle.hpp.
References InstanceHandle< I, FA >::facadeLink_.
|
inline |
directly access the instance via the CL interface
Definition at line 241 of file instancehandle.hpp.
References InstanceHandle< I, FA >::instance_.
Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder().
Here is the caller graph for this function:
|
inlineexplicit |
Definition at line 249 of file instancehandle.hpp.
References InstanceHandle< I, FA >::isValid().
Here is the call graph for this function:
|
inline |
Definition at line 254 of file instancehandle.hpp.
References InstanceHandle< I, FA >::isValid().
Here is the call graph for this function:
|
inlineprivate |
Definition at line 262 of file instancehandle.hpp.
References InstanceHandle< I, FA >::instance_.
Referenced by InstanceHandle< I, FA >::operator bool(), and InstanceHandle< I, FA >::operator!().
Here is the caller graph for this function:
|
private |
Definition at line 186 of file instancehandle.hpp.
Referenced by InstanceHandle< I, FA >::~InstanceHandle().
|
private |
Definition at line 187 of file instancehandle.hpp.
Referenced by InstanceHandle< I, FA >::~InstanceHandle(), InstanceHandle< I, FA >::get(), and InstanceHandle< I, FA >::isValid().
|
private |
Definition at line 188 of file instancehandle.hpp.
Referenced by InstanceHandle< I, FA >::operator->().
Inheritance diagram for InstanceHandle< I, FA >:
Collaboration diagram for InstanceHandle< I, FA >: