Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::resources::ResourceTag Class Reference

A class that represents a semantic tag for a group of resources. More...

#include <omResourceTag.h>

Public Member Functions

 ResourceTag ()
 Create a new empty resource tag. More...
 
 ResourceTag (const UTF8String &newName)
 Create a new empty resource tag with the specified name. More...
 
 ~ResourceTag ()
 Destroy a resource tag. More...
 
const UTF8String & getName () const
 Return a string containing the name of this tag. More...
 
void setName (const UTF8String &newName)
 Set the name of this tag. More...
 
Size getResourceCount () const
 Return the number of resources there are in this resource tag. More...
 
OpaqueResourcegetResource (Index resourceIndex)
 Return a reference to the resource at the specified index in this resource tag. More...
 
const OpaqueResourcegetResource (Index resourceIndex) const
 Return a const reference to the resource at the specified index in this resource tag. More...
 
Bool hasResource (const void *data) const
 Return whether or not this tag contains the specified resource data object. More...
 
Bool getResourceIndex (const void *data, Index &componentIndex) const
 Get the index of the resource in this tag with the specified resource data. More...
 
Bool addResource (const OpaqueResource &newResource)
 Add a new resource to the end of this resource tag. More...
 
Bool insertResource (Index resourceIndex, const OpaqueResource &newResource)
 Insert a new resource at the specified index within this resource tag. More...
 
void removeResource (Index resourceIndex)
 Remove the resource in this group at the specified index. More...
 
void clearResources ()
 Remove all resources from this resource tag. More...
 

Static Public Attributes

static const ResourceType RESOURCE_TYPE
 The resource type for a resource tag. More...
 

Detailed Description

A class that represents a semantic tag for a group of resources.

Constructor & Destructor Documentation

om::resources::ResourceTag::ResourceTag ( )

Create a new empty resource tag.

om::resources::ResourceTag::ResourceTag ( const UTF8String &  newName)

Create a new empty resource tag with the specified name.

om::resources::ResourceTag::~ResourceTag ( )

Destroy a resource tag.

Member Function Documentation

const UTF8String& om::resources::ResourceTag::getName ( ) const
inline

Return a string containing the name of this tag.

void om::resources::ResourceTag::setName ( const UTF8String &  newName)
inline

Set the name of this tag.

Size om::resources::ResourceTag::getResourceCount ( ) const
inline

Return the number of resources there are in this resource tag.

OpaqueResource& om::resources::ResourceTag::getResource ( Index  resourceIndex)
inline

Return a reference to the resource at the specified index in this resource tag.

const OpaqueResource& om::resources::ResourceTag::getResource ( Index  resourceIndex) const
inline

Return a const reference to the resource at the specified index in this resource tag.

Bool om::resources::ResourceTag::hasResource ( const void *  data) const

Return whether or not this tag contains the specified resource data object.

Bool om::resources::ResourceTag::getResourceIndex ( const void *  data,
Index componentIndex 
) const

Get the index of the resource in this tag with the specified resource data.

Bool om::resources::ResourceTag::addResource ( const OpaqueResource newResource)

Add a new resource to the end of this resource tag.

The method returns whether or not the resource was able to be added.

Bool om::resources::ResourceTag::insertResource ( Index  resourceIndex,
const OpaqueResource newResource 
)

Insert a new resource at the specified index within this resource tag.

The method returns whether or not the resource was able to be inserted.

void om::resources::ResourceTag::removeResource ( Index  resourceIndex)

Remove the resource in this group at the specified index.

void om::resources::ResourceTag::clearResources ( )

Remove all resources from this resource tag.

Member Data Documentation

const ResourceType om::resources::ResourceTag::RESOURCE_TYPE
static

The resource type for a resource tag.


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