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

#include "/cvmfs/nova.opensciencegrid.org/externals/cetlib/v3_06_01/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< E2 >::value > *=nullptr) noexcept
 
template<class E2 >
 exempt_ptr (exempt_ptr< E2 > const &other, std::enable_if_t< is_compatible< E2 >::value > *=nullptr) noexcept
 
exempt_ptroperator= (std::nullptr_t) noexcept
 
template<class E2 >
std::enable_if_t< is_compatible< E2 >::value, exempt_ptr & > operator= (E2 *other) noexcept
 
template<class E2 >
std::enable_if_t< is_compatible< E2 >::value, 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
 

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 97 of file exempt_ptr.h.

97 : 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 100 of file exempt_ptr.h.

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

Definition at line 101 of file exempt_ptr.h.

101 : 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< E2 >::value > *  = nullptr 
)
inlinenoexcept

Definition at line 104 of file exempt_ptr.h.

106  : p{other}
107  {}
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< E2 >::value > *  = nullptr 
)
inlinenoexcept

Definition at line 112 of file exempt_ptr.h.

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

Member Function Documentation

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

Definition at line 151 of file exempt_ptr.h.

152  {
153  return get() == nullptr;
154  }
template<class Element>
pointer cet::exempt_ptr< Element >::get ( ) const
inlinenoexcept
template<class Element>
cet::exempt_ptr< Element >::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 155 of file exempt_ptr.h.

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

Definition at line 143 of file exempt_ptr.h.

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

Definition at line 144 of file exempt_ptr.h.

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

Definition at line 118 of file exempt_ptr.h.

119  {
120  reset(nullptr);
121  return *this;
122  }
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:166
template<class Element>
template<class E2 >
std::enable_if_t<is_compatible<E2>::value, exempt_ptr&> cet::exempt_ptr< Element >::operator= ( E2 *  other)
inlinenoexcept

Definition at line 126 of file exempt_ptr.h.

127  {
128  reset(other);
129  return *this;
130  }
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:166
template<class Element>
template<class E2 >
std::enable_if_t<is_compatible<E2>::value, exempt_ptr&> cet::exempt_ptr< Element >::operator= ( exempt_ptr< E2 > const &  other)
inlinenoexcept

Definition at line 136 of file exempt_ptr.h.

137  {
138  reset(other.get());
139  return *this;
140  }
void reset(pointer t=nullptr) noexcept
Definition: exempt_ptr.h:166
template<class Element>
pointer cet::exempt_ptr< Element >::release ( )
inlinenoexcept

Definition at line 159 of file exempt_ptr.h.

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

Definition at line 166 of file exempt_ptr.h.

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

Definition at line 171 of file exempt_ptr.h.

172  {
173  std::swap(p, other.p);
174  }
const char * p
Definition: xmltok.h:285
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)

Member Data Documentation

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

Definition at line 177 of file exempt_ptr.h.


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