Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7216 in orxonox.OLD for branches/std/src/lib/coord/p_node.cc


Ignore:
Timestamp:
Mar 12, 2006, 8:54:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/std:: compile and run again, with many more std::strings….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/coord/p_node.cc

    r7193 r7216  
    540540 * @param childName the name of the child to add to this PNode
    541541 */
    542 void PNode::addChild (const char* childName)
     542void PNode::addChild (const std::string& childName)
    543543{
    544544  PNode* childNode = dynamic_cast<PNode*>(ClassList::getObject(childName, CL_PARENT_NODE));
     
    624624 * @param parentName the name of the Parent to set to this PNode
    625625 */
    626 void PNode::setParent (const char* parentName)
     626void PNode::setParent (const std::string& parentName)
    627627{
    628628  PNode* parentNode = dynamic_cast<PNode*>(ClassList::getObject(parentName, CL_PARENT_NODE));
     
    631631  else
    632632    PRINTF(2)("Not Found PNode's (%s::%s) new Parent by Name: %s\n",
    633               this->getClassName(), this->getName(), parentName);
     633        this->getClassName(), this->getName(), parentName.c_str());
    634634}
    635635
     
    699699 * @param parentMode a String representing this parentingMode
    700700 */
    701 void PNode::setParentMode (const char* parentingMode)
     701void PNode::setParentMode (const std::string& parentingMode)
    702702{
    703703  this->setParentMode(PNode::charToParentingMode(parentingMode));
     
    10681068 * @return the int corresponding to the named parentingMode
    10691069 */
    1070 PARENT_MODE PNode::charToParentingMode(const char* parentingMode)
    1071 {
    1072   if (!strcmp(parentingMode, "local-rotate"))
     1070PARENT_MODE PNode::charToParentingMode(const std::string& parentingMode)
     1071{
     1072  if (parentingMode == "local-rotate")
    10731073    return (PNODE_LOCAL_ROTATE);
    1074   else  if (!strcmp(parentingMode, "rotate-movement"))
     1074  else  if (parentingMode == "rotate-movement")
    10751075    return (PNODE_ROTATE_MOVEMENT);
    1076   else  if (!strcmp(parentingMode, "movement"))
     1076  else  if (parentingMode == "movement")
    10771077    return (PNODE_MOVEMENT);
    1078   else  if (!strcmp(parentingMode, "all"))
     1078  else  if (parentingMode == "all")
    10791079    return (PNODE_ALL);
    1080   else  if (!strcmp(parentingMode, "rotate-and-move"))
     1080  else  if (parentingMode == "rotate-and-move")
    10811081    return (PNODE_ROTATE_AND_MOVE);
    10821082}
Note: See TracChangeset for help on using the changeset viewer.