Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4257 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 22, 2005, 2:39:59 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: performance-update when creating a new entity

Location:
orxonox/branches/levelLoader/src
Files:
4 edited

Legend:

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

    r3651 r4257  
    3939BaseObject::~BaseObject ()
    4040{
    41   delete []this->className;
     41  //  delete []this->className;
    4242}
    4343
    44 void BaseObject::setClassName (char* className)
     44void BaseObject::setClassName (const char* className)
    4545{
    46   this->className = new char[strlen(className)+1];
    47   strcpy(this->className, className);
    48 }
    49 
    50 char* BaseObject::getClassName(void) const
    51 {
    52   return className;
     46  this->className = className;
    5347}
    5448
  • orxonox/branches/levelLoader/src/lib/lang/base_object.h

    r3651 r4257  
    1717  virtual ~BaseObject ();
    1818
    19   void setClassName (char* className);
    20   char* getClassName(void) const;
     19  void setClassName (const char* className);
     20  inline const char* getClassName(void) const { return this->className;};
    2121  bool isA (char* className);
    2222
     
    2525
    2626 private:
    27   char* className;
     27  const char* className;
    2828  bool finalized;
    2929};
  • orxonox/branches/levelLoader/src/world_entities/skybox.cc

    r4255 r4257  
    5656void SkyBox::loadParams(const TiXmlElement* root)
    5757{
    58   LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture).describe("Sets the material on the skysphere. The string must be the path relative to the data-dir, and without a trailing .jpg");
     58  LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture).describe("Sets the material on the SkyBox. The string must be the path relative to the data-dir, and without a trailing .jpg");
    5959}
    6060
  • orxonox/branches/levelLoader/src/world_entities/world_entity.cc

    r4253 r4257  
    4242{
    4343  // name setup
    44   LoadParam<WorldEntity>(root, "name", this, &WorldEntity::setName);
     44  LoadParam<WorldEntity>(root, "name", this, &WorldEntity::setName).describe("the name of the Object at hand");
    4545
    4646  // Model Loading     
    47   LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel);
     47  LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel).describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)") ;
    4848}
    4949
Note: See TracChangeset for help on using the changeset viewer.