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

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...
 
ComponentgetComponent (Index componentIndex)
 Return a reference to the component at the specified index in this resource prototype. More...
 
const ComponentgetComponent (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...
 

Detailed Description

A class that represents a template for a group of resources that can be instantiated as a module.

Constructor & Destructor Documentation

om::resources::Prototype::Prototype ( )

Create a new empty resource prototype.

om::resources::Prototype::~Prototype ( )

Destroy a resource prototype.

Member Function Documentation

Size om::resources::Prototype::getComponentCount ( ) const
inline

Return the number of components there are in this resource prototype.

Component& om::resources::Prototype::getComponent ( Index  componentIndex)
inline

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

const Component& om::resources::Prototype::getComponent ( Index  componentIndex) const
inline

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.

Member Data Documentation

const ResourceType om::resources::Prototype::RESOURCE_TYPE
static

The resource type for a resource prototype.


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