wGui::CResourceHandle Class Reference

#include <wg_resource_handle.h>

Inheritance diagram for wGui::CResourceHandle:

wGui::CBitmapResourceHandle wGui::CCursorResourceHandle wGui::CStringResourceHandle wGui::CBitmapFileResourceHandle wGui::CwgBitmapResourceHandle wGui::CwgCursorResourceHandle wGui::CwgStringResourceHandle

Public Member Functions

Protected Attributes


Detailed Description

CResourceHandles are a basic smart handle for a resource pool It will handle reference counting, allocation, and freeing of the resource Classes derived from CResourceHandle should not have any personal data members, any data should be held in a static map

Definition at line 45 of file wg_resource_handle.h.


Constructor & Destructor Documentation

wGui::CResourceHandle::CResourceHandle ( TResourceId  resId  ) 

CResourceHandles must be instantiated with a valid resource ID

Parameters:
resId The ID of the resource which the handle will represent

Definition at line 39 of file wg_resource_handle.cpp.

References wGui::AUTO_CREATE_RESOURCE_ID, and m_ResourceId.

wGui::CResourceHandle::CResourceHandle ( const CResourceHandle resHandle  ) 

A copying constructor

Parameters:
resHandle An existing resource handle that will be cloned

Definition at line 59 of file wg_resource_handle.cpp.

References m_ResourceId.


Member Function Documentation

TResourceId wGui::CResourceHandle::GetResourceId ( void   )  [inline]

Gets the resource ID of the handle

Returns:
The resource ID of the handle

Definition at line 61 of file wg_resource_handle.h.

References m_ResourceId.

unsigned int wGui::CResourceHandle::GetRefCount ( void   )  [inline]

Gets the handle's internal reference count

Returns:
The reference count of the handle

Definition at line 65 of file wg_resource_handle.h.

References m_ResourceId.

Referenced by wGui::CBitmapResourceHandle::~CBitmapResourceHandle(), wGui::CCursorResourceHandle::~CCursorResourceHandle(), ~CResourceHandle(), and wGui::CStringResourceHandle::~CStringResourceHandle().


The documentation for this class was generated from the following files:
Generated on Wed May 16 23:11:28 2007 for wGui by  doxygen 1.5.1