A strong pointer to an Object. More...
#include <Object.h>
Public Member Functions | |
ptr () | |
Creates a strong pointer pointing to NULL. | |
ptr (T *target) | |
Creates a strong pointer to the given object. | |
ptr (const ptr< T > &p) | |
Creates a strong pointer as a copy of the given pointer. | |
template<class U > | |
ptr (const ptr< U > &p) | |
Creates a strong pointer as a copy of the given pointer. | |
~ptr () | |
Destroys this strong pointer. | |
void | operator= (const ptr< T > &v) |
Assigns the given pointer to this strong pointer. | |
T * | operator-> () const |
Returns the target object of this strong pointer. | |
T & | operator* () const |
Returns the target object of this strong pointer. | |
T * | get () const |
Returns the target object of this strong pointer. | |
bool | operator== (const ptr< T > &v) const |
Returns true if this pointer and the given pointer point to the same object. | |
bool | operator!= (const ptr< T > &v) const |
Returns true if this pointer and the given pointer point to different objects. | |
bool | operator< (const ptr< T > &v) const |
Compares the addresses of the objects pointed by this pointer and by the given pointer. | |
bool | operator== (const T *target) const |
Returns true if this strong pointer points to the given object. | |
bool | operator!= (const T *target) const |
Returns true if this strong pointer does not point to the given object. | |
template<class U > | |
ptr< U > | cast () const |
Casts this strong pointer to a strong pointer of the given type. | |
Protected Attributes | |
T * | target |
The object pointed by this strong pointer. |
A strong pointer to an Object.
Creates a strong pointer to the given object.
Creates a strong pointer as a copy of the given pointer.
Creates a strong pointer as a copy of the given pointer.
Casts this strong pointer to a strong pointer of the given type.
T* ork::ptr< T >::get | ( | ) | const [inline] |
Returns the target object of this strong pointer.
bool ork::ptr< T >::operator!= | ( | const T * | target | ) | const [inline] |
Returns true if this strong pointer does not point to the given object.
Returns true if this pointer and the given pointer point to different objects.
T& ork::ptr< T >::operator* | ( | ) | const [inline] |
Returns the target object of this strong pointer.
T* ork::ptr< T >::operator-> | ( | ) | const [inline] |
Returns the target object of this strong pointer.
Compares the addresses of the objects pointed by this pointer and by the given pointer.
Returns true if the address of the object pointed by this pointer is less than the address of the object pointed by the given pointer.
Assigns the given pointer to this strong pointer.
Reimplemented in ork::static_ptr< Mesh< vec4f, unsigned int > >, ork::static_ptr< Logger >, ork::static_ptr< Mesh< Font::Vertex, unsigned int > >, ork::static_ptr< TransformFeedback >, ork::static_ptr< Factory< string, ptr< GPUBuffer > > >, and ork::static_ptr< FrameBuffer >.
bool ork::ptr< T >::operator== | ( | const T * | target | ) | const [inline] |
Returns true if this strong pointer points to the given object.
Returns true if this pointer and the given pointer point to the same object.