Pooka SDK API Reference
ObjPtr< ObjT > Class Template Reference

#include <Object.h>

Detailed Description

template<class ObjT>
class Pooka::Core::MiniSTL::Type::ObjPtr< ObjT >

An simple smart-pointer template class with the condition that the data type must be a sub-class of Pooka SDK® Object class.

Template Parameters
ObjTA sub-class of Pooka SDK® Object.

Public Member Functions

 ObjPtr ()
 
 ObjPtr (ObjT *ptr)
 
 ObjPtr (const ObjPtr< ObjT > &another)
 
 ~ObjPtr ()
 
void operator= (const ObjPtr< ObjT > &val)
 
void operator= (ObjT *val)
 
ObjT * operator-> ()
 
const ObjT * operator-> () const
 
 operator ObjT * ()
 
 operator const ObjT * () const
 

Constructor & Destructor Documentation

§ ObjPtr() [1/3]

ObjPtr ( )
inline

Default constructor.

§ ObjPtr() [2/3]

ObjPtr ( ObjT *  ptr)
inline

Constructor.

Parameters
ptrA pointer to instance of sub-class of Pooka SDK® Object.

§ ObjPtr() [3/3]

ObjPtr ( const ObjPtr< ObjT > &  another)
inline

Copy constructor.

Parameters
anotherAnother ObjPtr instance.

§ ~ObjPtr()

~ObjPtr ( )
inline

Destructor.

Member Function Documentation

§ operator=() [1/2]

void operator= ( const ObjPtr< ObjT > &  val)
inline

Assignment operator.

Parameters
valA reference of an ObjPtr instance.

§ operator=() [2/2]

void operator= ( ObjT *  val)
inline

Assignment operator.

Parameters
valA pointer to an ObjPtr instance.

§ operator->() [1/2]

ObjT* operator-> ( )
inline

Member dereference operator.

Returns
The dereferenced object.

§ operator->() [2/2]

const ObjT* operator-> ( ) const
inline

Member dereference operator.

Returns
The dereferenced object.

§ operator ObjT *()

operator ObjT * ( )
inline

Casting operator.

Returns
A pointer to the actual data type

§ operator const ObjT *()

operator const ObjT * ( ) const
inline

Casting operator.

Returns
A pointer to the actual data type