gAutoCompleterConsole Class Reference

Inheritance diagram for gAutoCompleterConsole:

Inheritance graph
[legend]
Collaboration diagram for gAutoCompleterConsole:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int Complete (tString &string, unsigned pos)
 Attempts the completion.
 gAutoCompleterConsole (std::deque< tString > &words)


Detailed Description

Definition at line 580 of file gMenus.cpp.


Constructor & Destructor Documentation

gAutoCompleterConsole::gAutoCompleterConsole ( std::deque< tString > &  words  )  [inline]

Definition at line 595 of file gMenus.cpp.

00595 : uAutoCompleter(words) {}


Member Function Documentation

int gAutoCompleterConsole::Complete ( tString string,
unsigned  pos 
) [inline, virtual]

Attempts the completion.

Parameters:
string the string in which the completion should take place
pos the cursor position
Returns:
the new 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     }

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Sat Mar 15 23:33:48 2008 for Armagetron Advanced by  doxygen 1.5.4