You.i Engine
CYICallbackDeleter< YI_RAW_PTR > Class Template Reference

Detailed Description

template<typename YI_RAW_PTR>
class CYICallbackDeleter< YI_RAW_PTR >

Callback Deleter for the CYISharedPtr and CYISharedArray.

Deprecated:
This class has been deprecated and may be removed in a future release.

This class wraps a static/global callback, and will be called when the raw pointer needs to be deleted.

The callback must take a pointer argument that matches the one used on the CYISharedPtr, and must return void.

Example:

void MyDeleteFunction(MyData *pPtr)
{
delete pPtr;
}

And it can be used like this:

void MyFunction(MyClass &myClass)
{
CYISharedPtr<MyData> pData(new MyData(), &MyDeleteFunction);
}

#include <smartptr/YiCallbackDeleter.h>

Inheritance diagram for CYICallbackDeleter< YI_RAW_PTR >:

Public Types

typedef void(* YI_CALLBACK) (YI_RAW_PTR *)
 

Public Member Functions

 CYICallbackDeleter (YI_RAW_PTR *pPtr, YI_CALLBACK pCallback)
 
virtual ~CYICallbackDeleter ()
 
- Public Member Functions inherited from CYIAbstractDeleter< YI_RAW_PTR >
 CYIAbstractDeleter (YI_RAW_PTR *pPtr)
 
virtual ~CYIAbstractDeleter ()
 
- Public Member Functions inherited from IYIDeleter
virtual ~IYIDeleter ()
 

Additional Inherited Members

- Protected Attributes inherited from CYIAbstractDeleter< YI_RAW_PTR >
YI_RAW_PTR * m_pPtr
 

Member Typedef Documentation

template<typename YI_RAW_PTR>
typedef void(* CYICallbackDeleter< YI_RAW_PTR >::YI_CALLBACK) (YI_RAW_PTR *)

Constructor & Destructor Documentation

template<typename YI_RAW_PTR>
CYICallbackDeleter< YI_RAW_PTR >::CYICallbackDeleter ( YI_RAW_PTR *  pPtr,
YI_CALLBACK  pCallback 
)
template<typename YI_RAW_PTR>
virtual CYICallbackDeleter< YI_RAW_PTR >::~CYICallbackDeleter ( )
virtual

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