Classes | Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
cet::exempt_ptr< Element > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/cetlib/v3_10_00/source/cetlib/exempt_ptr.h"

Classes

struct  is_compatible
 

Public Types

using element_type = Element
 
using pointer = std::add_pointer_t< Element >
 
using reference = std::add_lvalue_reference_t< Element >
 

Public Member Functions

constexpr exempt_ptr () noexcept
 
constexpr exempt_ptr (std::nullptr_t) noexcept
 
 exempt_ptr (pointer other) noexcept
 
template<class E2 >
 exempt_ptr (E2 *other, std::enable_if_t< is_compatible_v< E2 >> *=nullptr) noexcept
 
template<class E2 >
 exempt_ptr (exempt_ptr< E2 > const &other, std::enable_if_t< is_compatible_v< E2 >> *=nullptr) noexcept
 
exempt_ptroperator= (std::nullptr_t) noexcept
 
template<class E2 >
std::enable_if_t< is_compatible_v< E2 >, exempt_ptr & > operator= (E2 *other) noexcept
 
template<class E2 >
std::enable_if_t< is_compatible_v< E2 >, exempt_ptr & > operator= (exempt_ptr< E2 > const &other) noexcept
 
reference operator* () const noexcept
 
pointer operator-> () const noexcept
 
pointer get () const noexcept
 
bool empty () const noexcept
 
 operator bool () const noexcept
 
pointer release () noexcept
 
void reset (pointer t=nullptr) noexcept
 
void swap (exempt_ptr &other) noexcept
 

Private Attributes

pointer p
 

Static Private Attributes

template<class P >
static constexpr bool is_compatible_v = is_compatible<P>::value
 

Detailed Description

template<class Element>
class cet::exempt_ptr< Element >

Definition at line 41 of file exempt_ptr.h.

Member Typedef Documentation

template<class Element>
using cet::exempt_ptr< Element >::element_type = Element

Definition at line 86 of file exempt_ptr.h.

template<class Element>
using cet::exempt_ptr< Element >::pointer = std::add_pointer_t<Element>

Definition at line 87 of file exempt_ptr.h.

template<class Element>
using cet::exempt_ptr< Element >::reference = std::add_lvalue_reference_t<Element>

Definition at line 88 of file exempt_ptr.h.

Constructor & Destructor Documentation

template<class Element>
constexpr cet::exempt_ptr< Element >::exempt_ptr ( )
inlinenoexcept

Definition at line 100 of file exempt_ptr.h.

100 : p{nullptr} {}
const char * p
Definition: xmltok.h:285
template<class Element>
constexpr cet::exempt_ptr< Element >::exempt_ptr ( std::nullptr_t  )
inlinenoexcept

Definition at line 103 of file exempt_ptr.h.

103 : p{nullptr} {}
const char * p
Definition: xmltok.h:285
template<class Element>
cet::exempt_ptr< Element >::exempt_ptr ( pointer  other)
inlineexplicitnoexcept

Definition at line 104 of file exempt_ptr.h.

104 : p{other} {}
const char * p
Definition: xmltok.h:285
template<class Element>
template<class E2 >
cet::exempt_ptr< Element >::exempt_ptr ( E2 *  other,
std::enable_if_t< is_compatible_v< E2 >> *  = nullptr 
)
inlinenoexcept

Definition at line 107 of file exempt_ptr.h.

109  : p{other}
110  {}
const char * p
Definition: xmltok.h:285
template<class Element>
template<class E2 >
cet::exempt_ptr< Element >::exempt_ptr ( exempt_ptr< E2 > const &  other,
std::enable_if_t< is_compatible_v< E2 >> *  = nullptr 
)
inlinenoexcept

Definition at line 115 of file exempt_ptr.h.

117  : p{other.get()}
118  {}
const char * p
Definition: xmltok.h:285

Member Function Documentation

template<class Element>
bool cet::exempt_ptr< Element >::empty ( ) const
inlinenoexcept

Definition at line 154 of file exempt_ptr.h.

155  {
156  return get() == nullptr;
157  }
template<class Element>
pointer cet::exempt_ptr< Element >::get ( ) const
inlinenoexcept

Definition at line 149 of file exempt_ptr.h.

Referenced by cet::exempt_ptr< art::HLTGlobalStatus >::exempt_ptr(), art::markAncestors(), and cet::operator==().

150  {
151  return p;
152  }
template<class Element>
cet::exempt_ptr< Element >::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 158 of file exempt_ptr.h.

158 { return !empty(); }
bool empty() const noexcept
Definition: exempt_ptr.h:154
template<class Element>
reference cet::exempt_ptr< Element >::operator* ( ) const
inlinenoexcept

Definition at line 146 of file exempt_ptr.h.

146 { return *get(); }
template<class Element>
pointer cet::exempt_ptr< Element >::operator-> ( ) const
inlinenoexcept

Definition at line 147 of file exempt_ptr.h.

147 { return get(); }
template<class Element>
exempt_ptr& cet::exempt_ptr< Element >::operator= ( std::nullptr_t  )
inlinenoexcept

Definition at line 121 of file exempt_ptr.h.

122  {
123  reset(nullptr);
124  return *this;
125  }
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:169
template<class Element>
template<class E2 >
std::enable_if_t<is_compatible_v<E2>, exempt_ptr&> cet::exempt_ptr< Element >::operator= ( E2 *  other)
inlinenoexcept

Definition at line 129 of file exempt_ptr.h.

130  {
131  reset(other);
132  return *this;
133  }
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:169
template<class Element>
template<class E2 >
std::enable_if_t<is_compatible_v<E2>, exempt_ptr&> cet::exempt_ptr< Element >::operator= ( exempt_ptr< E2 > const &  other)
inlinenoexcept

Definition at line 139 of file exempt_ptr.h.

140  {
141  reset(other.get());
142  return *this;
143  }
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:169
template<class Element>
pointer cet::exempt_ptr< Element >::release ( )
inlinenoexcept

Definition at line 162 of file exempt_ptr.h.

163  {
164  pointer old = get();
165  reset();
166  return old;
167  }
std::add_pointer_t< Element > pointer
Definition: exempt_ptr.h:87
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:169
template<class Element>
void cet::exempt_ptr< Element >::reset ( pointer  t = nullptr)
inlinenoexcept

Definition at line 169 of file exempt_ptr.h.

170  {
171  p = t;
172  }
const char * p
Definition: xmltok.h:285
template<class Element>
void cet::exempt_ptr< Element >::swap ( exempt_ptr< Element > &  other)
inlinenoexcept

Definition at line 174 of file exempt_ptr.h.

175  {
176  std::swap(p, other.p);
177  }
const char * p
Definition: xmltok.h:285
void swap(exempt_ptr< E > &, exempt_ptr< E > &) noexcept
Definition: exempt_ptr.h:192

Member Data Documentation

template<class Element>
template<class P >
constexpr bool cet::exempt_ptr< Element >::is_compatible_v = is_compatible<P>::value
staticprivate

Definition at line 96 of file exempt_ptr.h.

template<class Element>
pointer cet::exempt_ptr< Element >::p
private

Definition at line 180 of file exempt_ptr.h.


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