Panda3D
|
Similar to PointerToArray, except that its contents may not be modified. More...
#include "pointerToArray.h"
Public Types | |
typedef pvector< Element >::const_iterator | const_iterator |
typedef pvector< Element >::const_reference | const_reference |
typedef pvector< Element >::const_reverse_iterator | const_reverse_iterator |
typedef pvector< Element >::difference_type | difference_type |
typedef pvector< Element >::const_iterator | iterator |
typedef pvector< Element >::const_reference | reference |
typedef pvector< Element >::const_reverse_iterator | reverse_iterator |
typedef pvector< Element >::size_type | size_type |
typedef PointerToArrayBase< Element >::To | To |
typedef pvector< Element >::value_type | value_type |
![]() | |
typedef PointerToBase< ReferenceCountedVector< Element > >::To | To |
![]() | |
typedef ReferenceCountedVector< Element > | To |
Public Member Functions | |
ConstPointerToArray (TypeHandle type_handle=get_type_handle(Element)) | |
ConstPointerToArray (const PointerToArray< Element > ©) | |
ConstPointerToArray (const ConstPointerToArray< Element > ©) | |
reference | back () const |
iterator | begin () const |
size_type | capacity () const |
PointerToArray< Element > | cast_non_const () const |
Casts away the constness of the CPTA(Element), and returns an equivalent PTA(Element). More... | |
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). More... | |
bool | empty () const |
iterator | end () const |
reference | front () const |
string | get_data () const |
This method exists mainly to access the data of the array easily from a high-level language such as Python. More... | |
const Element & | get_element (size_type n) const |
This method exists mainly to access the elements of the array easily from a high-level language such as Python, especially on Windows, where the above index element accessor methods can't be defined because of a confusion with the pointer typecast operator. More... | |
int | get_node_ref_count () const |
Returns the node_ref of the underlying vector. More... | |
int | get_ref_count () const |
Returns the reference count of the underlying vector. More... | |
string | get_subdata (size_type n, size_type count) const |
This method exists mainly to access the data of the array easily from a high-level language such as Python. More... | |
size_type | max_size () const |
void | node_ref () const |
Increments the node_ref of the underlying vector. More... | |
bool | node_unref () const |
Decrements the node_ref of the underlying vector. More... | |
operator const Element * () const | |
The pointer typecast operator is convenient for maintaining the fiction that we actually have a C-style array. More... | |
ConstPointerToArray< Element > & | operator= (ReferenceCountedVector< Element > *ptr) |
ConstPointerToArray< Element > & | operator= (const PointerToArray< Element > ©) |
ConstPointerToArray< Element > & | operator= (const ConstPointerToArray< Element > ©) |
reference | operator[] (size_type n) const |
reference | operator[] (int n) const |
const Element * | p () const |
Function p() is similar to the function from ConstPointerTo. More... | |
ConstPointerToArray< Element >::reverse_iterator | rbegin () const |
void | ref () const |
Increments the reference count of the underlying vector. More... | |
ConstPointerToArray< Element >::reverse_iterator | rend () const |
size_type | size () const |
bool | unref () const |
Decrements the reference count of the underlying vector. More... | |
const pvector< Element > & | v () const |
To access the vector itself, for more direct fiddling with some of the vector's esoteric functionality. More... | |
const ReferenceCountedVector< Element > * | v0 () const |
To access the internal ReferenceCountedVector object, for very low-level fiddling. More... | |
![]() | |
void | clear () |
A convenient way to set the PointerTo object to NULL. More... | |
void | output (ostream &out) const |
A handy function to output PointerTo's as a hex pointer followed by a reference count. More... | |
![]() | |
size_t | get_hash () const |
bool | is_null () const |
Returns true if the PointerTo is a NULL pointer, false otherwise. More... | |
bool | operator!= (const PointerToVoid &other) const |
bool | operator< (const void *other) const |
bool | operator< (const PointerToVoid &other) const |
bool | operator== (const PointerToVoid &other) const |
void | swap (PointerToVoid &other) NOEXCEPT |
Swaps the contents of this PointerTo with the other, without touching the reference counts. More... | |
Friends | |
class | PointerToArray< Element > |
Similar to PointerToArray, except that its contents may not be modified.
Definition at line 78 of file pointerToArray.h.
|
inline |
Casts away the constness of the CPTA(Element), and returns an equivalent PTA(Element).
Definition at line 1035 of file pointerToArray.I.
Referenced by Texture::ensure_loader_type(), Texture::get_ram_image_as(), and ConstPointerToArray< unsigned char >::v0().
|
inline |
To empty the PTA, use the clear() method, since assignment to NULL is problematic (given the ambiguity of the pointer type of NULL).
Definition at line 1243 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::node_unref().
|
inline |
This method exists mainly to access the data of the array easily from a high-level language such as Python.
It returns the entire contents of the vector as a block of raw data in a string.
Definition at line 1068 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::get_element().
|
inline |
This method exists mainly to access the elements of the array easily from a high-level language such as Python, especially on Windows, where the above index element accessor methods can't be defined because of a confusion with the pointer typecast operator.
Definition at line 1052 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::cast_non_const().
|
inline |
Returns the node_ref of the underlying vector.
Definition at line 1136 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::unref().
|
inline |
Returns the reference count of the underlying vector.
Definition at line 1099 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::get_subdata().
|
inline |
This method exists mainly to access the data of the array easily from a high-level language such as Python.
It returns the contents of a portion of the vector–from element (n) through element (n + count - 1)–as a block of raw data in a string.
Definition at line 1085 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::get_data().
|
inline |
Increments the node_ref of the underlying vector.
Definition at line 1147 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::get_node_ref_count().
|
inline |
Decrements the node_ref of the underlying vector.
Definition at line 1161 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::node_ref().
|
inline |
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 981 of file pointerToArray.I.
|
inline |
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 995 of file pointerToArray.I.
Referenced by DXTextureContext9::create_texture(), WebBrowserTexture::cull_callback(), DXTextureContext9::d3d_surface_to_texture(), TexturePeeker::filter_rect(), TexturePeeker::lookup(), and ConstPointerToArray< unsigned char >::operator const unsigned char *().
|
inline |
Increments the reference count of the underlying vector.
Definition at line 1110 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::get_ref_count(), and RocketRenderInterface::render().
|
inline |
Decrements the reference count of the underlying vector.
Definition at line 1124 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::ref().
|
inline |
To access the vector itself, for more direct fiddling with some of the vector's esoteric functionality.
Definition at line 1008 of file pointerToArray.I.
Referenced by Datagram::copy_array(), and ConstPointerToArray< unsigned char >::p().
|
inline |
To access the internal ReferenceCountedVector object, for very low-level fiddling.
Know what you are doing!
Definition at line 1023 of file pointerToArray.I.
Referenced by ConstPointerToArray< unsigned char >::v().