|
rlmm::basic_completion< Lock > Struct Template Reference |
Public Types | |
typedef std::list< std::string > | string_list |
enum | match { none, single, multiple } |
enum | type { unknown, normal, list, partial, insert } |
Public Member Functions | |
basic_completion () | |
virtual | ~basic_completion () |
virtual string_list | matches (const std::string &what) |
virtual std::string | filename_complete (const std::string &what) |
virtual std::string | username_complete (const std::string &what) |
virtual void | max_before_query (int max=100) |
virtual int | max_before_query () |
virtual void | word_breakers (const std::string &breakers) |
virtual const std::string & | word_breakers () const |
virtual void | quoters (const std::string "ers) |
virtual const std::string & | quoters () const |
virtual void | filename_quoters (const std::string "e) |
virtual const std::string & | filename_quoters () const |
virtual void | special_prefix (const std::string &prefix) |
virtual const std::string & | special_prefix () const |
virtual void | append_character (char append=' ') |
virtual char | append_character () const |
virtual void | ignore_duplicates (bool ignore) |
virtual bool | ignore_duplicates () const |
virtual void | inhibit (bool inhibit=false) |
virtual bool | inhibit () const |
virtual void | filename_match (bool isfiles=true) |
virtual bool | filename_match () const |
virtual void | quote_match (bool isquote=true) |
virtual bool | quote_match () const |
virtual void | completion_done (bool isover=true) |
virtual bool | completion_done () const |
virtual void | completion_type (type t) |
virtual type | completion_type (void) const |
Protected Member Functions | |
virtual bool | internal (type t) |
virtual void | possibilities (const std::string &what) |
virtual std::string | completer (const std::string &what, int state) |
virtual string_list | alternate_completer (const std::string &what, int start, int end) |
virtual std::string | quote_filename (const std::string &filename, match m, std::string::size_type &start) |
virtual std::string | dequote_filename (const std::string &filename, std::string::size_type &start) |
virtual bool | quoted (const std::string &what, std::string::size_type where) const |
virtual bool | remove_completions (const std::string &substring, string_list &matches) |
virtual bool | directory_hook (std::string &dirname, const std::string &basename) |
virtual bool | display_hook (string_list &matches, int width) |
virtual std::string | complete (const std::string &what) |
Static Protected Member Functions | |
static int | type2internal (type t) |
static type | internal2type (int t) |
Protected Attributes | |
int | _state |
int | _max_before_query |
std::string | _word_breakers |
std::string | _quoters |
std::string | _filename_quoters |
std::string | _special_prefix |
char | _append_character |
bool | _ignore_duplicates |
bool | _inhibit |
Private Member Functions | |
void | do_activate () |
void | do_deactivate () |
Friends | |
class | one_at_a_time |
char * | rlmm_completer (const char *, int) |
char ** | rlmm_alternate_completer (const char *, int, int) |
char * | rlmm_filename_quote (char *, int, char *) |
char * | rlmm_filename_dequote (char *, int) |
int | rlmm_quoted (char *, int) |
int | rlmm_remove (char **) |
int | rlmm_directory_hook (char **) |
void | rlmm_display_hook (char **, int, int) |
|
List of strings.
|
|
What kind of match.
|
|
What kind of completion.
|
|
CTOR.
|
|
DTOR.
|
|
Abstract alternate completion to try first.
|
|
the character to the completions.
|
|
the character to the completions.
|
|
Abstract member function to be overloaded by user. This should return a possible match to what, or the empty string if there's no (more) possible matches. This member function is called repeatedly during completion of a single what. If the member function Possilibities uses a STL container like stack (LIFO) or deque (FIFO), then this member function could simply pop the head of that container.
|
|
Member function that delegates to complete and possibilities.
|
|
Wether the completion is flaged as over. Note that this member function only makes sense in the AlternativeComplete member function.
|
|
Flag the completion as done. Sending this message causes readline to stop doing completions. This should be called from AlternativeComplete only - it has no effect elsewhere.
|
|
the current completion type. See the completionType(char) member function for a list of possible return values.
|
|
the completion action type. the internal flag for what kind of completion is to be done.
|
|
De-quote a file name.
|
|
Hook for manipulating directory part of a file. The method is called when completing a file name. The hook may change the directory part of it's argument. If it modifies it, it must return true, otherwise false. It may not modify the filename part
|
|
Method to display the completions. This member function is called when readline is about to display a list of possible matches. The sub-classes can redefine this method to do tricky stuff in the output.
|
|
Install a new completion handler.
Implements rlmm::one_at_a_time< basic_completion, Lock >. |
|
Remove a completion handler.
Implements rlmm::one_at_a_time< basic_completion, Lock >. |
|
Complete a file name.
|
|
Wether matches are filenames. Note that this member function only makes sense in the Complete function.
|
|
Flag the completions as filenames. Sending this message tells readline, that the completion matches are to be treated as filenames. This member function does not have any effect outside of the Complete member function.
|
|
Characters that forces quotation of a filename.
|
|
Characters that forces quotation of a filename.
|
|
wether to ignore duplicates or not
|
|
wether to ignore duplicates or not
|
|
wether to ineibit completion or not
|
|
wether to inheibit completion or not
|
|
Call the internal completion function. The actual action taken depends on the type argument. This member function only really makes sense within the Completer, Complete, and Possibilities member functions.
|
|
transform internal representation to type enum.
|
|
Return a list of possible matches. First element is the replacement text (if any) for what, possibly what itself.
|
|
the maximum number of items before query.
|
|
Set the maximum number of items before query. This method sets the maximum number of items that the completion will show without querying the user if she wants to see the completions.
|
|
Abstract mmember function to be overloaded by user. This should setup a list of possible matches to what. A STL stack, deque, or similar is a good candidate.
|
|
Quote a file name.
|
|
Wether mathces are to be quoted. Note that this member function only makes sense in the Complete member function.
|
|
Flag filename to be quoted. Sending this message from the Complete member function will prompt readline to quote the filename using the QuoteFilename member function. This message has no effect outside of the Complete function.
|
|
Decide wether a character is quoted. This method should be overloaded by the user. If the character at the index postion in the passed string is quoted according to the quoting scheme, this should return true.
|
|
Characters that quote.
|
|
characters that quote.
|
|
Remove matches from list of matches. This member function is called with the a list of possible matches after completion. The user can overload this member function to alter the list if some completions are undesirable.
|
|
the word break characters to be left in match text.
|
|
the word break characters to be left in match text.
|
|
transform type enum to internal representation.
|
|
Complete a user name.
|
|
Get characters that break words.
|
|
Set Characters that break words.
|
|
Base class is a friend.
|
|
Inteface function.
|
|
Interface function for completion.
|
|
|
|
Hook to run when displaying possible completions.
|
|
Unquote a file name.
|
|
Quite a file name.
|
|
Check if what is quoted.
|
|
Filter matches.
|
|
Append this character to the completions.
|
|
Characters that forces quotation of a filename.
|
|
Wether to ignore duplicates or not.
|
|
Wether to inheibit completion or not.
|
|
Maximum number of items to display before prompting.
|
|
Characters that quote.
|
|
Word break characters to be left in match text.
|
|
The state argument that completer was called with.
|
|
Characters that break words.
|