Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7717 in orxonox.OLD


Ignore:
Timestamp:
May 19, 2006, 2:51:00 AM (18 years ago)
Author:
bensch
Message:

trunk: clone-functions

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/executor/executor_functional.h

    r7716 r7717  
    9191    this->functorType = Executor_Objective;
    9292    this->functionPointer = functionPointer;
    93   }
     93  };
     94
    9495  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
    9596  {
     
    9798  };
    9899
    99   Executor* clone() const { };
     100  virtual Executor* clone() const {
     101    return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(this->functionPointer);
     102  };
    100103};
    101104
     
    112115    this->functorType = Executor_Objective;
    113116    this->functionPointer = functionPointer;
    114   }
     117  };
     118
    115119  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
    116120  {
     
    125129  };
    126130
    127   virtual Executor* clone() const {};
     131  virtual Executor* clone() const {
     132    return  new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0>(this->functionPointer);
     133  };
    128134};
    129135
     
    140146    this->functorType = Executor_Objective;
    141147    this->functionPointer = functionPointer;
    142   }
     148  };
     149
    143150  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
    144151  {
     
    148155  };
    149156
    150   virtual Executor* clone() const {};
     157  virtual Executor* clone() const {
     158    return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0, type1>(this->functionPointer);
     159  };
    151160};
    152161
  • trunk/src/orxonox.cc

    r7716 r7717  
    435435};
    436436
    437 template<class T> Executor* createExecutorStatic(void (*functionPointer)())
    438  {
    439    return new Executor0Params_static<TestClass>(functionPointer);
    440  }
    441 
    442437void TEST()
    443438{
Note: See TracChangeset for help on using the changeset viewer.