![]() |
VR-Forces 4.0.4 Class Documentation
|
class DtSimResourceManager: More...

Public Member Functions | |
| DtSimResourceManager (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| real constructor | |
| DtSimResourceManager (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtSimResourceManager (const DtString &name, const DtSimResourceManager &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| DtSimResourceManager (const DtSymbolString &name, const DtSimResourceManager &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtSimResourceManager & | operator= (const DtSimResourceManager &orig) |
| assignment operator | |
| bool | operator!= (const DtSimResourceManager &orig) const |
| bool | operator== (const DtSimResourceManager &orig) const |
| virtual | ~DtSimResourceManager () |
| destructor | |
| virtual DtSimResource * | lookupResource (const DtString &resourceName) |
| virtual DtSimResource * | lookupResource (const DtBaseHashKey &resourceName) |
| virtual const DtSimResource * | lookupResource (const DtString &resourceName) const |
| virtual const DtSimResource * | lookupResource (const DtBaseHashKey &resourceName) const |
| virtual DtSimResource * | addResource (DtSimResource *resource) |
| This does a clone of the resource and puts it on our main list, as well as adding the resource to the hash index. | |
| virtual bool | removeResource (DtSimResource *resource) |
| Finds the specified resource wherever it is located in the resource hierarchy, and removes and deletes it. | |
| virtual DtSimResourceManager * | clone (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL) const |
| virtual DtSimResourceManager * | clone (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) const |
| virtual void | addToHashIndex (DtSimResource *resource) |
| The following 2 functions are provided for use by the addChildResource/ removeChildResource calls in DtSimResource. | |
| virtual void | removeFromHashIndex (DtSimResource *resource) |
| This removes the resource from the index. The resource is NOT deleted. | |
| const DtList * | resources () const |
| Returns a list of the resource keys for this manager. | |
Protected Member Functions | |
| DtSimResourceManager () | |
| default constructor | |
| virtual void | removeResource (DtSimResource *resource, DtListItem *item) |
| This removes just from the main list, not the index. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| This method must be overridden by a subclass. | |
Protected Attributes | |
| DtHashlist | myHashIndex |
class DtSimResourceManager:
Instances of DtSimResourceManager are readable/writable lists of DtSimResources. It provides hash table lookup for all of an entity's resources, including sub-resources. During initialization, resource capacity and starting values specified in any DtLocalEntityParameters are copied to the DtSimResourceManager. Subresources should NOT be placed on the resource manager explicitly. That is done automatically by DtSimResource's addChildResource (and vice versa for removeChildResource).
| DtSimResourceManager::DtSimResourceManager | ( | ) | [protected] |
default constructor
| DtSimResourceManager::DtSimResourceManager | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
real constructor
| DtSimResourceManager::DtSimResourceManager | ( | const DtSymbolString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
| DtSimResourceManager::DtSimResourceManager | ( | const DtString & | name, |
| const DtSimResourceManager & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
copy constructor
| DtSimResourceManager::DtSimResourceManager | ( | const DtSymbolString & | name, |
| const DtSimResourceManager & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
| virtual DtSimResourceManager::~DtSimResourceManager | ( | ) | [virtual] |
destructor
| DtSimResourceManager& DtSimResourceManager::operator= | ( | const DtSimResourceManager & | orig | ) |
assignment operator
| bool DtSimResourceManager::operator!= | ( | const DtSimResourceManager & | orig | ) | const [inline] |
| bool DtSimResourceManager::operator== | ( | const DtSimResourceManager & | orig | ) | const |
| virtual DtSimResource* DtSimResourceManager::lookupResource | ( | const DtString & | resourceName | ) | [virtual] |
| virtual DtSimResource* DtSimResourceManager::lookupResource | ( | const DtBaseHashKey & | resourceName | ) | [virtual] |
| virtual const DtSimResource* DtSimResourceManager::lookupResource | ( | const DtString & | resourceName | ) | const [virtual] |
| virtual const DtSimResource* DtSimResourceManager::lookupResource | ( | const DtBaseHashKey & | resourceName | ) | const [virtual] |
| virtual DtSimResource* DtSimResourceManager::addResource | ( | DtSimResource * | resource | ) | [virtual] |
This does a clone of the resource and puts it on our main list, as well as adding the resource to the hash index.
| virtual bool DtSimResourceManager::removeResource | ( | DtSimResource * | resource | ) | [virtual] |
Finds the specified resource wherever it is located in the resource hierarchy, and removes and deletes it.
| virtual DtSimResourceManager* DtSimResourceManager::clone | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) | const [virtual] |
| virtual DtSimResourceManager* DtSimResourceManager::clone | ( | const DtSymbolString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) | const [virtual] |
| virtual void DtSimResourceManager::addToHashIndex | ( | DtSimResource * | resource | ) | [virtual] |
The following 2 functions are provided for use by the addChildResource/ removeChildResource calls in DtSimResource.
They may eventually become protected (with access to DtSimResource provided by friend functions.) This adds the resource to our hash index, but no cloning is done.
| virtual void DtSimResourceManager::removeFromHashIndex | ( | DtSimResource * | resource | ) | [virtual] |
This removes the resource from the index. The resource is NOT deleted.
| const DtList* DtSimResourceManager::resources | ( | ) | const [inline] |
Returns a list of the resource keys for this manager.
Can be used to iterate through the resources
| virtual void DtSimResourceManager::removeResource | ( | DtSimResource * | resource, |
| DtListItem * | item | ||
| ) | [protected, virtual] |
This removes just from the main list, not the index.
| virtual DtlObjPtr DtSimResourceManager::getData | ( | DtlObjPtr | args, |
| const DtFilename & | searchPath, | ||
| const DtVariableBindingsList & | variableBindings | ||
| ) | [protected, virtual] |
This method must be overridden by a subclass.
Within this method, new instances of the DtReaderWriter subclass that is being handled by this list must be created, and then retrieved from the mtl stream, using the getSelf member of that item.
Implements DtRwList.
DtHashlist DtSimResourceManager::myHashIndex [protected] |