FACT++  1.0
char ** Readline::Complete ( const std::vector< std::string > &  v,
const char *  text 
)
protected

The given vector should be a reference to a vector of strings containing all possible matches. The actual match-making is then done in Complete(const char *, int)

The pointer fCompletion is redirected to the vector for the run time of the function, but restored afterwards. So by this you can set a default completion list in case Complete is not called or Completion not overloaded.

Parameters
vreference to a vector of strings with all possible matches
textthe text which should be matched (it is just propagated to Readline::Completion)

Definition at line 439 of file Readline.cc.

References CompleteImp(), fCompletion, and save().

440 {
441  const vector<string> *save = fCompletion;
442 
443  fCompletion = &v;
444  char **rc = rl_completion_matches(const_cast<char*>(text), CompleteImp);
445  fCompletion = save;
446 
447  return rc;
448 }
static char * CompleteImp(const char *text, int state)
Calls Complete()
Definition: Readline.cc:500
const std::vector< std::string > * fCompletion
Pointer to a list of possible matched for auto-completion.
Definition: Readline.h:63
function save()
Definition: index.js:502

+ Here is the call graph for this function: