Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5645 in orxonox.OLD for trunk/src/util/loading/load_param.cc


Ignore:
Timestamp:
Nov 19, 2005, 9:48:38 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: first Element gets loaded through the new LoadParam procedure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/loading/load_param.cc

    r5634 r5645  
    3535{
    3636  this->setClassID(CL_LOAD_PARAM, "LoadParam");
     37  this->executor = NULL;
    3738
    3839  this->loadString = NULL;
     
    106107}
    107108
     109LoadParamBase::LoadParamBase(const TiXmlElement* root, const char* paramName, BaseObject* object, const Executor& executor)
     110{
     111  this->loadString = grabParameter(root, paramName);
     112
     113  if (loadString != NULL && root != NULL)
     114  {
     115    this->executor = executor.clone();
     116    this->executor->execute(object, loadString);
     117  }
     118  else
     119  {
     120    this->executor = NULL;
     121  }
     122}
     123LoadParamBase::~LoadParamBase()
     124{
     125  if (likely(this->executor != NULL))
     126    delete this->executor;
     127
     128}
     129
     130
     131
    108132/**
    109133 * @param descriptionText The text to set as a description for this Parameter
Note: See TracChangeset for help on using the changeset viewer.