- Timestamp:
- Aug 27, 2010, 2:41:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h
r7221 r7228 32 32 #include "core/CorePrereqs.h" 33 33 34 #include <map>35 #include <set>36 34 #include <string> 37 35 … … 46 44 // tolua_end 47 45 public: 48 static boolexecute(const std::string& command, bool useTcl = true); // tolua_export46 static int execute(const std::string& command, bool useTcl = true); // tolua_export 49 47 50 static MultiType queryMT(const std::string& command, bool* success = 0, bool useTcl = true); 51 static std::string query(const std::string& command, bool* success = 0, bool useTcl = true); // tolua_export 52 53 static std::string complete(const std::string& command); 54 static std::string hint(const std::string& command); 48 static MultiType queryMT(const std::string& command, int* error = 0, bool useTcl = true); 49 static std::string query(const std::string& command, int* error = 0, bool useTcl = true); // tolua_export 55 50 56 51 static CommandEvaluation evaluate(const std::string& command); 52 53 static const int Success = 0; 54 static const int Error = 1; 55 static const int Incomplete = 2; 56 static const int Deactivated = 3; 57 static const int Denied = 4; 58 59 static void _autocomplete(const std::string& group, const std::string& name) {} 57 60 58 61 private: … … 62 65 63 66 static CommandExecutor& getInstance(); 64 static CommandEvaluation& getEvaluation();65 66 static void parseIfNeeded(const std::string& command);67 static void parse(const std::string& command, bool bInitialize = true);68 69 static unsigned int argumentsFinished();70 static unsigned int argumentsGiven();71 static bool enoughArgumentsGiven(_ConsoleCommand* command);72 static const std::string& getArgument(unsigned int index);73 static const std::string& getLastArgument();74 75 static void createListOfPossibleIdentifiers(const std::string& fragment);76 static void createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier = 0);77 static void createListOfPossibleArguments(const std::string& fragment, _ConsoleCommand* command, unsigned int param);78 79 static Identifier* getPossibleIdentifier(const std::string& name);80 static _ConsoleCommand* getPossibleCommand(const std::string& name, Identifier* identifier = 0);81 static const std::string& getPossibleArgument(const std::string& name, _ConsoleCommand* command, unsigned int param);82 83 static void createArgumentCompletionList(_ConsoleCommand* command, unsigned int param);84 static std::string getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list);85 static std::string getCommonBegin(const ArgumentCompletionList& list);86 87 CommandEvaluation evaluation_;88 67 }; // tolua_export 89 68 } // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.