Changeset 7272 for code/branches/consolecommands3
- Timestamp:
- Aug 30, 2010, 10:09:08 PM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/core/command
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.cc
r7270 r7272 163 163 { 164 164 this->executor_ = executor; 165 this->objectStack_.clear(); 165 166 return true; 166 167 } … … 180 181 else if (functor) 181 182 this->executor_ = createExecutor(functor); 183 this->objectStack_.clear(); 182 184 183 185 return true; … … 196 198 if (command.executor_) 197 199 command.functor_ = this->executor_->getFunctor(); 200 command.objectStack_ = this->objectStack_; 198 201 199 202 if (this->setFunction(executor, bForce)) … … 207 210 if (command.executor_) 208 211 command.functor_ = this->executor_->getFunctor(); 212 command.objectStack_ = this->objectStack_; 209 213 210 214 if (this->setFunction(functor, bForce)) … … 232 236 if (command.executor_) 233 237 this->executor_->setFunctor(command.functor_); 238 this->objectStack_ = command.objectStack_; 234 239 } 235 240 … … 238 243 if (this->executor_) 239 244 this->executor_->setFunctor(0); 245 this->objectStack_.clear(); 240 246 } 241 247 … … 267 273 void* oldobject = this->getObject(); 268 274 if (this->setObject(object)) 269 this->objectStack_.push (oldobject);275 this->objectStack_.push_back(oldobject); 270 276 } 271 277 … … 275 281 if (!this->objectStack_.empty()) 276 282 { 277 newobject = this->objectStack_. top();278 this->objectStack_.pop ();283 newobject = this->objectStack_.back(); 284 this->objectStack_.pop_back(); 279 285 } 280 286 this->setObject(newobject); -
code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.h
r7270 r7272 33 33 34 34 #include <stack> 35 #include <vector> 35 36 #include <boost/preprocessor/cat.hpp> 36 37 #include <boost/preprocessor/facilities/expand.hpp> … … 98 99 ExecutorPtr executor_; 99 100 FunctorPtr functor_; 101 std::vector<void*> objectStack_; 100 102 }; 101 103 … … 317 319 ExecutorPtr executor_; 318 320 std::stack<Command> commandStack_; 319 std:: stack<void*> objectStack_;321 std::vector<void*> objectStack_; 320 322 321 323 ArgumentCompleter* argumentCompleter_[5];
Note: See TracChangeset
for help on using the changeset viewer.