Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::resources::ResourceTypeSetBase Class Referenceabstract

The base class for a set of resources of a generic type. More...

#include <omResourceTypeSetBase.h>

Inheritance diagram for om::resources::ResourceTypeSetBase:
om::resources::ResourceTypeSet< DataType >

Public Member Functions

virtual ~ResourceTypeSetBase ()
 Destroy this base resource set. More...
 
virtual ResourceTypeSetBasecopy () const =0
 Create and return a copy of the concrete type of this resource set. More...
 
virtual const ResourceTypegetResourceType () const =0
 Return a reference to the resource type for this resource set. More...
 
virtual Size getResourceCount () const =0
 Return the number of resources that are stored in this type set. More...
 
virtual OpaqueResource getOpaqueResource (ResourceLocalID localID) const =0
 Return an opaque resource with the specified local ID. More...
 
virtual void * getResourceData (ResourceLocalID localID) const =0
 Return an opaque pointer to the resource object data for the given local ID (index). More...
 
virtual const ResourceIDgetResourceID (const void *resourceData) const =0
 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 =0
 Get the index of the resource with the given raw data pointer in the output parameter. More...
 
virtual void copyResources (ResourceSet &resourceSet) const =0
 Add all of the resources of this type to the specified resource set. More...
 
virtual Bool removeResource (const void *resourceData)=0
 Remove the specified resource from this resource type set. More...
 
virtual void clearResources ()=0
 Remove all resources from this resource set. More...
 

Detailed Description

The base class for a set of resources of a generic type.

Constructor & Destructor Documentation

virtual om::resources::ResourceTypeSetBase::~ResourceTypeSetBase ( )
inlinevirtual

Destroy this base resource set.

Member Function Documentation

virtual ResourceTypeSetBase* om::resources::ResourceTypeSetBase::copy ( ) const
pure virtual

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.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual const ResourceType& om::resources::ResourceTypeSetBase::getResourceType ( ) const
pure virtual

Return a reference to the resource type for this resource set.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual Size om::resources::ResourceTypeSetBase::getResourceCount ( ) const
pure virtual

Return the number of resources that are stored in this type set.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual OpaqueResource om::resources::ResourceTypeSetBase::getOpaqueResource ( ResourceLocalID  localID) const
pure virtual

Return an opaque resource with the specified local ID.

If the resource set does not contain the given resource, the method fails and a NULL resource is returned.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual void* om::resources::ResourceTypeSetBase::getResourceData ( ResourceLocalID  localID) const
pure virtual

Return an opaque pointer to the resource object data for the given local ID (index).

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual const ResourceID* om::resources::ResourceTypeSetBase::getResourceID ( const void *  resourceData) const
pure virtual

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.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual Bool om::resources::ResourceTypeSetBase::getResourceLocalID ( const void *  resourceData,
ResourceLocalID localID 
) const
pure virtual

Get the index of 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.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual void om::resources::ResourceTypeSetBase::copyResources ( ResourceSet resourceSet) const
pure virtual

Add all of the resources of this type to the specified resource set.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual Bool om::resources::ResourceTypeSetBase::removeResource ( const void *  resourceData)
pure virtual

Remove the specified resource from this resource type set.

The method returns whether or not the resource was successfully removed.

Implemented in om::resources::ResourceTypeSet< DataType >.

virtual void om::resources::ResourceTypeSetBase::clearResources ( )
pure virtual

Remove all resources from this resource set.

Implemented in om::resources::ResourceTypeSet< DataType >.


The documentation for this class was generated from the following file: