MarlinMT  0.1.0
marlinmt::Extension Class Reference

#include <Extensions.h>

Public Member Functions

 Extension ()=delete
 
 Extension (const Extension &)=delete
 
Extensionoperator= (const Extension &)=delete
 
 ~Extension ()=default
 
template<typename T >
 Extension (T *obj, bool isOwned)
 
template<typename T >
const T * object () const
 
template<typename T >
T * object ()
 
template<typename T >
std::shared_ptr< const T > shared () const
 
template<typename T >
std::shared_ptr< T > shared ()
 
bool isOwned () const
 
const std::type_index & type () const
 

Private Attributes

bool _isOwned {}
 
std::type_index _typeidx
 
std::shared_ptr< void > _object {}
 

Detailed Description

Definition at line 13 of file Extensions.h.

Constructor & Destructor Documentation

◆ Extension() [1/3]

marlinmt::Extension::Extension ( )
delete

◆ Extension() [2/3]

marlinmt::Extension::Extension ( const Extension )
delete

◆ ~Extension()

marlinmt::Extension::~Extension ( )
default

◆ Extension() [3/3]

template<typename T >
marlinmt::Extension::Extension ( T *  obj,
bool  isOwned 
)
inline

Definition at line 22 of file Extensions.h.

References _isOwned, and _object.

Member Function Documentation

◆ isOwned()

bool marlinmt::Extension::isOwned ( ) const
inline

Definition at line 53 of file Extensions.h.

References _isOwned.

Referenced by marlinmt::Extensions::add(), and marlinmt::Extensions::create().

◆ object() [1/2]

template<typename T >
const T* marlinmt::Extension::object ( ) const
inline

Definition at line 34 of file Extensions.h.

References _object.

◆ object() [2/2]

template<typename T >
T* marlinmt::Extension::object ( )
inline

Definition at line 39 of file Extensions.h.

References _object.

◆ operator=()

Extension& marlinmt::Extension::operator= ( const Extension )
delete

◆ shared() [1/2]

template<typename T >
std::shared_ptr<const T> marlinmt::Extension::shared ( ) const
inline

Definition at line 44 of file Extensions.h.

References _object.

◆ shared() [2/2]

template<typename T >
std::shared_ptr<T> marlinmt::Extension::shared ( )
inline

Definition at line 49 of file Extensions.h.

References _object.

◆ type()

const std::type_index& marlinmt::Extension::type ( ) const
inline

Definition at line 57 of file Extensions.h.

References _typeidx.

Member Data Documentation

◆ _isOwned

bool marlinmt::Extension::_isOwned {}
private

Definition at line 62 of file Extensions.h.

Referenced by Extension(), and isOwned().

◆ _object

std::shared_ptr<void> marlinmt::Extension::_object {}
private

Definition at line 64 of file Extensions.h.

Referenced by Extension(), object(), and shared().

◆ _typeidx

std::type_index marlinmt::Extension::_typeidx
private

Definition at line 63 of file Extensions.h.

Referenced by type().


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