Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7218 in orxonox.OLD for branches/std/src/lib/lang/base_object.cc


Ignore:
Timestamp:
Mar 12, 2006, 3:00:04 PM (18 years ago)
Author:
bensch
Message:

orxonox/std:: more strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/lang/base_object.cc

    r7216 r7218  
    3434BaseObject::BaseObject()
    3535{
     36  this->classID = CL_BASE_OBJECT;
    3637  this->className = "BaseObject";
    37   this->classID = CL_BASE_OBJECT;
    3838
    3939  this->objectName = "";
     
    7878 * @param className the class name
    7979*/
    80 void BaseObject::setClassID(ClassID classID, const char* className)
     80void BaseObject::setClassID(ClassID classID, const std::string& className)
    8181{
    8282  //printf("%s(0x%.8X)->%s(0x%.8X)\n", this->className, this->classID, className, classID);
     
    150150 * @returns true if it is, false otherwise
    151151 */
    152 bool BaseObject::isA (const char* className) const
     152bool BaseObject::isA (const std::string& className) const
    153153{
    154154  ClassID classID = ClassList::StringToID(className);
     
    163163 * @returns true on match, false otherwise.
    164164 */
    165 bool BaseObject::operator==(const char* objectName)
    166 {
    167   return (objectName != NULL && this->objectName == objectName);
     165bool BaseObject::operator==(const std::string& objectName)
     166{
     167  return (this->objectName == objectName);
    168168}
    169169
Note: See TracChangeset for help on using the changeset viewer.