Public Member Functions | |
int | Complete (tString &string, unsigned pos) |
Attempts the completion. | |
gAutoCompleterConsole (std::deque< tString > &words) |
Definition at line 580 of file gMenus.cpp.
gAutoCompleterConsole::gAutoCompleterConsole | ( | std::deque< tString > & | words | ) | [inline] |
int gAutoCompleterConsole::Complete | ( | tString & | string, | |
unsigned | pos | |||
) | [inline, virtual] |
Attempts the completion.
string | the string in which the completion should take place | |
pos | the cursor position |
Reimplemented from uAutoCompleter.
Definition at line 582 of file gMenus.cpp.
References uAutoCompleter::Complete(), tConfItemBase::FindConfigItem(), and tConfItemBase::WriteVal().
00582 { 00583 if(string.find_first_of(' ') == pos - 1) { 00584 tConfItemBase *cfg = tConfItemBase::FindConfigItem(string.substr(0, pos-1)); 00585 if(cfg != 0) { 00586 std::ostringstream toAdd(""); 00587 cfg->WriteVal(toAdd); 00588 string << toAdd.str(); 00589 return string.size(); 00590 } 00591 } 00592 //delegate 00593 return uAutoCompleter::Complete(string, pos); 00594 }