#include <GdiObject.h>
For internal use only.
T | Type of handle (e.g. HCURSOR, HBRUSH, etc.). | |
Destroyer | A class with a static method destroy to be used in the destructor of GdiObject (to free the T handle). |
Public Member Functions | |
GdiObject () | |
Creates a new GdiObject with the handle pointing to NULL. | |
GdiObject (T handle) | |
Creates a wrapper for the specified handle. | |
virtual | ~GdiObject () |
Destroys the handle using the Destroyer template-parameter. | |
bool | isValid () const |
Returns true if the handle is valid (not NULL). | |
T | getHandle () const |
Returns the handle. | |
void | setHandle (T handle) |
Sets the handle. | |
Private Attributes | |
T | m_handle |
Vaca::GdiObject< T, Destroyer >::GdiObject | ( | ) | [inline] |
Creates a new GdiObject with the handle pointing to NULL.
Vaca::GdiObject< T, Destroyer >::GdiObject | ( | T | handle | ) | [inline] |
Creates a wrapper for the specified handle.
handle | Handle to be wrapped. It will be delete in the GdiObject destructor. |
virtual Vaca::GdiObject< T, Destroyer >::~GdiObject | ( | ) | [inline, virtual] |
Destroys the handle using the Destroyer template-parameter.
bool Vaca::GdiObject< T, Destroyer >::isValid | ( | ) | const [inline] |
Returns true if the handle is valid (not NULL).
T Vaca::GdiObject< T, Destroyer >::getHandle | ( | ) | const [inline] |
Returns the handle.
void Vaca::GdiObject< T, Destroyer >::setHandle | ( | T | handle | ) | [inline] |
T Vaca::GdiObject< T, Destroyer >::m_handle [private] |