Changeset 7270 for code/branches/consolecommands3/src/libraries
- Timestamp:
- Aug 30, 2010, 7:52:33 PM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/core/command
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.cc
r7267 r7270 193 193 { 194 194 Command command; 195 command.executor_ = this-> getExecutor();195 command.executor_ = this->executor_; 196 196 if (command.executor_) 197 command.functor_ = this-> getExecutor()->getFunctor();197 command.functor_ = this->executor_->getFunctor(); 198 198 199 199 if (this->setFunction(executor, bForce)) … … 204 204 { 205 205 Command command; 206 command.executor_ = this-> getExecutor();206 command.executor_ = this->executor_; 207 207 if (command.executor_) 208 command.functor_ = this-> getExecutor()->getFunctor();208 command.functor_ = this->executor_->getFunctor(); 209 209 210 210 if (this->setFunction(functor, bForce)) -
code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.h
r7267 r7270 142 142 { if (this->command_) { this->command_->setFunction(executor, bForce); } return *this; } 143 143 144 inline ConsoleCommandManipulator& pushFunction() 145 { if (this->command_) { this->command_->pushFunction(); } return *this; } 144 146 template <class F> 145 147 inline ConsoleCommandManipulator& pushFunction(F function, bool bForce = false) -
code/branches/consolecommands3/src/libraries/core/command/Executor.cc
r7265 r7270 44 44 this->functor_ = functor; 45 45 this->name_ = name; 46 } 47 48 Executor::Executor(const Executor& other) : name_(other.name_), defaultValue_(other.defaultValue_) 49 { 50 this->functor_ = other.functor_->clone(); 46 51 } 47 52 -
code/branches/consolecommands3/src/libraries/core/command/Executor.h
r7230 r7270 44 44 public: 45 45 Executor(const FunctorPtr& functor, const std::string& name = ""); 46 Executor(const Executor& other); 46 47 virtual ~Executor(); 47 48 -
code/branches/consolecommands3/src/libraries/core/command/Functor.h
r7242 r7270 85 85 public: 86 86 virtual MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0; 87 88 virtual FunctorPtr clone() = 0; 87 89 88 90 virtual Type::Enum getType() const = 0; … … 269 271 } 270 272 273 FunctorPtr clone() 274 { 275 return new FunctorTemplate(*this); 276 } 277 271 278 void evaluateParam(unsigned int index, MultiType& param) const 272 279 {
Note: See TracChangeset
for help on using the changeset viewer.