- Timestamp:
- Apr 26, 2006, 2:29:15 AM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion.cc
r7372 r7373 23 23 24 24 #include "substring.h" 25 #include "base_object.h"26 25 #include "class_list.h" 27 26 #include "debug.h" 28 29 #include "stdlibincl.h"30 27 31 28 using namespace std; … … 221 218 222 219 CompletionType changeType = NullCompletion; 223 list<CompletionElement>::iterator charIT;220 std::vector<CompletionElement>::iterator charIT; 224 221 for (charIT = completionList.begin(); charIT != completionList.end(); charIT++) 225 222 { -
trunk/src/lib/shell/shell_completion.h
r7372 r7373 10 10 #define _SHELL_COMPLETION_H 11 11 12 #include <vector> 12 13 #include <list> 13 14 #include <string> … … 21 22 22 23 23 //! A class for ... 24 class ShellCompletion { 24 //! A class for Completing the an InputString. 25 class ShellCompletion 26 { 25 27 26 28 //! an enumerator for different types the Shell can complete. … … 33 35 } CompletionType; 34 36 35 //! A struct for ShellElements (these are used as containers to identify an Input for what it is) 36 struct CompletionElement{ 37 //! A struct for ShellElements (these are used as containers to identify an Input for what it is) 38 struct CompletionElement 39 { 37 40 std::string name; //!< the Name of the Element to be completed. 38 41 CompletionType type; //!< the type of the Element 39 42 }; 40 43 41 44 public: 42 45 ShellCompletion(); 43 46 virtual ~ShellCompletion(); 44 47 48 49 // Functions to produce the Complete Lists. 45 50 bool autoComplete(std::string& input); 46 51 bool classComplete(const std::string& classBegin); 47 // long classMatch(const char* input, unsigned int* length);52 // long classMatch(const char* input, unsigned int* length); 48 53 bool objectComplete(const std::string& objectBegin, long classID); 49 // bool objectMatch(const char* objectBegin, long classID, unsigned int* length);54 // bool objectMatch(const char* objectBegin, long classID, unsigned int* length); 50 55 bool functionComplete(const std::string& functionBegin, const std::string& className); 51 // bool functionMatch(const char* functionBegin, long classID, unsigned int* length);56 // bool functionMatch(const char* functionBegin, long classID, unsigned int* length); 52 57 bool aliasComplete(const std::string& aliasBegin); 53 58 … … 61 66 void clearCompletionList(); 62 67 68 69 // Helpers. 63 70 static const std::string& ShellCompletion::typeToString(ShellCompletion::CompletionType type); 64 71 65 66 std::list<CompletionElement>completionList; //!< A list of completions, that are io.72 private: 73 std::vector<CompletionElement> completionList; //!< A list of completions, that are io. 67 74 68 69 static const std::string typeNames[]; //!< A list of Completion-Type-Names. 75 static const std::string typeNames[]; //!< A list of Completion-Type-Names. 70 76 }; 71 77
Note: See TracChangeset
for help on using the changeset viewer.