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

A class that represents a unique identifier for a resource. More...

#include <omResourceID.h>

Public Member Functions

 ResourceID ()
 Create a new resource ID which doesn't point to a valid resource. More...
 
 ResourceID (const data::UTF8String &newURL)
 Create a new resource ID with the specified resource file path. More...
 
 ResourceID (const ResourceType &newType, const data::UTF8String &newURL)
 Create a new resource ID with the specified attributes. More...
 
 ResourceID (const ResourceType &newType, const ResourceFormat &newFormat, const data::UTF8String &newURL)
 Create a new resource ID with the specified attributes. More...
 
 ResourceID (const ResourceType &newType, const ResourceFormat &newFormat, const data::UTF8String &newURL, const data::UTF8String &newName, const ResourceFlags &newFlags=ResourceFlags::DEFAULT)
 Create a new resource ID with the specified attributes. More...
 
const ResourceTypegetType () const
 Return an object describing the type of resource this ID refers to. More...
 
void setType (const ResourceType &newType)
 Set an object describing the type of resource this ID refers to. More...
 
const ResourceFormatgetFormat () const
 Return an object describing the format of file this ID refers to. More...
 
void setFormat (const ResourceFormat &newFormat)
 Set an object describing the format of file this ID refers to. More...
 
const data::UTF8StringgetURL () const
 Return a reference to the UTF-8 encoded string representing the path to this resource. More...
 
void setURL (const data::UTF8String &newURL)
 Set a UTF-8 encoded string representing a path to this resource. More...
 
const data::UTF8StringgetName () const
 Return a UTF-8 encoded string representing the name of the resource for this ID. More...
 
void setName (const data::UTF8String &newName)
 Set a UTF-8 encoded string representing the name of the resource for this ID. More...
 
ResourceFlagsgetFlags ()
 Return a reference to an object that contains boolean parameters of the resource. More...
 
const ResourceFlagsgetFlags () const
 Return an object that contains boolean parameters of the resource. More...
 
void setFlags (const ResourceFlags &newFlags)
 Set an object that contains boolean parameters of the resource. More...
 
Bool flagIsSet (ResourceFlags::Flag flag) const
 Return whether or not the specified boolan flag is set for this resource. More...
 
void setFlag (ResourceFlags::Flag flag, Bool newIsSet=true)
 Set whether or not the specified boolan flag is set for this resource. More...
 
Bool operator== (const ResourceID &other) const
 Return whether or not this resource ID is equal to another. More...
 
Bool operator!= (const ResourceID &other) const
 Return whether or not this resource ID is not equal to another. More...
 
Hash getHashCode () const
 Return an integer hash code for this resource ID. More...
 

Static Public Attributes

static const ResourceLocalID INVALID_LOCAL_ID = ResourceLocalID(Int64(-1))
 The invalid local ID that indicates the local ID is unused. More...
 

Detailed Description

A class that represents a unique identifier for a resource.

A resource is specified by a path to a file, an enum determining how that file should be interpreted (its type), the type of resource that this ID corresponds to, and an optional name that is used to identify the resource within the file.

Constructor & Destructor Documentation

om::resources::ResourceID::ResourceID ( )
inline

Create a new resource ID which doesn't point to a valid resource.

om::resources::ResourceID::ResourceID ( const data::UTF8String newURL)
inline

Create a new resource ID with the specified resource file path.

om::resources::ResourceID::ResourceID ( const ResourceType newType,
const data::UTF8String newURL 
)
inline

Create a new resource ID with the specified attributes.

om::resources::ResourceID::ResourceID ( const ResourceType newType,
const ResourceFormat newFormat,
const data::UTF8String newURL 
)
inline

Create a new resource ID with the specified attributes.

om::resources::ResourceID::ResourceID ( const ResourceType newType,
const ResourceFormat newFormat,
const data::UTF8String newURL,
const data::UTF8String newName,
const ResourceFlags newFlags = ResourceFlags::DEFAULT 
)
inline

Create a new resource ID with the specified attributes.

Member Function Documentation

const ResourceType& om::resources::ResourceID::getType ( ) const
inline

Return an object describing the type of resource this ID refers to.

void om::resources::ResourceID::setType ( const ResourceType newType)
inline

Set an object describing the type of resource this ID refers to.

const ResourceFormat& om::resources::ResourceID::getFormat ( ) const
inline

Return an object describing the format of file this ID refers to.

void om::resources::ResourceID::setFormat ( const ResourceFormat newFormat)
inline

Set an object describing the format of file this ID refers to.

const data::UTF8String& om::resources::ResourceID::getURL ( ) const
inline

Return a reference to the UTF-8 encoded string representing the path to this resource.

void om::resources::ResourceID::setURL ( const data::UTF8String newURL)
inline

Set a UTF-8 encoded string representing a path to this resource.

const data::UTF8String& om::resources::ResourceID::getName ( ) const
inline

Return a UTF-8 encoded string representing the name of the resource for this ID.

void om::resources::ResourceID::setName ( const data::UTF8String newName)
inline

Set a UTF-8 encoded string representing the name of the resource for this ID.

ResourceFlags& om::resources::ResourceID::getFlags ( )
inline

Return a reference to an object that contains boolean parameters of the resource.

const ResourceFlags& om::resources::ResourceID::getFlags ( ) const
inline

Return an object that contains boolean parameters of the resource.

void om::resources::ResourceID::setFlags ( const ResourceFlags newFlags)
inline

Set an object that contains boolean parameters of the resource.

Bool om::resources::ResourceID::flagIsSet ( ResourceFlags::Flag  flag) const
inline

Return whether or not the specified boolan flag is set for this resource.

void om::resources::ResourceID::setFlag ( ResourceFlags::Flag  flag,
Bool  newIsSet = true 
)
inline

Set whether or not the specified boolan flag is set for this resource.

Bool om::resources::ResourceID::operator== ( const ResourceID other) const
inline

Return whether or not this resource ID is equal to another.

Bool om::resources::ResourceID::operator!= ( const ResourceID other) const
inline

Return whether or not this resource ID is not equal to another.

Hash om::resources::ResourceID::getHashCode ( ) const
inline

Return an integer hash code for this resource ID.

Member Data Documentation

const ResourceLocalID om::resources::ResourceID::INVALID_LOCAL_ID = ResourceLocalID(Int64(-1))
static

The invalid local ID that indicates the local ID is unused.


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