Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Euclid::InstOrRefHolder< InterfaceType > Class Template Referenceabstract

#include <InstOrRefHolder.h>

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

◆ ~InstOrRefHolder()

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

Member Function Documentation

◆ create() [1/2]

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

◆ create() [2/2]

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

◆ ref()

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

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