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


Part of API
This class has the same objective as SimpleCountedConstPtr but it adds the operator->(). It still only contains a pointer whose underlying data cannot be changed. The destructor deletes the underlying data when the reference count reaches zero.
operator->() is useful, but not always available for every type.
Definition at line 307 of file CountedPtr.h.
Public Member Functions | |
| CountedConstPtr () | |
This constructor allows for the creation of a null CountedConstPtr. | |
| CountedConstPtr (t *val, Bool delit=True) | |
This constructor sets up a reference count for the val pointer. | |
| CountedConstPtr (const CountedConstPtr< t > &val) | |
This copy constructor allows CountedConstPtrs to be initialized from other CountedConstPtrs. | |
| CountedConstPtr< t > & | operator= (const CountedConstPtr< t > &val) |
This assignment operator allows CountedConstPtrs to be freely assigned to each other. | |
| CountedConstPtr< t > & | operator= (t *v) |
This assignment operator allows the object to which the current CountedConstPtr points to be changed. | |
| const 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. | |
| casa::CountedConstPtr< t >::CountedConstPtr | ( | ) | [inline] |
This constructor allows for the creation of a null CountedConstPtr.
The assignment operator can be used to assign a null CountedConstPtr from another pointer.
Definition at line 315 of file CountedPtr.h.
| casa::CountedConstPtr< t >::CountedConstPtr | ( | 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 328 of file CountedPtr.h.
| casa::CountedConstPtr< t >::CountedConstPtr | ( | const CountedConstPtr< t > & | val | ) | [inline] |
This copy constructor allows CountedConstPtrs to be initialized from other CountedConstPtrs.
Definition at line 333 of file CountedPtr.h.
| CountedConstPtr<t>& casa::CountedConstPtr< t >::operator= | ( | const CountedConstPtr< t > & | val | ) | [inline] |
This assignment operator allows CountedConstPtrs to be freely assigned to each other.
Definition at line 338 of file CountedPtr.h.
| CountedConstPtr<t>& casa::CountedConstPtr< t >::operator= | ( | t * | v | ) | [inline] |
This assignment operator allows the object to which the current CountedConstPtr points to be changed.
Reimplemented from casa::SimpleCountedConstPtr< t >.
Definition at line 346 of file CountedPtr.h.
| const t* casa::CountedConstPtr< 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.
Definition at line 363 of file CountedPtr.h.
1.5.1