Changeset 7861 for code/trunk/src/libraries/core/input/InputCommands.h
- Timestamp:
- Feb 12, 2011, 11:54:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/input/InputCommands.h
r7284 r7861 58 58 virtual ~BaseCommand() { } 59 59 virtual bool execute(float abs = 1.0f, float rel = 1.0f) = 0; 60 virtual CommandEvaluation* getEvaluation() = 0; 60 61 }; 61 62 … … 64 65 public: 65 66 bool execute(float abs = 1.0f, float rel = 1.0f); 67 CommandEvaluation* getEvaluation(); 66 68 67 69 CommandEvaluation evaluation_; … … 79 81 } 80 82 83 /// Returns a pointer to the encapsuled evaluation. 84 inline CommandEvaluation* SimpleCommand::getEvaluation() 85 { 86 return &this->evaluation_; 87 } 88 81 89 class _CoreExport ParamCommand : public BaseCommand 82 90 { … … 84 92 ParamCommand() : scale_(1.0f), paramCommand_(0) { } 85 93 bool execute(float abs = 1.0f, float rel = 1.0f); 94 CommandEvaluation* getEvaluation(); 86 95 87 96 float scale_; 88 97 BufferedParamCommand* paramCommand_; 89 98 }; 99 100 /// Returns a pointer to the encapsuled evaluation. 101 inline CommandEvaluation* ParamCommand::getEvaluation() 102 { 103 if (this->paramCommand_) 104 return &this->paramCommand_->evaluation_; 105 else 106 return 0; 107 } 90 108 } 91 109
Note: See TracChangeset
for help on using the changeset viewer.