FACT++
1.0
|
|
protectedvirtual |
Functions dealing with auto completion.
If fCompletion==0 the default is to call readline's rl_filename_completion_function. Otherwise the contents of fCompletion are returned. To change fCompletion either initialize it via SetCompletion() (in this case you must ensure the life time of the object) or call Complete(const vector<string>&, const char*) from Completion(const char * int, int)
This is the so called generator function, the readline manual says about this function:
The generator function is called repeatedly from rl_completion_matches(), returning a string each time. The arguments to the generator function are text and state. text is the partial word to be completed. state is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for each subsequent call. The generator function returns (char *)NULL to inform rl_completion_matches() that there are no more possibilities left. Usually the generator function computes the list of possible completions when state is zero, and returns them one at a time on subsequent calls. Each string the generator function returns as a match must be allocated with malloc(); Readline frees the strings when it has finished with them.
Definition at line 477 of file Readline.cc.
References Compare(), and fCompletion.
Referenced by CompleteImp(), and SetCompletion().