Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
instancehandle.hpp File Reference

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

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>

Namespaces

namespace  lumiera
 Lumiera public interface.
 
namespace  lumiera::anonymous_namespace{instancehandle.hpp}
 
namespace  lumiera::facade
 

Typedefs

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

Classes

struct  Link< I, FA >
 
struct  Link< I, I >
 
class  InstanceHandle< I, FA >
 Handle tracking the registration of an interface, deregistering it on deletion. More...
 

Functions

void throwIfError ()
 
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.
 
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