Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7721 in orxonox.OLD for trunk/src/lib/util/loading


Ignore:
Timestamp:
May 19, 2006, 4:05:41 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: introduced the absolutely new, much faster, more templated, and easier to look at Executor, and use it directly inside the LoadParam-Class

Location:
trunk/src/lib/util/loading
Files:
2 edited

Legend:

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

    r7474 r7721  
    2828 * @param executor the Executor, that executes the loading procedure.
    2929 */
    30 CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, const Executor& executor, bool inLoadCycle)
     30CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor* executor, bool inLoadCycle)
    3131  :  paramName(paramName), object(object)
    3232{
     
    4343
    4444  // set the Executor.
    45   this->executor = executor.clone();
     45  this->executor = executor;
    4646
    4747  //if (this->executor)
  • trunk/src/lib/util/loading/load_param.h

    r7221 r7721  
    2525
    2626#include "executor/executor.h"
     27
     28/// HACK HACK TAKE THIS INTO THE EXECUTOR
     29#include "executor/executor_functional.h"
     30#define EXECUTOR_FUNCTIONAL_USE_STATIC
     31#include "executor/executor_functional.h"
     32
    2733#include "executor/executor_specials.h"
    2834
     
    4551 */
    4652#define LoadParam(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
    47          CLoadParam(ROOT, PARAMETER_NAME, OBJECT, ExecutorObjective<CLASS>(&CLASS::FUNCTION), false)
     53         CLoadParam(ROOT, PARAMETER_NAME, OBJECT, createExecutor<CLASS>(&CLASS::FUNCTION), false)
    4854
    4955#define LoadParam_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
    50          CLoadParam(ROOT, PARAMETER_NAME, OBJECT, ExecutorObjective<CLASS>(&CLASS::FUNCTION), true)
     56         CLoadParam(ROOT, PARAMETER_NAME, OBJECT, createExecutor<CLASS>(&CLASS::FUNCTION), true)
    5157
    5258#define LoadParamXML(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
    53          CLoadParam(ROOT, PARAMETER_NAME, OBJECT, ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), false)
     59         CLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), false)
    5460
    5561#define LoadParamXML_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
    56          CLoadParam(ROOT, PARAMETER_NAME, OBJECT, ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), true)
     62         CLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), true)
    5763
    5864
     
    8793{
    8894  public:
    89     CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, const Executor& executor, bool inLoadCycle = false);
     95    CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor* executor, bool inLoadCycle = false);
    9096    virtual ~CLoadParam();
    9197
Note: See TracChangeset for help on using the changeset viewer.