└>D
A value type to take ownership of a raw object allocated on the heap and track a reference count between multiple instances of this class.
The raw object is destroyed when the last reference is released. Virtually identical to std::shared_ptr, but with policy-based destruction semantics.
Name | Description |
---|---|
~GeoRefPtr() | Destructor - Delete the internal object. |
Count() | How many pointers share this resource? |
DecrementRef() | Handle reduction of the reference count. |
GeoRefPtr(T *) | Take ownership of the raw ptr. Explicit so that you don't unknowingly change ownership. |
GeoRefPtr(GeoRefPtr &&) | Move constructor. |
GeoRefPtr(const GeoRefPtr< T, D > &) | Increase ownership of the payload of other GeoRefPtr. |
GeoRefPtr(const GeoRefPtr< TOther, DOther > &) | Increase ownership of the payload of other GeoRefPtr, given a different contained type Theoretically could write a destruction policy that accepted matches to other policies, but none implemented to date. |
GetPtr() | Explicitely return the contained type. |
IncrementRef() | Handle increase of the reference count. |
operator bool_type() | Is the object valid? |
operator GeoRefPtr< TOther, DOther >() | Convert to GeoRefPtr of compatible type. |
operator!=(const GeoRefPtr &) | Equivalence/comparison tests. |
operator*() | Allow dereferencing of the contained type. |
operator[](Geo::s32) | Allow array referencing of the contained type. |
operator<(const GeoRefPtr &) | Equivalence/comparison tests. |
operator=(const GeoRefPtr< T, D > &) | Support assignment (modifying other object) |
operator=(GeoRefPtr &&) | Move assignment operator. |
operator==(const GeoRefPtr &) | Equivalence/comparison tests. |
operator>(const GeoRefPtr &) | Equivalence/comparison tests. |
operator->() | Access members of the owned object. |
Reset(T *) | Hold new object, reducing count of current (possibly deleting) |
Unique() | Is the object unique? |
public: ~GeoRefPtr()
Destructor - Delete the internal object.
public: Geo::s32 Count() const
How many pointers share this resource?
public: void DecrementRef()
Handle reduction of the reference count.
public: GeoRefPtr
(
T * ptr
)
Take ownership of the raw ptr. Explicit so that you don't unknowingly change ownership.
public: GeoRefPtr
(
GeoRefPtr && rhs
)
Move constructor.
public: GeoRefPtr
(
const GeoRefPtr< T, D > & rhs
)
Increase ownership of the payload of other GeoRefPtr.
Inheritance from the destruction policy ensures that you cannot assign between GeoRefPtr of different policies, whilst allowing assignment to GeoRefPtr to base types.
public: GeoRefPtr
(
const GeoRefPtr< TOther, DOther > & rhs
)
Increase ownership of the payload of other GeoRefPtr, given a different contained type Theoretically could write a destruction policy that accepted matches to other policies, but none implemented to date.
public: T * GetPtr() const
Explicitely return the contained type.
public: RefCount * IncrementRef() const
Handle increase of the reference count.
public: operator bool_type() const
Is the object valid?
public: operator GeoRefPtr< TOther, DOther >()
Convert to GeoRefPtr of compatible type.
public: bool operator!=
(
const GeoRefPtr & rhs
) const
Equivalence/comparison tests.
public: T & operator*() const
Allow dereferencing of the contained type.
public: T & operator[]
(
Geo::s32 idx
) const
Allow array referencing of the contained type.
public: bool operator<
(
const GeoRefPtr & rhs
) const
Equivalence/comparison tests.
public: GeoRefPtr< T, D > & operator=
(
const GeoRefPtr< T, D > & rhs
)
Support assignment (modifying other object)
public: GeoRefPtr & operator=
(
GeoRefPtr && obj
)
Move assignment operator.
public: bool operator==
(
const GeoRefPtr & rhs
) const
Equivalence/comparison tests.
public: bool operator>
(
const GeoRefPtr & rhs
) const
Equivalence/comparison tests.
public: T * operator->() const
Access members of the owned object.
public: void Reset
(
T * ptr
)
Hold new object, reducing count of current (possibly deleting)
public: bool Unique() const
Is the object unique?