MINT2
Public Member Functions | List of all members
MINT::const_counted_ptr< X > Class Template Reference

#include <counted_ptr.h>

Inheritance diagram for MINT::const_counted_ptr< X >:
MINT::counted_ptr< X > MINT::counted_ptr< X >

Public Member Functions

bool ok () const
 
void acquire (const counted_ptr< X > &c) throw ()
 
template<typename Y >
void acquire (const counted_ptr< Y > &other) throw ()
 
void release ()
 
 const_counted_ptr (X *p=0)
 
 ~const_counted_ptr ()
 
 const_counted_ptr (const const_counted_ptr &other) throw ()
 
 const_counted_ptr (const counted_ptr< X > &other) throw ()
 
const_counted_ptroperator= (const const_counted_ptr &r)
 
const_counted_ptroperator= (const counted_ptr< X > &r)
 
template<typename Y >
 const_counted_ptr (const const_counted_ptr< Y > &r) throw ()
 
template<typename Y >
 const_counted_ptr (const counted_ptr< Y > &r) throw ()
 
template<typename Y >
const_counted_ptroperator= (const const_counted_ptr< Y > &r)
 
template<class Y >
const_counted_ptroperator= (const counted_ptr< Y > &r)
 
const X * get () const throw ()
 
const X & operator * () const throw ()
 
const X * operator-> () const throw ()
 
void acquire (counted_ptr_counter *c) throw ()
 
void release ()
 
 const_counted_ptr (X *p=0)
 
 ~const_counted_ptr ()
 
 const_counted_ptr (const const_counted_ptr &other) throw ()
 
 const_counted_ptr (const counted_ptr< X > &other) throw ()
 
const_counted_ptroperator= (const const_counted_ptr &r)
 
const_counted_ptroperator= (const counted_ptr< X > &r)
 
template<class Y >
 const_counted_ptr (const const_counted_ptr< Y > &r) throw ()
 
template<class Y >
 const_counted_ptr (const counted_ptr< Y > &r) throw ()
 
template<class Y >
const_counted_ptroperator= (const const_counted_ptr< Y > &r)
 
template<class Y >
const_counted_ptroperator= (const counted_ptr< Y > &r)
 
const X & operator * () const throw ()
 
const X * operator-> () const throw ()
 
const X * get () const throw ()
 
- Public Member Functions inherited from MINT::counted_ptr< X >
bool ok () const
 
void acquire (const counted_ptr< X > &other) throw ()
 
template<typename Y >
void acquire (const counted_ptr< Y > &other) throw ()
 
void release ()
 
 counted_ptr (X *p=0)
 
 ~counted_ptr ()
 
 counted_ptr (const counted_ptr &r) throw ()
 
counted_ptroperator= (const counted_ptr &r)
 
template<typename Y >
 counted_ptr (const counted_ptr< Y > &r) throw ()
 
template<typename Y >
counted_ptroperator= (const counted_ptr< Y > &r)
 
X * get () const throw ()
 
X & operator * () const throw ()
 
X * operator-> () const throw ()
 
bool unique () const throw ()
 
 operator const void * () const
 
void acquire (counted_ptr_counter *c) throw ()
 
void release ()
 
 counted_ptr (X *p=0)
 
 ~counted_ptr ()
 
 counted_ptr (const counted_ptr &r) throw ()
 
counted_ptroperator= (const counted_ptr &r)
 
template<class Y >
 counted_ptr (const counted_ptr< Y > &r) throw ()
 
template<class Y >
counted_ptroperator= (const counted_ptr< Y > &r)
 
X & operator * () const throw ()
 
X * operator-> () const throw ()
 
X * get () const throw ()
 
bool unique () const throw ()
 
 operator void * () const
 

Additional Inherited Members

- Public Types inherited from MINT::counted_ptr< X >
typedef X element_type
 
- Public Attributes inherited from MINT::counted_ptr< X >
X * ptr
 
counted_ptr_counteritsCounter
 

Detailed Description

template<typename X>
class MINT::const_counted_ptr< X >

Definition at line 150 of file counted_ptr.h.

Constructor & Destructor Documentation

◆ const_counted_ptr() [1/10]

template<typename X>
MINT::const_counted_ptr< X >::const_counted_ptr ( X *  p = 0)
inlineexplicit

Definition at line 165 of file counted_ptr.h.

166  : counted_ptr<X>(p){};

◆ ~const_counted_ptr() [1/2]

template<typename X>
MINT::const_counted_ptr< X >::~const_counted_ptr ( )
inline

Definition at line 167 of file counted_ptr.h.

168  {release();}

◆ const_counted_ptr() [2/10]

template<typename X>
MINT::const_counted_ptr< X >::const_counted_ptr ( const const_counted_ptr< X > &  other)
throw (
)
inline

Definition at line 169 of file counted_ptr.h.

170  :counted_ptr<X>(other)
171  {}

◆ const_counted_ptr() [3/10]

template<typename X>
MINT::const_counted_ptr< X >::const_counted_ptr ( const counted_ptr< X > &  other)
throw (
)
inline

Definition at line 172 of file counted_ptr.h.

173  :counted_ptr<X>(other)
174  {}

◆ const_counted_ptr() [4/10]

template<typename X>
template<typename Y >
MINT::const_counted_ptr< X >::const_counted_ptr ( const const_counted_ptr< Y > &  r)
throw (
)
inline

Definition at line 192 of file counted_ptr.h.

193  {
194  acquire(r);
195  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ const_counted_ptr() [5/10]

template<typename X>
template<typename Y >
MINT::const_counted_ptr< X >::const_counted_ptr ( const counted_ptr< Y > &  r)
throw (
)
inline

Definition at line 196 of file counted_ptr.h.

197  {
198  acquire(r);
199  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ const_counted_ptr() [6/10]

template<typename X>
MINT::const_counted_ptr< X >::const_counted_ptr ( X *  p = 0)
inlineexplicit

Definition at line 140 of file old_counted_ptr.h.

141  : counted_ptr<X>(p){};

◆ ~const_counted_ptr() [2/2]

template<typename X>
MINT::const_counted_ptr< X >::~const_counted_ptr ( )
inline

Definition at line 142 of file old_counted_ptr.h.

143  {release();}

◆ const_counted_ptr() [7/10]

template<typename X>
MINT::const_counted_ptr< X >::const_counted_ptr ( const const_counted_ptr< X > &  other)
throw (
)
inline

Definition at line 144 of file old_counted_ptr.h.

145  :counted_ptr<X>(other)
146  {}

◆ const_counted_ptr() [8/10]

template<typename X>
MINT::const_counted_ptr< X >::const_counted_ptr ( const counted_ptr< X > &  other)
throw (
)
inline

Definition at line 147 of file old_counted_ptr.h.

148  :counted_ptr<X>(other)
149  {}

◆ const_counted_ptr() [9/10]

template<typename X>
template<class Y >
MINT::const_counted_ptr< X >::const_counted_ptr ( const const_counted_ptr< Y > &  r)
throw (
)
inline

Definition at line 168 of file old_counted_ptr.h.

169  {
170  // with this trick we check (I hope) if the conversion
171  // is legal (jr):
172  static_cast<X*>(r.get());
173  acquire(r.itsCounter);
174  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ const_counted_ptr() [10/10]

template<typename X>
template<class Y >
MINT::const_counted_ptr< X >::const_counted_ptr ( const counted_ptr< Y > &  r)
throw (
)
inline

Definition at line 175 of file old_counted_ptr.h.

176  {
177  // with this trick we check (I hope) if the conversion
178  // is legal (jr):
179  static_cast<X*>(r.get());
180  acquire(r.itsCounter);
181  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

Member Function Documentation

◆ acquire() [1/3]

template<typename X>
void MINT::const_counted_ptr< X >::acquire ( counted_ptr_counter c)
throw (
)
inline

Definition at line 135 of file old_counted_ptr.h.

135  {
void acquire(const counted_ptr< X > &other)
Definition: counted_ptr.h:50

◆ acquire() [2/3]

template<typename X>
void MINT::const_counted_ptr< X >::acquire ( const counted_ptr< X > &  c)
throw (
)
inline

Definition at line 155 of file counted_ptr.h.

155  {
void acquire(const counted_ptr< X > &other)
Definition: counted_ptr.h:50

◆ acquire() [3/3]

template<typename X>
template<typename Y >
void MINT::const_counted_ptr< X >::acquire ( const counted_ptr< Y > &  other)
throw (
)
inline

Definition at line 159 of file counted_ptr.h.

159  {
160  counted_ptr<X>::acquire(other);}
void acquire(const counted_ptr< X > &other)
Definition: counted_ptr.h:50

◆ get() [1/2]

template<typename X>
const X* MINT::const_counted_ptr< X >::get ( ) const
throw (
)
inline

Definition at line 207 of file old_counted_ptr.h.

207 {return ((this->itsCounter) ? static_cast<X*>(this->itsCounter->ptr) : 0);}
counted_ptr_counter * itsCounter
Definition: counted_ptr.h:44

◆ get() [2/2]

template<typename X>
const X* MINT::const_counted_ptr< X >::get ( ) const
throw (
)
inline

Definition at line 217 of file counted_ptr.h.

217 {return (this->ok() ? static_cast<const X*>(this->ptr) : 0);}

◆ ok()

template<typename X>
bool MINT::const_counted_ptr< X >::ok ( ) const
inline

Definition at line 152 of file counted_ptr.h.

152  {
153  return counted_ptr<X>::ok();
154  }
bool ok() const
Definition: counted_ptr.h:46

◆ operator *() [1/2]

template<typename X>
const X& MINT::const_counted_ptr< X >::operator * ( ) const
throw (
)
inline

Definition at line 205 of file old_counted_ptr.h.

205 {return *(static_cast<X*>(this->itsCounter->ptr));}
counted_ptr_counter * itsCounter
Definition: counted_ptr.h:44

◆ operator *() [2/2]

template<typename X>
const X& MINT::const_counted_ptr< X >::operator * ( ) const
throw (
)
inline

Definition at line 219 of file counted_ptr.h.

219 {return *(static_cast<const X*>(get()));}
const X * get() const
Definition: counted_ptr.h:217

◆ operator->() [1/2]

template<typename X>
const X* MINT::const_counted_ptr< X >::operator-> ( ) const
throw (
)
inline

Definition at line 206 of file old_counted_ptr.h.

206 {return static_cast<X*>(this->itsCounter->ptr);}
counted_ptr_counter * itsCounter
Definition: counted_ptr.h:44

◆ operator->() [2/2]

template<typename X>
const X* MINT::const_counted_ptr< X >::operator-> ( ) const
throw (
)
inline

Definition at line 220 of file counted_ptr.h.

220 {return static_cast<const X*>(get());}
const X * get() const
Definition: counted_ptr.h:217

◆ operator=() [1/8]

template<typename X>
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const const_counted_ptr< X > &  r)
inline

Definition at line 150 of file old_counted_ptr.h.

151  {
152  if (this != &r) {
153  release();
154  acquire(r.itsCounter);
155  }
156  return *this;
157  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [2/8]

template<typename X>
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const counted_ptr< X > &  r)
inline

Definition at line 158 of file old_counted_ptr.h.

159  {
160  if (this != &r) {
161  release();
162  acquire(r.itsCounter);
163  }
164  return *this;
165  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [3/8]

template<typename X>
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const const_counted_ptr< X > &  r)
inline

Definition at line 175 of file counted_ptr.h.

176  {
177  if (this != &r) {
178  release();
179  acquire(r);
180  }
181  return *this;
182  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [4/8]

template<typename X>
template<class Y >
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const const_counted_ptr< Y > &  r)
inline

Definition at line 182 of file old_counted_ptr.h.

183  {
184  if (this != &r) {
185  // with this trick we check (I hope) if the conversion
186  // is legal (jr):
187  static_cast<X*>(r.get());
188  release();
189  acquire(r.itsCounter);
190  }
191  return *this;
192  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [5/8]

template<typename X>
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const counted_ptr< X > &  r)
inline

Definition at line 183 of file counted_ptr.h.

184  {
185  if (this != &r) {
186  release();
187  acquire(r);
188  }
189  return *this;
190  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [6/8]

template<typename X>
template<class Y >
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const counted_ptr< Y > &  r)
inline

Definition at line 193 of file old_counted_ptr.h.

194  {
195  if (this != &r) {
196  // with this trick we check (I hope) if the conversion
197  // is legal (jr):
198  static_cast<X*>(r.get());
199  release();
200  acquire(r.itsCounter);
201  }
202  return *this;
203  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [7/8]

template<typename X>
template<typename Y >
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const const_counted_ptr< Y > &  r)
inline

Definition at line 200 of file counted_ptr.h.

201  {
202  if (this != &r) {
203  release();
204  acquire(r);
205  }
206  return *this;
207  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ operator=() [8/8]

template<typename X>
template<class Y >
const_counted_ptr& MINT::const_counted_ptr< X >::operator= ( const counted_ptr< Y > &  r)
inline

Definition at line 208 of file counted_ptr.h.

209  {
210  if (this != &r) {
211  release();
212  acquire(r);
213  }
214  return *this;
215  }
void acquire(const counted_ptr< X > &c)
Definition: counted_ptr.h:155

◆ release() [1/2]

template<typename X>
void MINT::const_counted_ptr< X >::release ( )
inline

Definition at line 137 of file old_counted_ptr.h.

137  {

◆ release() [2/2]

template<typename X>
void MINT::const_counted_ptr< X >::release ( )
inline

Definition at line 162 of file counted_ptr.h.

162  {

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