Wrapper class which maintains a strong reference to a cocos2dx cocos2d::Ref* type object. More...
#include <CCRefPtr.h>
Public Member Functions | |
RefPtr () | |
RefPtr () | |
RefPtr () | |
RefPtr (RefPtr< T > &&other) | |
RefPtr ( var other) | |
RefPtr ( local other) | |
RefPtr (T *ptr) | |
RefPtr ( var ptr) | |
RefPtr ( local ptr) | |
RefPtr (std::nullptr_t ptr) | |
RefPtr ( var ptr) | |
RefPtr ( local ptr) | |
RefPtr (const RefPtr< T > &other) | |
RefPtr ( var other) | |
RefPtr ( local other) | |
~RefPtr () | |
RefPtr< T > & | operator= (const RefPtr< T > &other) |
var | operator= ( var other) |
local | operator= ( local other) |
RefPtr< T > & | operator= (RefPtr< T > &&other) |
local | operator= ( local other) |
RefPtr< T > & | operator= (T *other) |
var | operator= ( var other) |
local | operator= ( local other) |
RefPtr< T > & | operator= (std::nullptr_t other) |
local | operator= ( local other) |
operator T * () const | |
operator T * () | |
operator T * () | |
T & | operator* () const |
var | operator* () |
local | operator* () |
T * | operator-> () const |
var | operator-> () |
local | operator-> () |
T * | get () const |
var | get () |
local | get () |
bool | operator== (const RefPtr< T > &other) const |
var | operator== ( var other) |
local | operator== ( local other) |
bool | operator== (const T *other) const |
var | operator== ( var other) |
local | operator== ( local other) |
bool | operator== (typename std::remove_const< T >::type *other) const |
var | operator== ( var other) |
local | operator== ( local other) |
bool | operator== (const std::nullptr_t other) const |
bool | operator!= (const RefPtr< T > &other) const |
bool | operator!= (const T *other) const |
var | operator!= ( var other) |
local | operator!= ( local other) |
bool | operator!= (typename std::remove_const< T >::type *other) const |
var | operator!= ( var other) |
local | operator!= ( local other) |
bool | operator!= (const std::nullptr_t other) const |
var | operator!= ( var other) |
local | operator!= ( local other) |
bool | operator> (const RefPtr< T > &other) const |
bool | operator> (const T *other) const |
var | operator> ( var other) |
local | operator> ( local other) |
bool | operator> (typename std::remove_const< T >::type *other) const |
var | operator> ( var other) |
local | operator> ( local other) |
bool | operator> (const std::nullptr_t other) const |
var | operator> ( var other) |
local | operator> ( local other) |
bool | operator< (const RefPtr< T > &other) const |
bool | operator< (const T *other) const |
var | operator< ( var other) |
local | operator< ( local other) |
bool | operator< (typename std::remove_const< T >::type *other) const |
var | operator< ( var other) |
local | operator< ( local other) |
bool | operator< (const std::nullptr_t other) const |
var | operator< ( var other) |
local | operator< ( local other) |
bool | operator>= (const RefPtr< T > &other) const |
bool | operator>= (const T *other) const |
var | operator>= ( var other) |
local | operator>= ( local other) |
bool | operator>= (typename std::remove_const< T >::type *other) const |
var | operator>= ( var other) |
local | operator>= ( local other) |
bool | operator>= (const std::nullptr_t other) const |
var | operator>= ( var other) |
local | operator>= ( local other) |
bool | operator<= (const RefPtr< T > &other) const |
bool | operator<= (const T *other) const |
var | operator<= ( var other) |
local | operator<= ( local other) |
bool | operator<= (typename std::remove_const< T >::type *other) const |
var | operator<= ( var other) |
local | operator<= ( local other) |
bool | operator<= (const std::nullptr_t other) const |
var | operator<= ( var other) |
local | operator<= ( local other) |
operator bool () const | |
void | reset () |
var | reset () |
local | reset () |
void | swap (RefPtr< T > &other) |
var | swap ( var other) |
local | swap ( local other) |
void | weakAssign (const RefPtr< T > &other) |
This function assigns to this RefPtr<T> but does not increase the reference count of the object pointed to. More... | |
Wrapper class which maintains a strong reference to a cocos2dx cocos2d::Ref* type object.
Similar in concept to a boost smart pointer.
Enables the use of the RAII idiom with Cocos2dx objects and helps automate some of the more mundane tasks of pointer initialization and cleanup.
The class itself is modelled on C++ 11 std::shared_ptr, and trys to keep some of the methods and functionality consistent with std::shared_ptr.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This function assigns to this RefPtr<T> but does not increase the reference count of the object pointed to.
Useful for assigning an object created through the 'new' operator to a RefPtr<T>. Basically used in scenarios where the RefPtr<T> has the initial ownership of the object.
E.G: RefPtr<cocos2d::Image> image; image.weakAssign(new cocos2d::Image());
Instead of: RefPtr<cocos2d::Image> image; image = new cocos2d::Image(); image->release(); // Required because new'd object already has a reference count of '1'.
|
inline |
This function assigns to this RefPtr<T> but does not increase the reference count of the object pointed to.
Useful for assigning an object created through the 'new' operator to a RefPtr<T>. Basically used in scenarios where the RefPtr<T> has the initial ownership of the object.
E.G: RefPtr<cocos2d::Image> image; image.weakAssign(new cocos2d::Image());
Instead of: RefPtr<cocos2d::Image> image; image = new cocos2d::Image(); image->release(); // Required because new'd object already has a reference count of '1'.
|
inline |
This function assigns to this RefPtr<T> but does not increase the reference count of the object pointed to.
Useful for assigning an object created through the 'new' operator to a RefPtr<T>. Basically used in scenarios where the RefPtr<T> has the initial ownership of the object.
E.G: RefPtr<cocos2d::Image> image; image.weakAssign(new cocos2d::Image());
Instead of: RefPtr<cocos2d::Image> image; image = new cocos2d::Image(); image->release(); // Required because new'd object already has a reference count of '1'.