eAutoCompleterChat Class Reference

Completer with the addition that it adds a : to a fully completed name if it's at the beginning of the line. More...

Inheritance diagram for eAutoCompleterChat:

Inheritance graph
[legend]
Collaboration diagram for eAutoCompleterChat:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 eAutoCompleterChat (std::deque< tString > &words)
int DoFullCompletion (tString &string, int pos, int len, tString &match)
 Replaces the word the cursor is on by the given match and a space.
tString Simplify (tString const &str)
 Simplifies a string, by default converts it to lowercase.


Detailed Description

Completer with the addition that it adds a : to a fully completed name if it's at the beginning of the line.

Definition at line 3379 of file ePlayer.cpp.


Constructor & Destructor Documentation

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

Constructor

Parameters:
words the possible completions

Definition at line 3383 of file ePlayer.cpp.


Member Function Documentation

int eAutoCompleterChat::DoFullCompletion ( tString string,
int  pos,
int  len,
tString match 
) [inline, virtual]

Replaces the word the cursor is on by the given match and a space.

Parameters:
string the string in which the completion should take place
pos the position in string where the replaced word ends
len the length of the word that is already there
match the string that will be inserted into the other one
Returns:
the new cursor position

Reimplemented from uAutoCompleter.

Definition at line 3384 of file ePlayer.cpp.

03385                                                 :uAutoCompleter(words) {};
03386     int DoFullCompletion(tString &string, int pos, int len, tString &match) {
03387         tString actualString;
03388         if(pos - len == 0 || pos - len == 6 && string.StartsWith("/team ")) {
03389             actualString = match + ": ";
03390         } else if(pos - len == 5 && string.StartsWith("/msg ") || string.StartsWith("/admin ")) {
03391             actualString = Simplify(match) + " ";
03392         } else {
03393             actualString = match + " ";
03394         }

tString eAutoCompleterChat::Simplify ( tString const &  str  )  [inline, virtual]

Simplifies a string, by default converts it to lowercase.

Parameters:
str the string to simplify
Returns:
the simplified string(in this case everything converted to lowercase)

Reimplemented from uAutoCompleter.

Definition at line 3395 of file ePlayer.cpp.

03397                                          {


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