Lumiera  0.pre.03
»edit your freedom«
instancehandle.hpp File Reference

Go to the source code of this file.

Description

A handle template for automatically dealing with interface and plugin registration and deregistration.

By placing an instance of this template, parametrised with the appropriate interface type, the respective interface and instance is loaded and opened through the Lumiera Interface system. It will be closed and unregistered automatically when the handle goes out of scope. Additionally, access via an (existing) interface proxy may be enabled and disabled alongside with the loading and unloading.

See also
stage::GuiFacade usage example
interface.h
interfaceproxy.hpp (more explanations)
session-command-interface-proxy.cpp (Proxy implementation example)

Definition in file instancehandle.hpp.

#include "include/logging.h"
#include "lib/error.hpp"
#include "lib/nocopy.hpp"
#include "lib/depend-inject.hpp"
#include "common/interface.h"
#include "common/interfaceregistry.h"
#include <string>

Classes

class  InstanceHandle< I, FA >
 Handle tracking the registration of an interface, deregistering it on deletion. More...
 
class  InstanceHandle< I, FA >
 Handle tracking the registration of an interface, deregistering it on deletion. More...
 
struct  Link< I, FA >
 
struct  Link< I, I >
 
class  Proxy< IHA >
 to be specialised and implemented for each individual interface and facade interface. More...
 

Typedefs

template<class I , class FA >
using ServiceHandle = typename lib::DependInject< FA >::template ServiceInstance< Proxy< InstanceHandle< I, FA > >>
 The ServiceHandle automatically creates and manages the Proxy instance.
 

Functions

LumieraInterface register_and_open (LumieraInterface descriptor)
 takes a (single) instance definitions, as typically created when defining interfaces for external use, and registers it with the InterfaceSystem. More...
 
void throwIfError ()
 
bool verify_validity (LumieraInterface ifa)
 do a lookup within the interfaceregistry using the name/version found within the interface handle, to ensure it is still valid and registered
 

Namespaces

 lumiera
 Lumiera public interface.