Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1CountedPtr.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 21:33:54 2011 Кодировка: Поисковые слова: supernova remnant |
Regular referenced counted pointer for non-constant data. More...
#include <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 CountedPtr s to be initialized from other CountedPtr s. | |
CountedPtr< t > & | operator= (const CountedPtr< t > &val) |
This assignment operator allows CountedPtr s 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-> () |
Regular referenced counted pointer for non-constant data.
Public interface
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.
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 CountedPtr
s to be initialized from other CountedPtr
s.
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.
CountedPtr<t>& casa::CountedPtr< t >::operator= | ( | const CountedPtr< t > & | val | ) | [inline] |
This assignment operator allows CountedPtr
s to be freely assigned to each other.
Definition at line 510 of file CountedPtr.h.
Referenced by casa::CountedPtr< Block< AutoDiffA< T > > >::operator=().
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.