Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4435 in orxonox.OLD for orxonox/trunk/src/lib/lang/base_object.cc


Ignore:
Timestamp:
Jun 1, 2005, 11:40:19 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: objectName is now a property of BaseObject, because pNode has nothing to do with a name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/lang/base_object.cc

    r4321 r4435  
    3232  this->id = -1;
    3333  this->finalized = false;
     34
     35  this->objectName = NULL;
    3436}
    3537
     
    4143{
    4244  //  delete []this->className;
     45  if (this->objectName)
     46    delete []this->objectName;
    4347}
    4448
     
    96100  this->finalized = true;
    97101}
     102
     103
     104/**
     105  \brief set the name of the node
     106
     107  for debug purposes realy usefull, not used to work properly
     108*/
     109void BaseObject::setName (const char* newName)
     110{
     111  if (this->objectName)
     112    delete []this->objectName;
     113  if (newName)
     114    {
     115      this->objectName = new char[strlen(newName)+1];
     116      strcpy(this->objectName, newName);
     117    }
     118  else
     119    this->objectName = NULL;
     120}
Note: See TracChangeset for help on using the changeset viewer.