GEGELATI

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
Data::UntypedSharedPtr::Model< T > Struct Template Reference

Internal templated structure of the type erasure pattern. More...

`#include <untypedSharedPtr.h>`

Inheritance diagram for Data::UntypedSharedPtr::Model< T >:

## Public Types
using | ELEM_TYPE = typename std::remove_all_extents<T>::type
| Raw type of the element stored in the shared_ptr.

## Public Member Functions
template<typename Deleter >
| Model (T *t, Deleter func)
template<typename U , typename _ = typename std::enable_if< std::is_array<T>::value, U>::type>
| Model (U *p)
const std::type_info & | getType () const override
| Polymorphic getType() function.
const std::type_info & | getPtrType () const override
| Polymorphic getPtrType() function.
Public Member Functions inherited from Data::UntypedSharedPtr::Concept
virtual | ~Concept ()=default
| Default deleter made virtual to activate polyphormism.

## Public Attributes
std::shared_ptr< ELEM_TYPE > | sharedPtr
| std::shared_ptr of the UntypedSharedPtr

## Detailed Description

template<typename T>
struct Data::UntypedSharedPtr::Model< T >

Internal templated structure of the type erasure pattern.

This part of the type erasure pattern actually contains the std::shared_ptr.

Template Parameters

  T | Template type taken from UntypedSharedPtr constructor.

## Constructor & Destructor Documentation

## ◆ Model() [1/2]

template<typename T >
template<typename Deleter >

Data::UntypedSharedPtr::Model< T >::Model | ( | T * | t,
|  | Deleter | func )
| inline

Constructor of the Model: initializes the internal std::shared_ptr.

## ◆ Model() [2/2]

template<typename T >
template<typename U , typename _ = typename std::enable_if< std::is_array<T>::value, U>::type>

Data::UntypedSharedPtr::Model< T >::Model | ( | U * | p | ) |
| inline

Constructor for model for array (whose type decay into pointers when passed as arguments.) Default deleter automatically used

## Member Function Documentation

## ◆ getPtrType()

template<typename T >

const std::type_info & Data::UntypedSharedPtr::Model< T >::getPtrType | ( |  | ) | const
| inlineoverridevirtual

Polymorphic getPtrType() function.

Implements Data::UntypedSharedPtr::Concept.

## ◆ getType()

template<typename T >

const std::type_info & Data::UntypedSharedPtr::Model< T >::getType | ( |  | ) | const
| inlineoverridevirtual

Polymorphic getType() function.

Implements Data::UntypedSharedPtr::Concept.

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

- D:/a/gegelati/gegelati/gegelatilib/include/data/untypedSharedPtr.h