Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4487 in orxonox.OLD for orxonox/trunk/src/util/loading/factory.cc


Ignore:
Timestamp:
Jun 3, 2005, 12:56:57 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more doxygen-tags in util

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/loading/factory.cc

    r4261 r4487  
    3030   set everything to zero and define factoryName
    3131*/
    32 Factory::Factory (const char* name)
     32Factory::Factory (const char* factoryName)
    3333{
    3434  this->factoryName = NULL;
    35   this->setFactoryName(name);
     35  this->setFactoryName(factoryName);
    3636  next = NULL;
    3737 
     
    5151  if (this->next)
    5252    delete this->next;
     53
     54  if (this->factoryName)
     55    delete []this->factoryName;
    5356}
    5457
    55 void Factory::setFactoryName(const char* name)
     58/**
     59   \brief sets the name of this factory
     60*/
     61void Factory::setFactoryName(const char* factoryName)
    5662{
    57   if (factoryName)
    58     delete factoryName;
    59   factoryName = new char[strlen(name)+1];
    60   strcpy(factoryName, name);
     63  if (this->factoryName)
     64    delete this->factoryName;
     65  this->factoryName = new char[strlen(factoryName)+1];
     66  strcpy(this->factoryName, factoryName);
    6167}
    6268
     
    8894}
    8995
    90 const char* grabParameter(const TiXmlElement* root, const char* name)
     96/**
     97   \param root: The XML-element to grab a parameter from
     98   \param parameterName: the parameter to grab
     99   \returns the Value of the parameter if found, NULL otherwise
     100*/
     101const char* grabParameter(const TiXmlElement* root, const char* parameterName)
    91102{
    92103  const TiXmlElement* element;
     
    95106  if (root == NULL)
    96107    return NULL;
    97   assert( name != NULL);
     108  assert( parameterName != NULL);
    98109       
    99   element = root->FirstChildElement( name);
     110  element = root->FirstChildElement( parameterName);
    100111  if( element == NULL) return NULL;
    101112       
Note: See TracChangeset for help on using the changeset viewer.