![]() |
VR-Forces 4.0.4 Class Documentation
|
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construction of DtVrfObjects. More...

Public Member Functions | |
| DtVrfParameterDb () | |
| default constructor | |
| virtual | ~DtVrfParameterDb () |
| destructor | |
| virtual bool | init () |
| initialization - must be called before any other public member functions are called. | |
| virtual DtVrfParameterDbEntry * | add (const DtObjectType &objectType, DtVrfObjectParameters *parameters) |
| Add a new parameter entry to database. | |
| virtual DtVrfObjectParameters * | lookup (const DtObjectType &objectType, DtObjectType *matchingType=NULL, DtString *source=NULL) const |
| Lookup entry in parameter database that most closely matches given objectType. | |
| virtual void | remove (const DtObjectType &objectType) |
| Remove the entry for the given object type from the database. | |
| virtual void | removeAll () |
| Remove all entries in the parameter database. | |
| virtual const DtList & | parameterList () const |
| List of all DtVrfParameterDbEntry* items in the database. | |
| virtual bool | load (const DtFilename &filename) |
| Load the contents of a file into the parameter database. | |
| virtual bool | save (const DtFilename &filename) |
| Save current contents of the parameter database to file. | |
| virtual void | addParameters (const DtObjectType &objectType, DtVrfObjectParameters *newParameters) |
| virtual DtVrfObjectParameters * | lookupParameters (const DtObjectType &objectType, DtObjectType *matchingType) const |
| virtual void | removeParameters (const DtObjectType &objectType) |
| virtual void | removeAndDeleteAll () |
| virtual DtVrfParameterDbEntry * | lookupParameterDbEntry (const DtObjectType &objectType, DtObjectType *matchingType) const |
| Returns entry most closely matching given object type. | |
| virtual int | numParameterEntries () const |
| Returns the number of parameter entries. | |
| virtual std::list< DtString > * | getSysDefExtensionList () |
| Get the list of sysdef extensions currently accepted. | |
| virtual void | addExtension (DtString) |
| Add a new extension to the back of the line. | |
Static Public Member Functions | |
| static DtVrfParameterDb * | create () |
| Returns a new instance of this class. | |
Protected Member Functions | |
| virtual void | addParameterDbEntry (DtVrfParameterDbEntry *newParameterEntry) |
| Add news item to database. | |
| virtual DtListItem * | lookupParameters (const DtObjectType &objectType) const |
| Returns DtListItem (containing DtVrfParameterDbEntry*) for given object type. | |
| void | emptyList () |
| Empties contents of database, deleting memory associated with each entry. | |
| virtual DtVrfParameterDbEntry * | createParameterEntry () const |
| Creates a new type of parameter entry. Override to create your own derived type. | |
Protected Attributes | |
| DtList | myParameterList |
| List of DtVrfParameterDbEntry* objects. | |
Private Member Functions | |
| DtVrfParameterDb (const DtVrfParameterDb &orig) | |
| copy constructor - not implemented | |
| DtVrfParameterDb & | operator= (const DtVrfParameterDb &orig) |
| assignment operator - not implemented | |
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construction of DtVrfObjects.
The database is a collection of DtVrfObjectParameters objects, keyed on DtObjectType. When a new DtVrfObject is created through the DtVrfObjectManager, it looks up the appropriate DtVrfObjectParameters entry in the database, and uses the information contained in the entry to direct its construction.
default constructor
| virtual DtVrfParameterDb::~DtVrfParameterDb | ( | ) | [virtual] |
destructor
| DtVrfParameterDb::DtVrfParameterDb | ( | const DtVrfParameterDb & | orig | ) | [private] |
copy constructor - not implemented
| virtual bool DtVrfParameterDb::init | ( | ) | [virtual] |
initialization - must be called before any other public member functions are called.
Reimplemented in DtMtlParameterDb.
| virtual DtVrfParameterDbEntry* DtVrfParameterDb::add | ( | const DtObjectType & | objectType, |
| DtVrfObjectParameters * | parameters | ||
| ) | [virtual] |
Add a new parameter entry to database.
It will replace the current entry for the given object type, if one exists. This class assumes responsibility for deleting memory associated with parameters added through addParameters.
| virtual DtVrfObjectParameters* DtVrfParameterDb::lookup | ( | const DtObjectType & | objectType, |
| DtObjectType * | matchingType = NULL, |
||
| DtString * | source = NULL |
||
| ) | const [virtual] |
Lookup entry in parameter database that most closely matches given objectType.
If matchingType is specified, return the object type of the entry (which may be less specific than the object type being looked up). If source is specified, it will be set to a string indicating the source data for the parameters which is appropriate for displaying on the console.
Reimplemented in DtMtlParameterDb.
| virtual void DtVrfParameterDb::remove | ( | const DtObjectType & | objectType | ) | [virtual] |
Remove the entry for the given object type from the database.
Deletes the memory associated with the entry.
| virtual void DtVrfParameterDb::removeAll | ( | ) | [virtual] |
Remove all entries in the parameter database.
Deletes memory associated with entries in the database.
Reimplemented in DtMtlParameterDb.
| virtual const DtList& DtVrfParameterDb::parameterList | ( | ) | const [virtual] |
List of all DtVrfParameterDbEntry* items in the database.
| virtual bool DtVrfParameterDb::load | ( | const DtFilename & | filename | ) | [inline, virtual] |
Load the contents of a file into the parameter database.
Reimplemented in DtMtlParameterDb.
| virtual bool DtVrfParameterDb::save | ( | const DtFilename & | filename | ) | [inline, virtual] |
Save current contents of the parameter database to file.
Reimplemented in DtMtlParameterDb, and DtExtMtlParameterDb.
| virtual void DtVrfParameterDb::addParameters | ( | const DtObjectType & | objectType, |
| DtVrfObjectParameters * | newParameters | ||
| ) | [virtual] |
| virtual DtVrfObjectParameters* DtVrfParameterDb::lookupParameters | ( | const DtObjectType & | objectType, |
| DtObjectType * | matchingType | ||
| ) | const [virtual] |
| virtual void DtVrfParameterDb::removeParameters | ( | const DtObjectType & | objectType | ) | [virtual] |
| virtual void DtVrfParameterDb::removeAndDeleteAll | ( | ) | [virtual] |
| virtual DtVrfParameterDbEntry* DtVrfParameterDb::lookupParameterDbEntry | ( | const DtObjectType & | objectType, |
| DtObjectType * | matchingType | ||
| ) | const [virtual] |
Returns entry most closely matching given object type.
Returns object type of the entry that was found (which may be less specific than given object type).
| virtual int DtVrfParameterDb::numParameterEntries | ( | ) | const [virtual] |
Returns the number of parameter entries.
| virtual std::list<DtString>* DtVrfParameterDb::getSysDefExtensionList | ( | ) | [virtual] |
Get the list of sysdef extensions currently accepted.
This can be modified so you may add, remove, or reorder the extensions. Extensions are used to load alternate sysdefs. For example, if you add an extension of "bhave", your human-bhave.sysdef file will load if it exists, instead of human.sysdef.
| virtual void DtVrfParameterDb::addExtension | ( | DtString | ) | [virtual] |
Add a new extension to the back of the line.
The extensions added last are considered more important than the extensions added first.
| static DtVrfParameterDb* DtVrfParameterDb::create | ( | ) | [static] |
Returns a new instance of this class.
Reimplemented in DtMtlParameterDb, and MyMtlParameterDb.
| virtual void DtVrfParameterDb::addParameterDbEntry | ( | DtVrfParameterDbEntry * | newParameterEntry | ) | [protected, virtual] |
Add news item to database.
If entry with an exactly matching DtObjectType already exists, removes and deletes the existing entry before adding the new one. Inserts new entry into list of entries in the order of most general DtObjectType (e.g. -1 -1 -1 -1 -1 -1 -1 -1) to most specific (e.g. 1 1 225 3 1 3 1 1), where -1 is a wildcard, and fields are ordered from left to right as most general to most specific.
| virtual DtListItem* DtVrfParameterDb::lookupParameters | ( | const DtObjectType & | objectType | ) | const [protected, virtual] |
Returns DtListItem (containing DtVrfParameterDbEntry*) for given object type.
| void DtVrfParameterDb::emptyList | ( | ) | [protected] |
Empties contents of database, deleting memory associated with each entry.
Not virtual because its called by the destructor.
| virtual DtVrfParameterDbEntry* DtVrfParameterDb::createParameterEntry | ( | ) | const [protected, virtual] |
Creates a new type of parameter entry. Override to create your own derived type.
Reimplemented in DtMtlParameterDb, MyMtlParameterDb, and DtExtMtlParameterDb.
| DtVrfParameterDb& DtVrfParameterDb::operator= | ( | const DtVrfParameterDb & | orig | ) | [private] |
assignment operator - not implemented
DtList DtVrfParameterDb::myParameterList [protected] |
List of DtVrfParameterDbEntry* objects.