CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
extstd::clone_ptr< T > Struct Template Reference

#include <clone_ptr.h>

Public Member Functions

 clone_ptr () noexcept
 
template<typename... Args>
 clone_ptr (Args &&... args) noexcept
 
 clone_ptr (clone_ptr const &rh)
 
 clone_ptr (clone_ptr &&rh) noexcept
 
template<typename U >
 clone_ptr (clone_ptr< U > const &rh)
 
template<typename U >
 clone_ptr (clone_ptr< U > &&rh) noexcept
 
Tget () const
 
 operator bool () const
 
Toperator* () const
 
Toperator-> () const
 
clone_ptroperator= (clone_ptr const &rh)
 
clone_ptroperator= (clone_ptr &&rh) noexcept
 
template<typename U >
clone_ptroperator= (clone_ptr< U > const &rh)
 
template<typename U >
clone_ptroperator= (clone_ptr< U > &&rh) noexcept
 
void reset (T *iValue)
 

Private Attributes

std::unique_ptr< Tptr_
 

Detailed Description

template<typename T>
struct extstd::clone_ptr< T >

Definition at line 11 of file clone_ptr.h.

Constructor & Destructor Documentation

◆ clone_ptr() [1/6]

template<typename T>
extstd::clone_ptr< T >::clone_ptr ( )
inlinenoexcept

Definition at line 12 of file clone_ptr.h.

12 : ptr_() {}
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ clone_ptr() [2/6]

template<typename T>
template<typename... Args>
extstd::clone_ptr< T >::clone_ptr ( Args &&...  args)
inlineexplicitnoexcept

Definition at line 14 of file clone_ptr.h.

14 : ptr_(std::forward<Args>(args)...) {}
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ clone_ptr() [3/6]

template<typename T>
extstd::clone_ptr< T >::clone_ptr ( clone_ptr< T > const &  rh)
inline

Definition at line 16 of file clone_ptr.h.

16 : ptr_(rh ? rh->clone() : nullptr) {}
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ clone_ptr() [4/6]

template<typename T>
extstd::clone_ptr< T >::clone_ptr ( clone_ptr< T > &&  rh)
inlinenoexcept

Definition at line 17 of file clone_ptr.h.

17 : ptr_(std::move(rh.ptr_)) {}
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59
def move(src, dest)
Definition: eostools.py:511

◆ clone_ptr() [5/6]

template<typename T>
template<typename U >
extstd::clone_ptr< T >::clone_ptr ( clone_ptr< U > const &  rh)
inline

Definition at line 33 of file clone_ptr.h.

33 : ptr_(rh ? rh->clone() : nullptr) {}
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ clone_ptr() [6/6]

template<typename T>
template<typename U >
extstd::clone_ptr< T >::clone_ptr ( clone_ptr< U > &&  rh)
inlinenoexcept

Definition at line 35 of file clone_ptr.h.

35 : ptr_(std::move(rh.ptr_)) {}
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ get()

template<typename T>
T* extstd::clone_ptr< T >::get ( ) const
inline

◆ operator bool()

template<typename T>
extstd::clone_ptr< T >::operator bool ( ) const
inline

Definition at line 30 of file clone_ptr.h.

30 { return static_cast<bool>(ptr_); }
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ operator*()

template<typename T>
T& extstd::clone_ptr< T >::operator* ( void  ) const
inline

Definition at line 52 of file clone_ptr.h.

52 { return *ptr_; }
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ operator->()

template<typename T>
T* extstd::clone_ptr< T >::operator-> ( ) const
inline

Definition at line 50 of file clone_ptr.h.

50 { return ptr_.get(); }
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

◆ operator=() [1/4]

template<typename T>
clone_ptr& extstd::clone_ptr< T >::operator= ( clone_ptr< T > const &  rh)
inline

Definition at line 19 of file clone_ptr.h.

19  {
20  if (&rh != this)
21  this->reset(rh ? rh->clone() : nullptr);
22  return *this;
23  }
void reset(T *iValue)
Definition: clone_ptr.h:56

◆ operator=() [2/4]

template<typename T>
clone_ptr& extstd::clone_ptr< T >::operator= ( clone_ptr< T > &&  rh)
inlinenoexcept

Definition at line 24 of file clone_ptr.h.

24  {
25  if (&rh != this)
26  ptr_ = std::move(rh.ptr_);
27  return *this;
28  }
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59
def move(src, dest)
Definition: eostools.py:511

◆ operator=() [3/4]

template<typename T>
template<typename U >
clone_ptr& extstd::clone_ptr< T >::operator= ( clone_ptr< U > const &  rh)
inline

Definition at line 38 of file clone_ptr.h.

38  {
39  if (&rh != this)
40  this->reset(rh ? rh->clone() : nullptr);
41  return *this;
42  }
void reset(T *iValue)
Definition: clone_ptr.h:56

◆ operator=() [4/4]

template<typename T>
template<typename U >
clone_ptr& extstd::clone_ptr< T >::operator= ( clone_ptr< U > &&  rh)
inlinenoexcept

Definition at line 44 of file clone_ptr.h.

44  {
45  if (&rh != this)
46  ptr_ = std::move(rh.ptr_);
47  return *this;
48  }
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59
def move(src, dest)
Definition: eostools.py:511

◆ reset()

template<typename T>
void extstd::clone_ptr< T >::reset ( T iValue)
inline

Definition at line 56 of file clone_ptr.h.

Referenced by extstd::clone_ptr< Bounds >::operator=().

56 { ptr_.reset(iValue); }
std::unique_ptr< T > ptr_
Definition: clone_ptr.h:59

Member Data Documentation

◆ ptr_

template<typename T>
std::unique_ptr<T> extstd::clone_ptr< T >::ptr_
private