- Timestamp:
- Apr 27, 2006, 4:08:46 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command.cc
r7394 r7397 162 162 { 163 163 // CHECK FOR ALIAS 164 std::vector<ShellCommandAlias*>:: iterator alias;165 for (alias = ShellCommandAlias:: aliasList.begin(); alias != ShellCommandAlias::aliasList.end(); alias++ )164 std::vector<ShellCommandAlias*>::const_iterator alias; 165 for (alias = ShellCommandAlias::getAliases().begin(); alias != ShellCommandAlias::getAliases().end(); alias++ ) 166 166 { 167 167 if (inputSplits.getString(0) == (*alias)->getName() && (*alias)->getCommand() != NULL && … … 271 271 { 272 272 ShellCommandAlias* aliasCMD = new ShellCommandAlias(alias, this); 273 ShellCommandAlias::aliasList.push_back(aliasCMD);274 273 this->alias = aliasCMD; 275 274 } … … 333 332 334 333 334 /** 335 * @param aliasName the name of the Alias 336 * @param command the Command, to associate this alias with 337 */ 335 338 ShellCommandAlias::ShellCommandAlias(const std::string& aliasName, ShellCommand* command) 336 339 { -
trunk/src/lib/shell/shell_command.h
r7389 r7397 85 85 86 86 private: 87 ShellCommandClass* shellClass; 88 ShellCommandAlias* alias; 87 ShellCommandClass* shellClass; //!< A Pointer to the Shell-Class this Command belongs to. 88 ShellCommandAlias* alias; //!< An Alias for the Class. 89 89 90 std::string description; 91 Executor* executor; 90 std::string description; //!< A description for this commnand. (initially ""). Assigned with (create)->describe("blablabla"); 91 Executor* executor; //!< The Executor, that really executes the Function. 92 92 }; 93 93 … … 95 95 class ShellCommandAlias 96 96 { 97 friend class ShellCommand;98 97 public: 98 ShellCommandAlias(const std::string& aliasName, ShellCommand* command); 99 ~ShellCommandAlias(); 100 99 101 /** @returns the Name of the Alias. */ 100 102 const std::string& getName() const { return this->aliasName; }; … … 102 104 ShellCommand* getCommand() const { return this->command; }; 103 105 static bool getCommandListOfAlias(std::list<std::string>& stringList); 106 static const std::vector<ShellCommandAlias*>& getAliases() { return ShellCommandAlias::aliasList; }; 104 107 105 private:106 /** @param aliasName the name of the Alias @param command the Command, to associate this alias with */107 ShellCommandAlias(const std::string& aliasName, ShellCommand* command);108 ~ShellCommandAlias();109 108 private: 110 109 std::string aliasName; //!< the name of the Alias
Note: See TracChangeset
for help on using the changeset viewer.