Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a template for a group of resources that can be instantiated as a module. More...
#include <omResourcePrototype.h>
Classes | |
class | Component |
A class that stores information about a resource that belongs to a prototype. More... | |
Public Member Functions | |
Prototype () | |
Create a new empty resource prototype. More... | |
~Prototype () | |
Destroy a resource prototype. More... | |
Size | getComponentCount () const |
Return the number of components there are in this resource prototype. More... | |
Component & | getComponent (Index componentIndex) |
Return a reference to the component at the specified index in this resource prototype. More... | |
const Component & | getComponent (Index componentIndex) const |
Return a const reference to the component at the specified index in this resource prototype. More... | |
Bool | hasComponent (const void *data) const |
Return whether or not this prototype contains the specified resource data object. More... | |
Bool | getComponentIndex (const void *data, Index &componentIndex) const |
Get the index of the component in this prototype with the specified resource data. More... | |
void | addComponent (const Component &newComponent) |
Add a new component to the end of this resource prototype. More... | |
Bool | insertComponent (Index componentIndex, const Component &newComponent) |
Insert a new component at the specified index within this resource prototype. More... | |
void | removeComponent (Index componentIndex) |
Remove the component in this prototype at the specified index. More... | |
void | clearComponents () |
Remove all components from this resource prototype. More... | |
Static Public Attributes | |
static const ResourceType | RESOURCE_TYPE |
The resource type for a resource prototype. More... | |
A class that represents a template for a group of resources that can be instantiated as a module.
om::resources::Prototype::Prototype | ( | ) |
Create a new empty resource prototype.
om::resources::Prototype::~Prototype | ( | ) |
Destroy a resource prototype.
|
inline |
Return the number of components there are in this resource prototype.
Return a reference to the component at the specified index in this resource prototype.
Return a const reference to the component at the specified index in this resource prototype.
Bool om::resources::Prototype::hasComponent | ( | const void * | data | ) | const |
Return whether or not this prototype contains the specified resource data object.
Bool om::resources::Prototype::getComponentIndex | ( | const void * | data, |
Index & | componentIndex | ||
) | const |
Get the index of the component in this prototype with the specified resource data.
void om::resources::Prototype::addComponent | ( | const Component & | newComponent | ) |
Add a new component to the end of this resource prototype.
The method returns whether or not the component was able to be added.
Bool om::resources::Prototype::insertComponent | ( | Index | componentIndex, |
const Component & | newComponent | ||
) |
Insert a new component at the specified index within this resource prototype.
The method returns whether or not the component was able to be inserted.
void om::resources::Prototype::removeComponent | ( | Index | componentIndex | ) |
Remove the component in this prototype at the specified index.
void om::resources::Prototype::clearComponents | ( | ) |
Remove all components from this resource prototype.
|
static |
The resource type for a resource prototype.