Om
1.0.0
A universal framework for multimedia simulation
|
The base class for a set of resources of a templated type. More...
#include <omResourceTypeSet.h>
Public Member Functions | |
ResourceTypeSet () | |
Create a new resource set that is empty and has no resources. More... | |
virtual ResourceTypeSet< DataType > * | copy () const |
Create and return a copy of the concrete type of this resource set. More... | |
virtual const ResourceType & | getResourceType () const |
Return a reference to the resource type for this resource set. More... | |
virtual Size | getResourceCount () const |
Return the number of resources that this resource set stores. More... | |
Resource< DataType > * | getResource (ResourceLocalID localID) |
Return a pointer to the resource in this resource set at the given local ID (index). More... | |
const Resource< DataType > * | getResource (ResourceLocalID localID) const |
Return a pointer to the resource in this resource set at the given local ID (index). More... | |
virtual OpaqueResource | getOpaqueResource (ResourceLocalID localID) const |
Return an opaque resource with the specified local ID. More... | |
virtual void * | getResourceData (ResourceLocalID localID) const |
Return an opaque pointer to the resource object data for the given local ID (index). More... | |
Resource< DataType > * | getResource (const data::UTF8String &name) |
Return a pointer to the resource in this resource set with the given name. More... | |
const Resource< DataType > * | getResource (const data::UTF8String &name) const |
Return a pointer to the resource in this resource set with the given name. More... | |
Resource< DataType > * | getResource (const ResourceID &identifier) |
Return a pointer to the resource in this resource set with the given identifier. More... | |
const Resource< DataType > * | getResource (const ResourceID &identifier) const |
Find the resource in this resource set with the given identifier. More... | |
virtual const ResourceID * | getResourceID (const void *resourceData) const |
Return a pointer to the ID for the resource with the given raw data pointer. More... | |
virtual Bool | getResourceLocalID (const void *resourceData, ResourceLocalID &localID) const |
Get the local ID (e.g. index) for the resource with the given raw data pointer in the output parameter. More... | |
virtual void | copyResources (ResourceSet &resourceSet) const |
Add all of the resources of this type to the specified resource set. More... | |
Resource< DataType > * | getResources () |
Return a pointer to the internal array of resources that this resource set stores. More... | |
const Resource< DataType > * | getResources () const |
Return a const pointer to the internal array of resources that this resource set stores. More... | |
Bool | addResource (const Resource< DataType > &resource) |
Add a new resource to this resource set. More... | |
Bool | removeResource (const DataType *resource) |
Remove a resource with a specific pointer from this resource set. More... | |
Bool | removeResource (const Resource< DataType > &resource) |
Remove a specific resource from this resource set. More... | |
Bool | removeResource (const data::UTF8String &name) |
Remove an resource with the given name from this resource set. More... | |
virtual Bool | removeResource (const void *resourceData) |
Remove the specified resource from this resource type set. More... | |
virtual void | clearResources () |
Remove all resources from this resource set. More... | |
Public Member Functions inherited from om::resources::ResourceTypeSetBase | |
virtual | ~ResourceTypeSetBase () |
Destroy this base resource set. More... | |
The base class for a set of resources of a templated type.
|
inline |
Create a new resource set that is empty and has no resources.
|
inlinevirtual |
Create and return a copy of the concrete type of this resource set.
This enables copies of an resource set to be made without knowing its concrete type. The caller is responsible for destructing the new resource set.
Implements om::resources::ResourceTypeSetBase.
|
inlinevirtual |
Return a reference to the resource type for this resource set.
Implements om::resources::ResourceTypeSetBase.
|
inlinevirtual |
Return the number of resources that this resource set stores.
Implements om::resources::ResourceTypeSetBase.
|
inline |
Return a pointer to the resource in this resource set at the given local ID (index).
|
inline |
Return a pointer to the resource in this resource set at the given local ID (index).
|
inlinevirtual |
Return an opaque resource with the specified local ID.
Implements om::resources::ResourceTypeSetBase.
|
inlinevirtual |
Return an opaque pointer to the resource object data for the given local ID (index).
Implements om::resources::ResourceTypeSetBase.
|
inline |
Return a pointer to the resource in this resource set with the given name.
The method returns a NULL pointer if there is no resource with that name.
|
inline |
Return a pointer to the resource in this resource set with the given name.
The method returns a NULL pointer if there is no resource with that name.
|
inline |
Return a pointer to the resource in this resource set with the given identifier.
The method returns a NULL pointer if there is no resource with that ID.
|
inline |
Find the resource in this resource set with the given identifier.
The method returns a NULL pointer if there is no resource with that ID.
|
inlinevirtual |
Return a pointer to the ID for the resource with the given raw data pointer.
If the resource set does not contain the given resource, the method fails and NULL is returned.
Implements om::resources::ResourceTypeSetBase.
|
inlinevirtual |
Get the local ID (e.g. index) for the resource with the given raw data pointer in the output parameter.
If the resource set does not contain the given resource, the method fails and FALSE is returned.
Implements om::resources::ResourceTypeSetBase.
|
virtual |
Add all of the resources of this type to the specified resource set.
Implements om::resources::ResourceTypeSetBase.
|
inline |
Return a pointer to the internal array of resources that this resource set stores.
|
inline |
Return a const pointer to the internal array of resources that this resource set stores.
|
inline |
Add a new resource to this resource set.
The method returns whether or not the resource was able to be added.
|
inline |
Remove a resource with a specific pointer from this resource set.
The method returns whether or not the resource was successfully removed.
|
inline |
Remove a specific resource from this resource set.
The method returns whether or not the resource was successfully removed.
|
inline |
Remove an resource with the given name from this resource set.
The method returns whether or not the resource was successfully removed.
|
inlinevirtual |
Remove the specified resource from this resource type set.
The method returns whether or not the resource was successfully removed.
Implements om::resources::ResourceTypeSetBase.
|
inlinevirtual |
Remove all resources from this resource set.
Implements om::resources::ResourceTypeSetBase.