My Project
Public Types | Public Member Functions | Protected Attributes | List of all members
ParaEngine::ref_ptr< T > Struct Template Reference

The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseAsset) derived object. More...

#include <PERefPtr.h>

Public Types

typedef T element_type
 
typedef T value_type
 
typedef T * pointer
 

Public Member Functions

template<class Y >
 ref_ptr (Y *p)
 
 ref_ptr (const ref_ptr &r)
 
ref_ptroperator= (const ref_ptr &r)
 
template<class Y >
ref_ptroperator= (Y *r)
 
T & operator* () const
 
T * operator-> () const
 
T * get () const
 
 operator bool () const
 
bool operator! () const
 
int use_count () const
 
bool unique () const
 
void reset (T *r=0)
 

Protected Attributes

T * px
 

Detailed Description

template<class T>
struct ParaEngine::ref_ptr< T >

The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseAsset) derived object.

Every ref_ptr meets the CopyConstructible and Assignable requirements of the C++ Standard Library, and so can be used in standard library containers. this is similar to boost::shared_ptr, except that it mainly works with AssetEntity. i.e. use in a class like this: ref_ptr<TextureEntity> p;


The documentation for this struct was generated from the following file: