ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
DataVectorWithAlloc< DV, ALLOC >::Ptr Class Reference

unique_ptr holding an element for this vector. More...

#include <DataVectorWithAlloc.h>

Collaboration diagram for DataVectorWithAlloc< DV, ALLOC >::Ptr:

Public Types

using pointer = typename base_ptr::pointer
 
using element_type = typename base_ptr::element_type
 

Public Member Functions

 Ptr ()=default
 
 Ptr (std::nullptr_t) noexcept
 
 Ptr (Ptr &&)=default
 
 operator bool () const noexcept
 
Ptroperator= (Ptr &&) noexcept=default
 
Ptroperator= (std::nullptr_t) noexcept
 
void swap (Ptr &other) noexcept
 
pointer get () const noexcept
 
std::add_lvalue_reference< base_value_type >::type operator* () const
 
pointer operator-> () const noexcept
 
bool operator== (const Ptr &other) const noexcept
 
bool operator< (const Ptr &other) const noexcept
 
bool operator== (std::nullptr_t) const noexcept
 
bool operator!= (std::nullptr_t) const noexcept
 

Private Types

using base_ptr = std::unique_ptr< base_value_type, UPDeleter >
 

Private Member Functions

 Ptr (pointer p, UPDeleter &&d) noexcept
 
pointer release () noexcept
 
void checkHeap (const elt_allocator_type *other_heap) const
 

Private Attributes

base_ptr m_ptr
 Underlying unique_ptr. More...
 

Friends

class DataVectorWithAlloc
 

Detailed Description

template<class DV, class ALLOC>
class DataVectorWithAlloc< DV, ALLOC >::Ptr

unique_ptr holding an element for this vector.

Like unique_ptr, except that only the container itself can build one from an arbitrary pointer or release one.

Definition at line 176 of file DataVectorWithAlloc.h.

Member Typedef Documentation

◆ base_ptr

template<class DV , class ALLOC >
using DataVectorWithAlloc< DV, ALLOC >::Ptr::base_ptr = std::unique_ptr<base_value_type, UPDeleter>
private

Definition at line 178 of file DataVectorWithAlloc.h.

◆ element_type

template<class DV , class ALLOC >
using DataVectorWithAlloc< DV, ALLOC >::Ptr::element_type = typename base_ptr::element_type

Definition at line 181 of file DataVectorWithAlloc.h.

◆ pointer

template<class DV , class ALLOC >
using DataVectorWithAlloc< DV, ALLOC >::Ptr::pointer = typename base_ptr::pointer

Definition at line 180 of file DataVectorWithAlloc.h.

Constructor & Destructor Documentation

◆ Ptr() [1/4]

template<class DV , class ALLOC >
DataVectorWithAlloc< DV, ALLOC >::Ptr::Ptr ( )
default

◆ Ptr() [2/4]

template<class DV , class ALLOC >
DataVectorWithAlloc< DV, ALLOC >::Ptr::Ptr ( std::nullptr_t  )
noexcept

◆ Ptr() [3/4]

template<class DV , class ALLOC >
DataVectorWithAlloc< DV, ALLOC >::Ptr::Ptr ( Ptr &&  )
default

◆ Ptr() [4/4]

template<class DV , class ALLOC >
DataVectorWithAlloc< DV, ALLOC >::Ptr::Ptr ( pointer  p,
UPDeleter &&  d 
)
privatenoexcept

Member Function Documentation

◆ checkHeap()

template<class DV , class ALLOC >
void DataVectorWithAlloc< DV, ALLOC >::Ptr::checkHeap ( const elt_allocator_type other_heap) const
private

◆ get()

template<class DV , class ALLOC >
pointer DataVectorWithAlloc< DV, ALLOC >::Ptr::get ( ) const
noexcept

◆ operator bool()

template<class DV , class ALLOC >
DataVectorWithAlloc< DV, ALLOC >::Ptr::operator bool ( ) const
noexcept

◆ operator!=()

template<class DV , class ALLOC >
bool DataVectorWithAlloc< DV, ALLOC >::Ptr::operator!= ( std::nullptr_t  ) const
noexcept

◆ operator*()

template<class DV , class ALLOC >
std::add_lvalue_reference<base_value_type>::type DataVectorWithAlloc< DV, ALLOC >::Ptr::operator* ( ) const

◆ operator->()

template<class DV , class ALLOC >
pointer DataVectorWithAlloc< DV, ALLOC >::Ptr::operator-> ( ) const
noexcept

◆ operator<()

template<class DV , class ALLOC >
bool DataVectorWithAlloc< DV, ALLOC >::Ptr::operator< ( const Ptr other) const
noexcept

◆ operator=() [1/2]

template<class DV , class ALLOC >
Ptr& DataVectorWithAlloc< DV, ALLOC >::Ptr::operator= ( Ptr &&  )
defaultnoexcept

◆ operator=() [2/2]

template<class DV , class ALLOC >
Ptr& DataVectorWithAlloc< DV, ALLOC >::Ptr::operator= ( std::nullptr_t  )
noexcept

◆ operator==() [1/2]

template<class DV , class ALLOC >
bool DataVectorWithAlloc< DV, ALLOC >::Ptr::operator== ( const Ptr other) const
noexcept

◆ operator==() [2/2]

template<class DV , class ALLOC >
bool DataVectorWithAlloc< DV, ALLOC >::Ptr::operator== ( std::nullptr_t  ) const
noexcept

◆ release()

template<class DV , class ALLOC >
pointer DataVectorWithAlloc< DV, ALLOC >::Ptr::release ( )
privatenoexcept

◆ swap()

template<class DV , class ALLOC >
void DataVectorWithAlloc< DV, ALLOC >::Ptr::swap ( Ptr other)
noexcept

Friends And Related Function Documentation

◆ DataVectorWithAlloc

template<class DV , class ALLOC >
friend class DataVectorWithAlloc
friend

Definition at line 202 of file DataVectorWithAlloc.h.

Member Data Documentation

◆ m_ptr

template<class DV , class ALLOC >
base_ptr DataVectorWithAlloc< DV, ALLOC >::Ptr::m_ptr
private

Underlying unique_ptr.

Definition at line 211 of file DataVectorWithAlloc.h.


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