Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

template<class T>
class Geo::GeoAutoReleasePtr

    └>Geo::GeoAutoPtr< T, Geo::GeoReleaseDestructor< T > >
        └>Geo::GeoReleaseDestructor< T >

Given the lack of a template typedef, and how common it is to want a GeoAutoPtr with Release dtor, adding a new class to provide this destruction policy by default.

Functions

NameDescription
~GeoAutoPtr()

Destructor - Delete the internal object.

Delete()

Explicitly delete the internal object.

Detach()

Release ownership of the internal object and return it to the client.

GeoAutoPtr(GeoAutoPtr< TOther, DOther > &)

Construct by assuming pointer from rhs, given a different contained type Theoretically could write a destruction policy that accepted matches to other policies, but none implemented to date.

GeoAutoPtr(GeoAutoPtr< TOther, DOther > &&)

Move constructor.

GeoAutoPtr(GeoAutoPtr &&)

Move constructor.

GeoAutoPtr(GeoAutoPtr< T, D > &)

Take ownership of the payload of other GeoAutoPtr.

GeoAutoPtr(T *)

Take ownership of the raw-ptr obj. Explicit so that you don't unknowingly change ownership.

GeoAutoReleasePtr(T *)

Take ownership of the raw-ptr obj. Explicit so that you don't unknowingly change ownership.

GeoAutoReleasePtr(GeoAutoReleasePtr< T > &)

Take ownership of the payload of other GeoAutoReleasePtr.

GeoAutoReleasePtr(GeoAutoReleasePtr< Other > &&)

Move constructor.

GeoAutoReleasePtr(GeoAutoReleasePtr< T > &&)

Move constructor.

GeoAutoReleasePtr(GeoAutoReleasePtr< Other > &)

construct by assuming pointer from rhs

GetPtr()

Explicitly return the contained type.

operator bool_type()

Is the object valid?

operator GeoAutoPtr< TOther, DOther >()

Convert to GeoAutoPtr of compatible type.

operator!=(const GeoAutoPtr &)

Equivalence/comparison tests.

operator*()

Allow dereferencing of the contained type.

operator[](Geo::s32)

Allow array referencing of the contained type.

operator<(const GeoAutoPtr &)

Equivalence/comparison tests.

operator=(GeoAutoReleasePtr< Other > &&)

Move assignment operator.

operator=(GeoAutoPtr< T, D > &)

Support assignment (modifying other object)

operator=(GeoAutoPtr< T, D > &&)

Move assignment operator.

operator=(GeoAutoReleasePtr< T > &&)

Move assignment operator.

operator==(const GeoAutoPtr &)

Equivalence/comparison tests.

operator>(const GeoAutoPtr &)

Equivalence/comparison tests.

operator->()

Access members of the owned object.

Reset(T *)

Hold new object, destroying current.


Anchor
af80742fd869cc482f4d73237ed69213d
af80742fd869cc482f4d73237ed69213d

Geo::GeoAutoPtr< T, D >::~GeoAutoPtr

...

public: ~GeoAutoPtr()

...

Destructor - Delete the internal object.


Anchor
a93fa0a190fe517a180d2f9c5ec9c401d
a93fa0a190fe517a180d2f9c5ec9c401d

void Geo::GeoAutoPtr< T, D >::Delete

...

public: void Delete()

...

Explicitly delete the internal object.


Anchor
afd841f65d80f97751826bcb3813d9a3d
afd841f65d80f97751826bcb3813d9a3d

T* Geo::GeoAutoPtr< T, D >::Detach

...

public: T * Detach()

...

Release ownership of the internal object and return it to the client.

From then on its the client's responsibility to delete it.


Anchor
ade90316d3cbe9851c889c08caf0d8313
ade90316d3cbe9851c889c08caf0d8313

Geo::GeoAutoPtr< T, D >::GeoAutoPtr

...

public: GeoAutoPtr
(
    GeoAutoPtr< TOther, DOther > & rhs
)

...

Construct by assuming pointer from rhs, given a different contained type Theoretically could write a destruction policy that accepted matches to other policies, but none implemented to date.


Anchor
ab088476aaa76f0db22d918a7623d1e62
ab088476aaa76f0db22d918a7623d1e62

Geo::GeoAutoPtr< T, D >::GeoAutoPtr

...

public: GeoAutoPtr
(
    GeoAutoPtr< TOther, DOther > && rhs
)

...

Move constructor.


Anchor
ac3699085b663febba2bd714ed11f0196
ac3699085b663febba2bd714ed11f0196

Geo::GeoAutoPtr< T, D >::GeoAutoPtr

...

public: GeoAutoPtr
(
    GeoAutoPtr && rhs
)

...

Move constructor.


Anchor
a2553bcf767c1b18df8e161ad824b3783
a2553bcf767c1b18df8e161ad824b3783

Geo::GeoAutoPtr< T, D >::GeoAutoPtr

...

public: GeoAutoPtr
(
    GeoAutoPtr< T, D > & rhs
)

...

Take ownership of the payload of other GeoAutoPtr.

Inheritance from the destruction policy ensures that you cannot assign between GeoAutoPtr of different policies, whilst allowing assignment to GeoAutoPtr to base types.


Anchor
a15fc4671dfa2005740145f5e963d7f22
a15fc4671dfa2005740145f5e963d7f22

Geo::GeoAutoPtr< T, D >::GeoAutoPtr

...

public: GeoAutoPtr
(
    T * obj
)

...

Take ownership of the raw-ptr obj. Explicit so that you don't unknowingly change ownership.


Anchor
ad5fbd08a5fb35eaf9caf6cc4e61cd1dd
ad5fbd08a5fb35eaf9caf6cc4e61cd1dd

Geo::GeoAutoReleasePtr< T >::GeoAutoReleasePtr

...

public: GeoAutoReleasePtr
(
    T * obj
)

...

Take ownership of the raw-ptr obj. Explicit so that you don't unknowingly change ownership.


Anchor
ae56772a8be1285a6b4f3369bdf089947
ae56772a8be1285a6b4f3369bdf089947

Geo::GeoAutoReleasePtr< T >::GeoAutoReleasePtr

...

public: GeoAutoReleasePtr
(
    GeoAutoReleasePtr< T > & rhs
)

...

Take ownership of the payload of other GeoAutoReleasePtr.


Anchor
aeca36a60bb55979723907f7a7fddc17d
aeca36a60bb55979723907f7a7fddc17d

Geo::GeoAutoReleasePtr< T >::GeoAutoReleasePtr

...

public: GeoAutoReleasePtr
(
    GeoAutoReleasePtr< Other > && rhs
)

...

Move constructor.


Anchor
a8c54dbd4e118878bdc06346c9ce7edf5
a8c54dbd4e118878bdc06346c9ce7edf5

Geo::GeoAutoReleasePtr< T >::GeoAutoReleasePtr

...

public: GeoAutoReleasePtr
(
    GeoAutoReleasePtr< T > && rhs
)

...

Move constructor.


Anchor
ae352234fe399c1872696344cb7c477bf
ae352234fe399c1872696344cb7c477bf

Geo::GeoAutoReleasePtr< T >::GeoAutoReleasePtr

...

public: GeoAutoReleasePtr
(
    GeoAutoReleasePtr< Other > & rhs
)

...

construct by assuming pointer from rhs


Anchor
a5bd08789b31e1297a204743f3a7a8c4b
a5bd08789b31e1297a204743f3a7a8c4b

T* Geo::GeoAutoPtr< T, D >::GetPtr

...

public: T * GetPtr() const

...

Explicitly return the contained type.


Anchor
a3d1d2ed5249756f4b608b1b7a57a94f5
a3d1d2ed5249756f4b608b1b7a57a94f5

Geo::GeoAutoPtr< T, D >::operator bool_type

...

public: operator bool_type() const

...

Is the object valid?


Anchor
ae5035fc6e887c92ec2222d3bcc619794
ae5035fc6e887c92ec2222d3bcc619794

Geo::GeoAutoPtr< T, D >::operator GeoAutoPtr< TOther, DOther >

...

public: operator GeoAutoPtr< TOther, DOther >()

...

Convert to GeoAutoPtr of compatible type.


Anchor
a896b8881aaa74b45776217ad4fef23cd
a896b8881aaa74b45776217ad4fef23cd

bool Geo::GeoAutoPtr< T, D >::operator!=

...

public: bool operator!=
(
    const GeoAutoPtr & rhs
) const

...

Equivalence/comparison tests.


Anchor
a134a9c968efe5cb35610c6d9860be895
a134a9c968efe5cb35610c6d9860be895

T& Geo::GeoAutoPtr< T, D >::operator*

...

public: T & operator*() const

...

Allow dereferencing of the contained type.


Anchor
a299b118a6a579177c3e4600a066e06c7
a299b118a6a579177c3e4600a066e06c7

T& Geo::GeoAutoPtr< T, D >::operator[]

...

public: T & operator[]
(
    Geo::s32 idx
) const

...

Allow array referencing of the contained type.


Anchor
a7a1634481779de5e994395c7f9f5b6ac
a7a1634481779de5e994395c7f9f5b6ac

bool Geo::GeoAutoPtr< T, D >::operator<

...

public: bool operator<
(
    const GeoAutoPtr & rhs
) const

...

Equivalence/comparison tests.


Anchor
af4d8fa98d65acd0b8e88a12489444092
af4d8fa98d65acd0b8e88a12489444092

GeoAutoReleasePtr& Geo::GeoAutoReleasePtr< T >::operator=

...

public: GeoAutoReleasePtr & operator=
(
    GeoAutoReleasePtr< Other > && obj
)

...

Move assignment operator.


Anchor
af2e989db0d9d5e018094475ec344f500
af2e989db0d9d5e018094475ec344f500

GeoAutoPtr<T,D>& Geo::GeoAutoPtr< T, D >::operator=

...

public: GeoAutoPtr< T, D > & operator=
(
    GeoAutoPtr< T, D > & obj
)

...

Support assignment (modifying other object)


Anchor
a67309828dc36328fba0420f0fb52b5d3
a67309828dc36328fba0420f0fb52b5d3

GeoAutoPtr<T,D>& Geo::GeoAutoPtr< T, D >::operator=

...

public: GeoAutoPtr< T, D > & operator=
(
    GeoAutoPtr< T, D > && obj
)

...

Move assignment operator.


Anchor
aa17fdcf0b1544148a868b5ef2c331a93
aa17fdcf0b1544148a868b5ef2c331a93

GeoAutoReleasePtr& Geo::GeoAutoReleasePtr< T >::operator=

...

public: GeoAutoReleasePtr & operator=
(
    GeoAutoReleasePtr< T > && obj
)

...

Move assignment operator.


Anchor
a1336e9de0e4eb35087a783e44c670ca2
a1336e9de0e4eb35087a783e44c670ca2

bool Geo::GeoAutoPtr< T, D >::operator==

...

public: bool operator==
(
    const GeoAutoPtr & rhs
) const

...

Equivalence/comparison tests.


Anchor
a62585b6b5ad0e0e82232183579ea6c7d
a62585b6b5ad0e0e82232183579ea6c7d

bool Geo::GeoAutoPtr< T, D >::operator>

...

public: bool operator>
(
    const GeoAutoPtr & rhs
) const

...

Equivalence/comparison tests.


Anchor
a4b9abed006d3c0e4c673d30b061f97c3
a4b9abed006d3c0e4c673d30b061f97c3

T* Geo::GeoAutoPtr< T, D >::operator->

...

public: T * operator->() const

...

Access members of the owned object.


Anchor
af2911bb4a5fc171f375e4a3855c090a4
af2911bb4a5fc171f375e4a3855c090a4

void Geo::GeoAutoPtr< T, D >::Reset

...

public: void Reset
(
    T * obj
)

...

Hold new object, destroying current.