Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 1, 2005, 12:50:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: baseObject now implements loading of objectNames

File:
1 edited

Legend:

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

    r4435 r4436  
    1818
    1919#include "base_object.h"
    20 #include "stdincl.h"
    21 
     20#include "load_param.h"
    2221
    2322using namespace std;
     
    2524
    2625/**
    27    \brief standard constructor
     26   \brief sets the name from a LoadXML-Element
     27   \param root the element to load from
    2828*/
    29 BaseObject::BaseObject ()
     29BaseObject::BaseObject(const TiXmlElement* root)
    3030{
    3131  this->className = NULL;
     
    3434
    3535  this->objectName = NULL;
     36
     37  if (root)
     38    this->loadParams(root);
    3639}
    37 
    3840
    3941/**
     
    4749}
    4850
     51/**
     52   \brief loads parameters
     53   \param root the element to load from
     54*/
     55void BaseObject::loadParams(const TiXmlElement* root)
     56{
     57  // name setup
     58  LoadParam<BaseObject>(root, "name", this, &BaseObject::setName)
     59    .describe("the name of the Object at hand");
     60}
    4961
    5062/**
Note: See TracChangeset for help on using the changeset viewer.