1 | /*! |
---|
2 | * @file shell_completion.h |
---|
3 | * @brief The Shell Completion Tasks |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _SHELL_COMPLETION_H |
---|
7 | #define _SHELL_COMPLETION_H |
---|
8 | |
---|
9 | // FORWARD DECLARATION |
---|
10 | class BaseObject; |
---|
11 | class ShellInput; |
---|
12 | template<class T> class tList; |
---|
13 | #ifndef NULL |
---|
14 | #define NULL 0 //!< a pointer to NULL |
---|
15 | #endif |
---|
16 | |
---|
17 | //! A class for ... |
---|
18 | class ShellCompletion { |
---|
19 | |
---|
20 | public: |
---|
21 | ShellCompletion(ShellInput* input = NULL); |
---|
22 | virtual ~ShellCompletion(); |
---|
23 | |
---|
24 | bool autoComplete(ShellInput* input); |
---|
25 | bool classComplete(const char* classBegin); |
---|
26 | long classMatch(const char* input, unsigned int* length); |
---|
27 | bool objectComplete(const char* objectBegin, long classID); |
---|
28 | bool objectMatch(const char* objectBegin, long classID, unsigned int* length); |
---|
29 | bool functionComplete(const char* functionBegin); |
---|
30 | bool functionMatch(const char* functionBegin, long classID, unsigned int* length); |
---|
31 | |
---|
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 | |
---|
39 | private: |
---|
40 | tList<const char>* completionList; //!< A list of completions, that are io. |
---|
41 | ShellInput* input; |
---|
42 | }; |
---|
43 | |
---|
44 | #endif /* _SHELL_COMPLETION_H */ |
---|