Public Methods |
| BasicEngine () |
PWCHAR | to_send () |
| returns a pointer to the ToSend buffer.
|
bool | InANumber () const |
| Since numbers are handled differently than other characters (i.e., they're converted as a group), we need to know if we're in a number state.
|
void | resetNumState () |
| we are no longer in a number state.
|
void | setExcelMode (bool wh) |
| sets the protected member isExcel to remember whether we are in Excel.
|
bool | inExcelMode () |
| While in Excel, we have to always repaste the contents of the entire cell as new characters are typed, so remember whether or not we are in Excel.
|
void | reset () |
| resets character buffer, number buffer, and 2 boolean states.
|
void | clearToSend () |
| empties the ToSend buffer.
|
void | shift_left () |
| removes the last value from the ToSend buffer & places it in the previous position.
|
void | backspace () |
| used to effectively backspace in Excel.
|
bool | bufferEmpty () const |
| returns true if the ToSend buffer is empty.
|
Protected Types |
typedef int | StateType |
enum | {
BIG_NUMBER = 524
} |
Protected Methods |
bool | stateSomething () |
| are we in Excel? returns true if we have a State other than Nothing for our state diagram.
|
void | complete_syllable (const int& syllable) |
| we have a syllable that is ready for output -- add it to ToSend & call reset.
|
void | develop_state (const StateType& new_state) |
| set the new state and append the last incoming character to Buffer.
|
void | make_syllable (const StateType& new_state, const int& syllable) |
| adds a new syllable to the ToSend buffer and places the state diagram in a new state.
|
void | append (PWCHAR str, const WCHAR& ch) |
| adds a character to the end of a buffer.
|
Protected Attributes |
WCHAR | Buffer [BIG_NUMBER] |
StateType | State |
| all chars read in so far.
|
WCHAR | ToSend [BIG_NUMBER] |
| Classification of buffer pattern.
|
WCHAR | ActualChar |
| What should be printed next.
|
WCHAR | numberBuffer [BIG_NUMBER] |
| Last thing read in, not yet processed.
|
bool | numberState |
| buffer just for numbers.
|
bool | isExcel |
| Are we in the midst of a #?
|