#include <pointerToArray.h>
Inheritance diagram for ConstPointerToArray< Element >:
Public Types | |
typedef TYPENAME pvector< Element >::value_type | value_type |
typedef TYPENAME pvector< Element >::const_reference | reference |
typedef TYPENAME pvector< Element >::const_reference | const_reference |
typedef TYPENAME pvector< Element >::const_iterator | iterator |
typedef TYPENAME pvector< Element >::const_iterator | const_iterator |
typedef TYPENAME pvector< Element >::const_reverse_iterator | reverse_iterator |
typedef TYPENAME pvector< Element >::const_reverse_iterator | const_reverse_iterator |
typedef TYPENAME pvector< Element >::difference_type | difference_type |
typedef TYPENAME pvector< Element >::size_type | size_type |
typedef RefCountObj< pvector< Element > > | To |
Public Member Functions | |
ConstPointerToArray () | |
ConstPointerToArray (const PointerToArray< Element > ©) | |
ConstPointerToArray (const ConstPointerToArray< Element > ©) | |
iterator | begin () const |
iterator | end () const |
TYPENAME ConstPointerToArray< Element >::reverse_iterator | rbegin () const |
TYPENAME ConstPointerToArray< Element >::reverse_iterator | rend () const |
size_type | size () const |
size_type | max_size () const |
bool | empty () const |
size_type | capacity () const |
reference | operator[] (size_type n) const |
reference | operator[] (int n) const |
reference | front () const |
reference | back () const |
operator const Element * () const | |
The pointer typecast operator is convenient for maintaining the fiction that we actually have a C-style array. | |
const Element * | p () const |
Function p() is similar to the function from ConstPointerTo. | |
const pvector< Element > & | v () const |
To access the vector itself, for more direct fiddling with some of the vector's esoteric functionality. | |
int | get_ref_count () const |
Returns the reference count of the underlying vector. | |
ConstPointerToArray< Element > & | operator= (RefCountObj< pvector< Element > > *ptr) |
ConstPointerToArray< Element > & | operator= (const PointerToArray< Element > ©) |
ConstPointerToArray< Element > & | operator= (const ConstPointerToArray< Element > ©) |
void | clear () |
To empty the PTA, use the clear() method, since assignment to NULL is problematic (given the ambiguity of the pointer type of NULL). | |
bool | operator== (const To *other) const |
bool | operator== (To *other) const |
bool | operator== (const PointerToBase< To > &other) const |
bool | operator!= (const To *other) const |
bool | operator!= (To *other) const |
bool | operator!= (const PointerToBase< To > &other) const |
bool | operator> (const To *other) const |
bool | operator> (To *other) const |
bool | operator> (const PointerToBase< To > &other) const |
bool | operator<= (const To *other) const |
bool | operator<= (To *other) const |
bool | operator<= (const PointerToBase< To > &other) const |
bool | operator>= (const To *other) const |
bool | operator>= (To *other) const |
bool | operator>= (const PointerToBase< To > &other) const |
bool | operator< (const To *other) const |
bool | operator< (const PointerToBase< To > &other) const |
bool | is_null () const |
void | output (ostream &out) const |
Protected Member Functions | |
void | reassign (To *ptr) |
void | reassign (const PointerToBase< To > ©) |
Protected Attributes | |
To * | _ptr |
Static Private Attributes | |
pvector< Element > | _empty_array |
Definition at line 214 of file pointerToArray.h.
|
Definition at line 220 of file pointerToArray.h. |
|
Definition at line 218 of file pointerToArray.h. |
|
Definition at line 227 of file pointerToArray.h. |
|
Definition at line 228 of file pointerToArray.h. |
|
Definition at line 219 of file pointerToArray.h. |
|
Definition at line 217 of file pointerToArray.h. |
|
Definition at line 225 of file pointerToArray.h. |
|
Definition at line 229 of file pointerToArray.h. |
|
Definition at line 99 of file pointerTo.h. |
|
Definition at line 216 of file pointerToArray.h. |
|
Definition at line 574 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr, INLINE, NULL, and TYPENAME. |
|
Definition at line 588 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr, nassertd, and NULL. |
|
Definition at line 602 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr, and NULL. |
|
Definition at line 792 of file pointerToArray.I. |
|
Definition at line 616 of file pointerToArray.I. |
|
Definition at line 722 of file pointerToArray.I. |
|
To empty the PTA, use the clear() method, since assignment to NULL is problematic (given the ambiguity of the pointer type of NULL).
Reimplemented from PointerToBase< RefCountObj< pvector< Element > > >. Definition at line 931 of file pointerToArray.I. |
|
Definition at line 709 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr, and NULL. |
|
Definition at line 632 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr. |
|
Definition at line 773 of file pointerToArray.I. |
|
Returns the reference count of the underlying vector.
Definition at line 871 of file pointerToArray.I. |
|
Returns true if the PointerTo is a NULL pointer, false otherwise. (Direct comparison to a NULL pointer also works.) |
|
Definition at line 693 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr, INLINE, and NULL. |
|
The pointer typecast operator is convenient for maintaining the fiction that we actually have a C-style array. It returns the address of the first element in the array, unless the pointer is unassigned, in which case it returns NULL. Definition at line 820 of file pointerToArray.I. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 912 of file pointerToArray.I. |
|
Definition at line 898 of file pointerToArray.I. |
|
Definition at line 884 of file pointerToArray.I. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 759 of file pointerToArray.I. |
|
Definition at line 739 of file pointerToArray.I. References INLINE, and PointerToBase< RefCountObj< pvector< Element > > >::reassign(). |
|
A handy function to output PointerTo's as a hex pointer followed by a reference count.
|
|
Function p() is similar to the function from ConstPointerTo. It does the same thing: it returns the same thing as the typecast operator, above. Definition at line 838 of file pointerToArray.I. |
|
Definition at line 648 of file pointerToArray.I. |
|
|
|
This is the main work of the PointerTo family. When the pointer is reassigned, decrement the old reference count and increment the new one. Referenced by PointerToArray< Element >::erase(), PointerToArray< Element >::max_size(), ConstPointerToArray< Element >::operator[](), and PointerToArray< Element >::v(). |
|
Definition at line 664 of file pointerToArray.I. |
|
Definition at line 680 of file pointerToArray.I. References PointerToBase< RefCountObj< pvector< Element > > >::_ptr. |
|
To access the vector itself, for more direct fiddling with some of the vector's esoteric functionality.
Definition at line 854 of file pointerToArray.I. |
|
Definition at line 26 of file pointerToArray.I. |
|