alternative Standard Libary  0.29.8
std::clone_ptr< T > Template-Klassenreferenz

#include <clone_ptr.hpp>

Öffentliche Typen

using value_type = T
 
using pointer = T *
 
using reference = T &
 
using self_type = clone_ptr< value_type >
 
using cloneptrinterface = clone_ptr_interface
 

Öffentliche Methoden

 clone_ptr ()
 
 clone_ptr (T *v)
 
 clone_ptr (save_ptr const &other)
 
clone_ptr const & operator= (clone_ptr const &other)
 
 ~clone_ptr ()
 
value_type const * get () const
 
value_typeget ()
 
value_type const & operator* () const
 
value_typeoperator* ()
 
value_type const * operator-> () const
 
value_typeoperator-> ()
 
value_typerelease ()
 
void reset (value_type *p=NULL)
 
void swap (self_type &other)
 

Geschützte Methoden

cloneptrinterfaceclone ()
 

Ausführliche Beschreibung

template<typename T = std::clone_ptr_interface>
class std::clone_ptr< T >

Dokumentation der benutzerdefinierten Datentypen

◆ cloneptrinterface

template<typename T = std::clone_ptr_interface>
using std::clone_ptr< T >::cloneptrinterface = clone_ptr_interface

◆ pointer

template<typename T = std::clone_ptr_interface>
using std::clone_ptr< T >::pointer = T*

◆ reference

template<typename T = std::clone_ptr_interface>
using std::clone_ptr< T >::reference = T&

◆ self_type

template<typename T = std::clone_ptr_interface>
using std::clone_ptr< T >::self_type = clone_ptr<value_type>

◆ value_type

template<typename T = std::clone_ptr_interface>
using std::clone_ptr< T >::value_type = T

Beschreibung der Konstruktoren und Destruktoren

◆ clone_ptr() [1/3]

template<typename T = std::clone_ptr_interface>
std::clone_ptr< T >::clone_ptr ( )
inline
55 : m_ptr(0) { }

◆ clone_ptr() [2/3]

template<typename T = std::clone_ptr_interface>
std::clone_ptr< T >::clone_ptr ( T *  v)
inlineexplicit
57 : m_ptr(v) { }

◆ clone_ptr() [3/3]

template<typename T = std::clone_ptr_interface>
std::clone_ptr< T >::clone_ptr ( save_ptr const &  other)
inline
59  {
60  if(other.get() != NULL)
61  m_ptr = other->clone();
62  }

◆ ~clone_ptr()

template<typename T = std::clone_ptr_interface>
std::clone_ptr< T >::~clone_ptr ( )
inline
70  {
71  if(m_ptr) delete m_ptr;
72  }

Dokumentation der Elementfunktionen

◆ clone()

template<typename T = std::clone_ptr_interface>
cloneptrinterface* std::clone_ptr< T >::clone ( )
inlineprotected
111  {
112  if(m_ptr != NULL)
113  return m_ptr->clone();
114  }

◆ get() [1/2]

template<typename T = std::clone_ptr_interface>
value_type const* std::clone_ptr< T >::get ( ) const
inline
74  {
75  return m_ptr;
76  }

◆ get() [2/2]

template<typename T = std::clone_ptr_interface>
value_type* std::clone_ptr< T >::get ( )
inline
77  {
78  return m_ptr;
79  }

◆ operator*() [1/2]

template<typename T = std::clone_ptr_interface>
value_type const& std::clone_ptr< T >::operator* ( ) const
inline
81  {
82  return *m_ptr;
83  }

◆ operator*() [2/2]

template<typename T = std::clone_ptr_interface>
value_type& std::clone_ptr< T >::operator* ( )
inline
84  {
85  return *m_ptr;
86  }

◆ operator->() [1/2]

template<typename T = std::clone_ptr_interface>
value_type const* std::clone_ptr< T >::operator-> ( ) const
inline
87  {
88  return m_ptr;
89  }

◆ operator->() [2/2]

template<typename T = std::clone_ptr_interface>
value_type* std::clone_ptr< T >::operator-> ( )
inline
90  {
91  return m_ptr;
92  }

◆ operator=()

template<typename T = std::clone_ptr_interface>
clone_ptr const& std::clone_ptr< T >::operator= ( clone_ptr< T > const &  other)
inline
63  {
64  if(other != this) {
65  clone_ptr tmp(other);
66  swap(tmp);
67  }
68  return *this;
69  }
clone_ptr()
Definition: clone_ptr.hpp:55
void swap(self_type &other)
Definition: clone_ptr.hpp:103

◆ release()

template<typename T = std::clone_ptr_interface>
value_type* std::clone_ptr< T >::release ( )
inline
93  {
94  value_type *tmp = m_ptr;
95  m_ptr = NULL;
96  return tmp;
97  }
T value_type
Definition: clone_ptr.hpp:49

◆ reset()

template<typename T = std::clone_ptr_interface>
void std::clone_ptr< T >::reset ( value_type p = NULL)
inline
99  {
100  if(m_ptr) delete m_ptr;
101  m_ptr = p;
102  }

◆ swap()

template<typename T = std::clone_ptr_interface>
void std::clone_ptr< T >::swap ( self_type other)
inline
104  {
105  value_type *tmp = other.m_ptr;
106  other.m_ptr = m_ptr;
107  m_ptr = tmp;
108  }
T value_type
Definition: clone_ptr.hpp:49

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: