Project
Loading...
Searching...
No Matches
o2::framework::InputRecord::Deleter< T > Class Template Reference

#include <InputRecord.h>

Inherits std::default_delete< T >.

Public Types

enum struct  OwnershipProperty : short { Unknown = -1 , NotOwning = 0 , Owning = 1 }
 
using base = std::default_delete< T >
 
using self_type = Deleter< T >
 

Public Member Functions

constexpr Deleter ()=default
 
constexpr Deleter (bool isOwning)
 
constexpr Deleter (const self_type &other)
 
constexpr Deleter (const base &other)
 
self_typeoperator= (const self_type &other)
 
void operator() (T *ptr) const
 

Detailed Description

template<typename T>
class o2::framework::InputRecord::Deleter< T >

A deleter type to be used with unique_ptr, which can be marked that it does not own the underlying resource and thus should not delete it. The resource ownership property controls the behavior and can only be set at construction of the deleter in the unique_ptr. Falls back to default_delete if not initialized to 'NotOwning'. Usage: unique_ptr<T, Deleter<T>> ptr(..., Deleter<T>(false))

By contract, the underlying, not owned resource is supposed to be available during the lifetime of the object, which is the case in the InputRecord and DPL processing APIs. The Deleter can be extended to support a callback to call a resource management outside.

Definition at line 130 of file InputRecord.h.

Member Typedef Documentation

◆ base

template<typename T >
using o2::framework::InputRecord::Deleter< T >::base = std::default_delete<T>

Definition at line 139 of file InputRecord.h.

◆ self_type

template<typename T >
using o2::framework::InputRecord::Deleter< T >::self_type = Deleter<T>

Definition at line 140 of file InputRecord.h.

Member Enumeration Documentation

◆ OwnershipProperty

template<typename T >
enum struct o2::framework::InputRecord::Deleter::OwnershipProperty : short
strong
Enumerator
Unknown 
NotOwning 
Owning 

don't delete the underlying buffer

Definition at line 133 of file InputRecord.h.

Constructor & Destructor Documentation

◆ Deleter() [1/4]

template<typename T >
constexpr o2::framework::InputRecord::Deleter< T >::Deleter ( )
constexprdefault

◆ Deleter() [2/4]

template<typename T >
constexpr o2::framework::InputRecord::Deleter< T >::Deleter ( bool  isOwning)
inlineconstexpr

Definition at line 144 of file InputRecord.h.

◆ Deleter() [3/4]

template<typename T >
constexpr o2::framework::InputRecord::Deleter< T >::Deleter ( const self_type other)
inlineconstexpr

Definition at line 151 of file InputRecord.h.

◆ Deleter() [4/4]

template<typename T >
constexpr o2::framework::InputRecord::Deleter< T >::Deleter ( const base other)
inlineconstexpr

Definition at line 162 of file InputRecord.h.

Member Function Documentation

◆ operator()()

template<typename T >
void o2::framework::InputRecord::Deleter< T >::operator() ( T *  ptr) const
inline

Definition at line 178 of file InputRecord.h.

◆ operator=()

template<typename T >
self_type & o2::framework::InputRecord::Deleter< T >::operator= ( const self_type other)
inline

Definition at line 165 of file InputRecord.h.


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