Smart pointer class for XPLC interfaces.
More...
#include <ptr.h>
List of all members.
Detailed Description
template<class T>
class xplc_ptr< T >
Smart pointer class for XPLC interfaces.
Definition at line 56 of file ptr.h.
Constructor & Destructor Documentation
Construct an xplc_ptr from a raw pointer.
This is the only way that an xplc_ptr will take ownership of an interface from its previous owner.
Definition at line 80 of file ptr.h.
template<class T>
template<class P >
Member Function Documentation
template<class T>
ProtectedPtr* xplc_ptr< T >::operator-> |
( |
| ) |
const [inline] |
Provide an operator->.
This allows you to invoke methods on the interface pointed at by the xplc_ptr. As with a raw pointer, if the xplc_ptr is NULL, this will cause a crash. The interface is wrapped in some basic protection, to avoid accidental addRef or release.
Definition at line 104 of file ptr.h.
template<class T>
xplc_ptr< T >::operator ProtectedPtr * |
( |
| ) |
const [inline] |
Provide an operator*.
This is so you can use "*foo" with an xplc_ptr like you could with the raw pointer. It also applies some basic protection.
Definition at line 112 of file ptr.h.
Assign a raw pointer to an xplc_ptr.
This will addRef the interface, and release the interface previously pointed at by the xplc_ptr, if any.
Definition at line 120 of file ptr.h.
The documentation for this class was generated from the following file: