Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9371 in orxonox.OLD for branches/proxy/src/lib/lang


Ignore:
Timestamp:
Jul 20, 2006, 11:08:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ORXONOX is now completely std::stringed

Location:
branches/proxy/src/lib/lang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/lang/base_object.h

    r9361 r9371  
    3535  void setName (const std::string& newName);
    3636  /** returns the Name of this Object */
    37   inline const char* getName ()const { return this->objectName.c_str(); };
     37  inline const std::string& getName() const { return this->objectName; };
     38  /** returns the Name of this Object as a C-compliant string (const char*) */
     39  inline const char* getCName() const { return this->objectName.c_str(); };
    3840  /** @returns the XML-Element with whicht this Object was loaded */
    3941  inline TiXmlNode* getXmlElem() const { return this->xmlElem; };
    4042
    4143  /** @returns the className of the corresponding Object */
    42   inline const char* getClassName() const { return this->className.c_str(); };
     44  inline const std::string& getClassName() const { return this->className; }
     45  /** @returns the className of the corresponding Object as a C-compliant string (const char*) */
     46  inline const char* getClassCName() const { return this->className.c_str(); };
    4347  /** @returns the classID of the corresponding Object */
    4448  inline int getClassID() const { return this->classID; };
  • branches/proxy/src/lib/lang/class_list.cc

    r9357 r9371  
    207207      std::list<BaseObject*>::iterator bo;
    208208      for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
    209         if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
     209        if (objectName == (*bo)->getName())
    210210          return (*bo);
    211211    }
     
    218218      std::list<BaseObject*>::iterator bo;
    219219      for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
    220         if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
     220        if (objectName == (*bo)->getName())
    221221          return (*bo);
    222222    }
     
    241241    std::list<BaseObject*>::iterator bo;
    242242    for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
    243       if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
     243      if (objectName == (*bo)->getName())
    244244        return (*bo);
    245245  }
     
    286286    std::list<BaseObject*>::iterator bo;
    287287    for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
    288       if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
     288      if (objectName == (*bo)->getName())
    289289        return true;
    290290  }
     
    380380        for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
    381381        {
    382           PRINT(0)("|   %s::%s::(0x%.8X->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo)->getClassID(), (*bo));
     382          PRINT(0)("|   %s::%s::(0x%.8X->%p ", (*bo)->getClassCName(), (*bo)->getCName(), (*bo)->getClassID(), (*bo));
    383383          if (debugLevel == 3)
    384384            ClassList::whatIs(*bo);
Note: See TracChangeset for help on using the changeset viewer.