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


Part of API
This class, like SimpleCountedConstPtr , does not define the operator->(). Thus it can point to simple data which does not have this operator defined. In contrast to SimpleCountedConstPtr, this class points at non-constant underlying data. The deletion properties are the same for both classes.
Definition at line 387 of file CountedPtr.h.
Public Member Functions | |
| SimpleCountedPtr () | |
This constructor allows for the creation of a null SimpleCountedPtr. | |
| SimpleCountedPtr (t *val, Bool delit=True) | |
This constructor sets up a reference count for the val pointer. | |
| SimpleCountedPtr (const SimpleCountedPtr< t > &val) | |
This copy constructor allows SimpleCountedPtrs to be initialized from other SimpleCountedPtrs. | |
| SimpleCountedPtr< t > & | operator= (const SimpleCountedPtr< t > &val) |
This assignment operator allows SimpleCountedPtrs to be freely assigned to each other. | |
| SimpleCountedPtr< t > & | operator= (t *v) |
This assignment operator allows the object to which the current SimpleCountedPtr points to be changed. | |
| const t & | operator * () const |
The SimpleCountedPtr indirection operator simply returns a reference to the value being protected. | |
| t & | operator * () |
| casa::SimpleCountedPtr< t >::SimpleCountedPtr | ( | ) | [inline] |
This constructor allows for the creation of a null SimpleCountedPtr.
The assignment operator can be used to assign a null SimpleCountedPtr from another pointer.
Definition at line 394 of file CountedPtr.h.
| casa::SimpleCountedPtr< t >::SimpleCountedPtr | ( | t * | val, | |
| Bool | delit = True | |||
| ) | [inline] |
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*.
Definition at line 407 of file CountedPtr.h.
| casa::SimpleCountedPtr< t >::SimpleCountedPtr | ( | const SimpleCountedPtr< t > & | val | ) | [inline] |
This copy constructor allows SimpleCountedPtrs to be initialized from other SimpleCountedPtrs.
Definition at line 412 of file CountedPtr.h.
| SimpleCountedPtr<t>& casa::SimpleCountedPtr< t >::operator= | ( | const SimpleCountedPtr< t > & | val | ) | [inline] |
This assignment operator allows SimpleCountedPtrs to be freely assigned to each other.
Definition at line 417 of file CountedPtr.h.
| SimpleCountedPtr<t>& casa::SimpleCountedPtr< t >::operator= | ( | t * | v | ) | [inline] |
This assignment operator allows the object to which the current SimpleCountedPtr points to be changed.
Reimplemented from casa::SimpleCountedConstPtr< t >.
Definition at line 425 of file CountedPtr.h.
| const t& casa::SimpleCountedPtr< t >::operator * | ( | ) | const [inline] |
The SimpleCountedPtr indirection operator simply returns a reference to the value being protected.
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.
Tip: The address of the reference returned should not be stored for later use.
Reimplemented from casa::SimpleCountedConstPtr< t >.
Definition at line 446 of file CountedPtr.h.
| t& casa::SimpleCountedPtr< t >::operator * | ( | ) | [inline] |
Definition at line 450 of file CountedPtr.h.
1.5.1