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...
|
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.
|
Detailed Description
The DtModelSemanticsMapper object is responsible for mapping Names of model semantics declarations (for example states, articulated parts etc) To integers.
Member Typedef Documentation
Constructor & Destructor Documentation
| virtual makVrv::DtModelSemanticsMapper::~DtModelSemanticsMapper |
( |
| ) |
|
|
virtual |
| makVrv::DtModelSemanticsMapper::DtModelSemanticsMapper |
( |
| ) |
|
|
protected |
Member Function Documentation
| const std::string* makVrv::DtModelSemanticsMapper::findStateName |
( |
States::Id |
id | ) |
const |
Search for a state name for the id.
- Note
- The state name is case-insensitive also 'spaces' and 'underscore' are treated as the same (except for padding spaces which are ignored).
- Returns
- a pointer to an internal reference. This pointer MUST not be deleted and should not be held on to.
- Return values
-
| 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.
- Returns
- a pointer to an internal reference. This pointer MUST not be deleted and should not be held on to.
- Return values
-
| const std::string* makVrv::DtModelSemanticsMapper::findPartName |
( |
Parts::Id |
id | ) |
const |
Search for a part name for the id.
- Note
- The state name is case-insensitive also 'spaces' and 'underscore' are treated as the same (except for padding spaces which are ignored).
- Returns
- a pointer to an internal reference. This pointer MUST not be deleted and should not be held on to.
- Return values
-
| 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.
- Returns
- a pointer to an internal reference. This pointer MUST not be deleted and should not be held on to.
- Return values
-
| void makVrv::DtModelSemanticsMapper::addState |
( |
const std::string & |
name, |
|
|
States::Id |
id |
|
) |
| |
| void makVrv::DtModelSemanticsMapper::removeState |
( |
const std::string & |
name | ) |
|
| void makVrv::DtModelSemanticsMapper::addPart |
( |
const std::string & |
name, |
|
|
Parts::Id |
id |
|
) |
| |
| void makVrv::DtModelSemanticsMapper::removePart |
( |
const std::string & |
name | ) |
|
| virtual std::string makVrv::DtModelSemanticsMapper::cleanUpName |
( |
const std::string & |
| ) |
const |
|
protectedvirtual |
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 |
( |
| ) |
|
|
protectedvirtual |
Called by instance function on creation of only Mapper instance.
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following file: