[4838] | 1 | /*! |
---|
[5170] | 2 | * @file shell_completion.h |
---|
| 3 | * @brief The Shell Completion Tasks |
---|
[3245] | 4 | */ |
---|
[1853] | 5 | |
---|
[5170] | 6 | #ifndef _SHELL_COMPLETION_H |
---|
| 7 | #define _SHELL_COMPLETION_H |
---|
[1853] | 8 | |
---|
[4838] | 9 | // FORWARD DECLARATION |
---|
[5178] | 10 | class BaseObject; |
---|
[5181] | 11 | class ShellInput; |
---|
[5178] | 12 | template<class T> class tList; |
---|
| 13 | #ifndef NULL |
---|
| 14 | #define NULL 0 //!< a pointer to NULL |
---|
| 15 | #endif |
---|
[3543] | 16 | |
---|
[3955] | 17 | //! A class for ... |
---|
[5170] | 18 | class ShellCompletion { |
---|
[1853] | 19 | |
---|
[1904] | 20 | public: |
---|
[5182] | 21 | ShellCompletion(ShellInput* input = NULL); |
---|
[5170] | 22 | virtual ~ShellCompletion(); |
---|
[1853] | 23 | |
---|
[5184] | 24 | bool autoComplete(ShellInput* input = NULL); |
---|
[5178] | 25 | bool classComplete(const char* classBegin); |
---|
[5183] | 26 | long classMatch(const char* input, unsigned int* length); |
---|
[5178] | 27 | bool objectComplete(const char* objectBegin, long classID); |
---|
[5183] | 28 | bool objectMatch(const char* objectBegin, long classID, unsigned int* length); |
---|
[5178] | 29 | bool functionComplete(const char* functionBegin); |
---|
[5183] | 30 | bool functionMatch(const char* functionBegin, long classID, unsigned int* length); |
---|
[3245] | 31 | |
---|
[5178] | 32 | bool generalComplete(const tList<const char>* stringList, const char* begin, const char* displayAs = "%s", const char* addBack = NULL, const char* addFront = NULL); |
---|
| 33 | |
---|
| 34 | const tList<const char>* createCompleteList(const tList<const char>* inputList, const char* classNameBegin); |
---|
| 35 | const tList<const char>* createCompleteList(const tList<BaseObject>* inputList, const char* classNameBegin); |
---|
| 36 | // const tList<const char>* createCompleteList(const tList<ShellCommandBase>* inputList, const char* classNameBegin); |
---|
| 37 | |
---|
| 38 | |
---|
[3245] | 39 | private: |
---|
[5178] | 40 | tList<const char>* completionList; //!< A list of completions, that are io. |
---|
[5182] | 41 | ShellInput* input; |
---|
[1853] | 42 | }; |
---|
| 43 | |
---|
[5170] | 44 | #endif /* _SHELL_COMPLETION_H */ |
---|