Alexandria 2.31.2
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::InstOrRefHolder< InterfaceType > Class Template Referenceabstract

#include <InstOrRefHolder.h>

Inheritance diagram for Euclid::InstOrRefHolder< InterfaceType >:

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, typename... Args>
std::unique_ptr< InstOrRefHolder< InterfaceType > > Euclid::InstOrRefHolder< InterfaceType >::create ( Args &&... args)
static

Definition at line 60 of file InstOrRefHolder.icpp.

References std::forward(), and Euclid::make_unique().

Referenced by Euclid::Table::AsciiReader::create(), and Euclid::Table::AsciiWriter::create().

Here is the call graph for this function:

◆ create() [2/2]

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

Definition at line 68 of file InstOrRefHolder.icpp.

References Euclid::make_unique(), and ref().

Here is the call graph for this function:

◆ ref()

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

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