Alexandria  2.27.0
SDC-CH common library for the Euclid project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
Euclid::InstOrRefHolder< InterfaceType > Class Template Referenceabstract

#include <InstOrRefHolder.h>

Inheritance diagram for Euclid::InstOrRefHolder< InterfaceType >:
Inheritance graph
[legend]

Public Member Functions

virtual ~InstOrRefHolder ()=default
 
virtual InterfaceType & ref ()=0
 

Static Public Member Functions

template<typename InstanceType = InterfaceType, typename... Args>
static std::unique_ptr
< InstOrRefHolder
< InterfaceType > > 
create (Args &&...args)
 
static std::unique_ptr
< InstOrRefHolder
< InterfaceType > > 
create (InterfaceType &ref)
 

Detailed Description

template<typename InterfaceType>
class Euclid::InstOrRefHolder< InterfaceType >

Interface for classes that can store either an instance or a reference to an object. Objects that provide this interface are to be created with InstOrRefHolder<InterfaceType>::create

Template Parameters
InterfaceTypeThe type of the stored object

Definition at line 38 of file InstOrRefHolder.h.

Constructor & Destructor Documentation

template<typename InterfaceType>
virtual Euclid::InstOrRefHolder< InterfaceType >::~InstOrRefHolder ( )
virtualdefault

Member Function Documentation

template<typename InterfaceType >
template<typename InstanceType , typename... Args>
std::unique_ptr< InstOrRefHolder< InterfaceType > > Euclid::InstOrRefHolder< InterfaceType >::create ( Args &&...  args)
static

Definition at line 60 of file InstOrRefHolder.icpp.

template<typename InterfaceType>
std::unique_ptr< InstOrRefHolder< InterfaceType > > Euclid::InstOrRefHolder< InterfaceType >::create ( InterfaceType &  ref)
static

Definition at line 68 of file InstOrRefHolder.icpp.

template<typename InterfaceType>
virtual InterfaceType& Euclid::InstOrRefHolder< InterfaceType >::ref ( )
pure virtual

The documentation for this class was generated from the following files: