Versions Compared

Key

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

template<typename, typename>
class Geo::GeoUniquePtr

    └>D    └>Geo::NonCopyable

A value type to take ownership of a raw object allocated on the heap and bind its life-time to the scope of this class.

Virtually identical to std::auto_ptr, but with policy-based destruction semantics.

Functions

NameDescription
~GeoUniquePtr()

Destructor - Delete the internal object.

Delete()

Explicitly delete the internal object.

Detach()

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

GeoUniquePtr(T *)

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

GeoUniquePtr(GeoUniquePtr &&)

Move constructor.

GetPtr()

Explicitly return the contained type.

NonCopyable(NonCopyable &&)

Defaulted to allow move.

operator bool_type()

Is the object valid?

operator!=(const GeoUniquePtr &)

Equivalence/comparison tests.

operator*()

Allow dereferencing of the contained type.

operator[](Geo::s32)

Allow array referencing of the contained type.

operator<(const GeoUniquePtr &)

Equivalence/comparison tests.

operator=(GeoUniquePtr &&)

Move assignment operator.

operator=(NonCopyable &&)

Defaulted to allow move.

operator==(const GeoUniquePtr &)

Equivalence/comparison tests.

operator>(const GeoUniquePtr &)

Equivalence/comparison tests.

operator->()

Access members of the owned object.

Reset(T *)

Hold new object, destroying current.

Friends

NameDescription
friend void Swap(GeoUniquePtr &a, GeoUniquePtr &b)

Specialized swap.


Anchor
a5e418685e8de4a2818b0a56c7adb5378
a5e418685e8de4a2818b0a56c7adb5378

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

...

public: ~GeoUniquePtr()

...

Destructor - Delete the internal object.


Anchor
ad203d295cbd6df32afd3a5e21fd8385c
ad203d295cbd6df32afd3a5e21fd8385c

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

...

public: void Delete()

...

Explicitly delete the internal object.


Anchor
ab385ae30c754979de628ac6dc68ae165
ab385ae30c754979de628ac6dc68ae165

T* Geo::GeoUniquePtr< 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
a13047533884eafec0da9bff71eb7f0a5
a13047533884eafec0da9bff71eb7f0a5

Geo::GeoUniquePtr< T, D >::GeoUniquePtr

...

public: GeoUniquePtr
(
    T * obj
)

...

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


Anchor
ad75a0b0d97da1a6760f12f5747c00842
ad75a0b0d97da1a6760f12f5747c00842

Geo::GeoUniquePtr< T, D >::GeoUniquePtr

...

public: GeoUniquePtr
(
    GeoUniquePtr && rhs
)

...

Move constructor.


Anchor
a4353f28d78d6c158fcaaa2801c629878
a4353f28d78d6c158fcaaa2801c629878

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

...

public: T * GetPtr() const

...

Explicitly return the contained type.


Anchor
adaed81b4c59f263dcb4e78c4126f4683
adaed81b4c59f263dcb4e78c4126f4683

Geo::NonCopyable::NonCopyable

...

public: NonCopyable
(
    NonCopyable &&
)

...

Defaulted to allow move.


Anchor
a91922c6a4742aebe206bb6d3e2bdec2c
a91922c6a4742aebe206bb6d3e2bdec2c

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

...

public: operator bool_type() const

...

Is the object valid?


Anchor
aa2c17fda96b800d1be224cdbc18cd1d6
aa2c17fda96b800d1be224cdbc18cd1d6

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

...

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

...

Equivalence/comparison tests.


Anchor
a155b512b8b0ed052c7d2c8ff5ed04151
a155b512b8b0ed052c7d2c8ff5ed04151

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

...

public: T & operator*() const

...

Allow dereferencing of the contained type.


Anchor
a60a22d8c424a8d7fa88747a7b4e7ae67
a60a22d8c424a8d7fa88747a7b4e7ae67

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

...

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

...

Allow array referencing of the contained type.


Anchor
a805ea6334cbb22c4089977f5555c4669
a805ea6334cbb22c4089977f5555c4669

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

...

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

...

Equivalence/comparison tests.


Anchor
aa221d7f722c7807f2cc005d9321e756c
aa221d7f722c7807f2cc005d9321e756c

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

...

public: GeoUniquePtr & operator=
(
    GeoUniquePtr && obj
)

...

Move assignment operator.


Anchor
a6abc781e23b8f4864e0b868806e0acbf
a6abc781e23b8f4864e0b868806e0acbf

NonCopyable& Geo::NonCopyable::operator=

...

public: NonCopyable & operator=
(
    NonCopyable &&
)

...

Defaulted to allow move.


Anchor
aceb7ffbc822221eee36ccf875d5f8e3c
aceb7ffbc822221eee36ccf875d5f8e3c

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

...

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

...

Equivalence/comparison tests.


Anchor
a539c04cb36b2cd3e92fc2c17d22fcca5
a539c04cb36b2cd3e92fc2c17d22fcca5

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

...

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

...

Equivalence/comparison tests.


Anchor
a46cab084c1e35495771ef4b25d375de1
a46cab084c1e35495771ef4b25d375de1

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

...

public: T * operator->() const

...

Access members of the owned object.


Anchor
abcb98c9090d660fa984aad13e3603931
abcb98c9090d660fa984aad13e3603931

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

...

public: void Reset
(
    T * obj
)

...

Hold new object, destroying current.