#include <Resource.h>
Public Member Functions | |
| ResourceManager * | GetManager () const |
| bool | IsAcquired () const |
| bool | IsResigned () const |
| const cl7::string_type & | GetIdentifier () const |
| bool | IsLocked () const |
| bool | Request () |
| bool | Release () |
| bool | Resign () |
| bool | Restore () |
| bool | Update () |
| unsigned | EstimateUsedMemory () const |
| bool | Lock (unsigned first, unsigned count, void **local_copy_data) |
| bool | Unlock () |
| bool | Flush () |
Protected Member Functions | |
| Resource (ResourceManager *manager) | |
| Resource (ResourceManager *manager, const cl7::string_type &identifier) | |
| virtual | ~Resource (void) |
Protected Attributes | |
| LocalCopy | _local_copy |
The base class for any DirectX resources (such as textures, input devices, etc.).
| xl7::directx::Resource::Resource | ( | ResourceManager * | manager | ) | [protected] |
Explicit constructor.
Reimplemented in xl7::direct3d::Resource, xl7::directinput::Resource, xl7::directshow::Resource, and xl7::directsound::Resource.
| xl7::directx::Resource::Resource | ( | ResourceManager * | manager, | |
| const cl7::string_type & | identifier | |||
| ) | [protected] |
Explicit constructor.
Reimplemented in xl7::direct3d::Resource, xl7::directinput::Resource, xl7::directshow::Resource, and xl7::directsound::Resource.
| xl7::directx::Resource::~Resource | ( | void | ) | [protected, virtual] |
Destructor.
Reimplemented in xl7::direct3d::Resource, xl7::directinput::Resource, xl7::directshow::Resource, and xl7::directsound::Resource.
| unsigned xl7::directx::Resource::EstimateUsedMemory | ( | ) | const |
Approximately estimates the memory, in bytes, used by this resource.
| bool xl7::directx::Resource::Flush | ( | ) |
"Flushes" the changes made to the local copy by writing its contents to the hardware memory.
| const cl7::string_type& xl7::directx::Resource::GetIdentifier | ( | ) | const [inline] |
Returns the identifier of this resource (if specified).
| ResourceManager* xl7::directx::Resource::GetManager | ( | ) | const [inline] |
Returns the resource manager responsible for this resource.
| bool xl7::directx::Resource::IsAcquired | ( | ) | const [inline] |
Returns the flag specifying whether this resource has been acquired.
| bool xl7::directx::Resource::IsLocked | ( | ) | const [inline] |
Returns the flag specifying whether the local copy is currently locked.
| bool xl7::directx::Resource::IsResigned | ( | ) | const [inline] |
Returns the flag specifying whether this resource has temporarily been resigned.
| bool xl7::directx::Resource::Lock | ( | unsigned | first, | |
| unsigned | count, | |||
| void ** | local_copy_data | |||
| ) |
Locks the local copy for reading and/or writing. The local copy gets locked beginning with the specified offset (first), in bytes. If the given number of bytes (count) would exceed the capacity of the buffer, it will be cropped.
| bool xl7::directx::Resource::Release | ( | ) |
Releases the resource.
| bool xl7::directx::Resource::Request | ( | ) |
Requests the resource.
| bool xl7::directx::Resource::Resign | ( | ) |
Temporarily resigns some stuff due to loss of the resource.
| bool xl7::directx::Resource::Restore | ( | ) |
Restores the resource after it was lost.
| bool xl7::directx::Resource::Unlock | ( | ) |
Unlocks the local copy.
| bool xl7::directx::Resource::Update | ( | ) |
Updates the resource each frame.
Updates the resource each frame. Override this function to eventually update the resource each frame.
Reimplemented in xl7::direct3d::models::ModelInstance.
LocalCopy xl7::directx::Resource::_local_copy [protected] |
The local copy of the data of this resource.
1.7.1