#include <CountedPtr.h>
Inheritance diagram for casa::CountedPtr< t >:


Part of API
This class completes the lattice. It inherits much of the members which deal with non-constant data from SimpleCountedPtr , and it inherits the const operator->() from CountedConstPtr . What this class adds is the operator->() which returns a modifiable pointer.
Definition at line 477 of file CountedPtr.h.
Public Member Functions | |
| CountedPtr () | |
This constructor allows for the creation of a null CountedPtr. | |
| CountedPtr (t *val, Bool delit=True) | |
This constructor sets up a reference count for the val pointer. | |
| CountedPtr (const CountedPtr< t > &val) | |
This copy constructor allows CountedPtrs to be initialized from other CountedPtrs. | |
| CountedPtr< t > & | operator= (const CountedPtr< t > &val) |
This assignment operator allows CountedPtrs to be freely assigned to each other. | |
| CountedPtr< t > & | operator= (t *v) |
This assignment operator allows the object to which the current CountedPtr points to be changed. | |
| t * | operator-> () const |
| This dereferencing operator behaves as expected; it returns the pointer to the value being protected, and then its dereferencing operator will be invoked as appropriate. | |
| t * | operator-> () |
| casa::CountedPtr< t >::CountedPtr | ( | ) |
This constructor allows for the creation of a null CountedPtr.
The assignment operator can be used to assign a null CountedPtr from another pointer.
| casa::CountedPtr< t >::CountedPtr | ( | t * | val, | |
| Bool | delit = True | |||
| ) |
This constructor sets up a reference count for the val pointer.
By default, the data pointed to by val will be deleted when it is no longer referenced. Passing in False for delit will prevent the data from being deleted when the reference count reaches zero.
Warning: After the counted pointer is initialized the value should no longer be manipulated by the raw pointer of type t*.
| casa::CountedPtr< t >::CountedPtr | ( | const CountedPtr< t > & | val | ) |
This copy constructor allows CountedPtrs to be initialized from other CountedPtrs.
| CountedPtr<t>& casa::CountedPtr< t >::operator= | ( | const CountedPtr< t > & | val | ) | [inline] |
This assignment operator allows CountedPtrs to be freely assigned to each other.
Definition at line 510 of file CountedPtr.h.
| CountedPtr<t>& casa::CountedPtr< t >::operator= | ( | t * | v | ) | [inline] |
This assignment operator allows the object to which the current CountedPtr points to be changed.
Reimplemented from casa::CountedConstPtr< t >.
Definition at line 518 of file CountedPtr.h.
| t* casa::CountedPtr< t >::operator-> | ( | ) | const [inline] |
This dereferencing operator behaves as expected; it returns the pointer to the value being protected, and then its dereferencing operator will be invoked as appropriate.
If the pointer is un-initialized (null), an exception will be thrown. The member function null () can be used to catch such a condition in time.
Reimplemented from casa::CountedConstPtr< t >.
Definition at line 536 of file CountedPtr.h.
| t* casa::CountedPtr< t >::operator-> | ( | ) | [inline] |
Definition at line 540 of file CountedPtr.h.
1.5.1