![]() |
VR-Forces 4.0.4 Class Documentation
|
The DtModelSemanticsMapper object is responsible for mapping Names of model semantics declarations (for example states, articulated parts etc) To integers. More...

Classes | |
| struct | Parts |
| This struct is used like a namespace. More... | |
| struct | States |
| This struct is used like a namespace. More... | |
Public Member Functions | |
| virtual | ~DtModelSemanticsMapper () |
| const std::string * | findStateName (States::Id id) const |
| Search for a state name for the id. | |
| const States::Id * | findStateId (const std::string &name) const |
| Search for a state name for the id. | |
| const std::string * | findPartName (Parts::Id id) const |
| Search for a part name for the id. | |
| const Parts::Id * | findPartId (const std::string &name) const |
| Search for a part name for the id. | |
| void | addState (const std::string &name, States::Id id) |
| Add a particular state. | |
| void | removeState (const std::string &name) |
| Remove a state. | |
| void | addPart (const std::string &name, Parts::Id id) |
| Add a part. | |
| void | removePart (const std::string &name) |
| Remove a part. | |
Static Public Member Functions | |
| static DtModelSemanticsMapper & | instance (DtDe &) |
Protected Types | |
| typedef std::map< std::string, States::Id > | StateNameToIdMap |
| typedef std::map< States::Id, std::string > | StateIdToNameMap |
| typedef std::map< std::string, Parts::Id > | PartNameToIdMap |
| typedef std::map< Parts::Id, std::string > | PartIdToNameMap |
Protected Member Functions | |
| virtual std::string | cleanUpName (const std::string &) const |
| Function for transforming an input name into a valid search name. | |
| DtModelSemanticsMapper () | |
| virtual void | initialize () |
| Called by instance function on creation of only Mapper instance. | |
Protected Attributes | |
| StateNameToIdMap | myStateNamesToIds |
| StateIdToNameMap | myStateIdsToNames |
| PartNameToIdMap | myPartNamesToIds |
| PartIdToNameMap | myPartIdsToNames |
Friends | |
| class | DtModelSemanticsMapperCreator |
The DtModelSemanticsMapper object is responsible for mapping Names of model semantics declarations (for example states, articulated parts etc) To integers.
typedef std::map<std::string,States::Id> makVrv::DtModelSemanticsMapper::StateNameToIdMap [protected] |
typedef std::map<States::Id,std::string> makVrv::DtModelSemanticsMapper::StateIdToNameMap [protected] |
typedef std::map<std::string,Parts::Id> makVrv::DtModelSemanticsMapper::PartNameToIdMap [protected] |
typedef std::map<Parts::Id,std::string> makVrv::DtModelSemanticsMapper::PartIdToNameMap [protected] |
| virtual makVrv::DtModelSemanticsMapper::~DtModelSemanticsMapper | ( | ) | [virtual] |
| makVrv::DtModelSemanticsMapper::DtModelSemanticsMapper | ( | ) | [protected] |
| static DtModelSemanticsMapper& makVrv::DtModelSemanticsMapper::instance | ( | DtDe & | ) | [static] |
| const std::string* makVrv::DtModelSemanticsMapper::findStateName | ( | States::Id | id | ) | const |
Search for a state name for the id.
| NULL | if no name was found. |
| const States::Id* makVrv::DtModelSemanticsMapper::findStateId | ( | const std::string & | name | ) | const |
Search for a state name for the id.
Note if id is actually an integer encoded as a string, the string is converted to an integer and cast to a StateId, it will then also attempt to search for the proper id pointer in the map.
| NULL | if no id was found. |
| const std::string* makVrv::DtModelSemanticsMapper::findPartName | ( | Parts::Id | id | ) | const |
Search for a part name for the id.
| NULL | if no name was found. |
| const Parts::Id* makVrv::DtModelSemanticsMapper::findPartId | ( | const std::string & | name | ) | const |
Search for a part name for the id.
Note if id is actually an integer encoded as a string, the string is converted to an integer and cast to a Parts::Ids, it will then also attempt to search for the proper id pointer in the map.
| NULL | if no id was found. |
| void makVrv::DtModelSemanticsMapper::addState | ( | const std::string & | name, |
| States::Id | id | ||
| ) |
Add a particular state.
| void makVrv::DtModelSemanticsMapper::removeState | ( | const std::string & | name | ) |
Remove a state.
| void makVrv::DtModelSemanticsMapper::addPart | ( | const std::string & | name, |
| Parts::Id | id | ||
| ) |
Add a part.
| void makVrv::DtModelSemanticsMapper::removePart | ( | const std::string & | name | ) |
Remove a part.
| virtual std::string makVrv::DtModelSemanticsMapper::cleanUpName | ( | const std::string & | ) | const [protected, virtual] |
Function for transforming an input name into a valid search name.
This removes any space padding, transforms the alpha characters to lower case and all internal spaces to underscores.
| virtual void makVrv::DtModelSemanticsMapper::initialize | ( | ) | [protected, virtual] |
Called by instance function on creation of only Mapper instance.
friend class DtModelSemanticsMapperCreator [friend] |