#include <StrMod/TelnetParser.h>
Inheritance diagram for strmod::strmod::TelnetParser:

Public Methods | |
| TelnetParser () | |
| Construct a parser in the 'start' state. | |
| virtual | ~TelnetParser () |
| Destroy a parser. | |
| virtual int | AreYouA (const lcore::ClassIdent &cid) const |
| Asks if a class is of a particular type, or publicly derived from that type. | |
| void | processData (const void *data, size_t len, TelnetChunkBuilder &builder) |
| void | endOfChunk (TelnetChunkBuilder &builder) |
| This function is called when the parent, for various reasons (like getting to the end of the currently processed chunk) wants to wrap up processing and move as much data into the 'parsed' state as possible. | |
| size_t | getRegionBegin () const |
| Return number of bytes to the beginning of the current region that TelnetParser is not finished parsing yet. | |
| void | dropBytes (size_t bytes) |
Move region as if bytes bytes had been chopped off the front. | |
| void | reset (TelnetChunkBuilder &builder) |
| Reset the parser back to the 'start' state. | |
Static Public Attributes | |
| const STR_ClassIdent | identifier |
| Globally unique identifier for this class. | |
Protected Types | |
| enum | ParserState { PS_Normal, PS_Escape, PS_SubNeg, PS_SuboptNum, PS_Subopt, PS_SuboptEscape } |
| Describes the current state of the parser. More... | |
Protected Methods | |
| virtual const lcore::ClassIdent * | i_GetIdent () const |
| Returns the class identifier for the class the object actually is. | |
Definition at line 46 of file TelnetParser.h.
|
|
Describes the current state of the parser. This state is completely determined by the characters fed into processChar().
Definition at line 84 of file TelnetParser.h. |
|
|
Asks if a class is of a particular type, or publicly derived from that type. Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.
Reimplemented from strmod::lcore::Protocol. Definition at line 122 of file TelnetParser.h. |
|
|
This function is called when the parent, for various reasons (like getting to the end of the currently processed chunk) wants to wrap up processing and move as much data into the 'parsed' state as possible. This is needed because data block telnet sections can be of arbitrary length and have no 'end' delimeter as such. They need to be processed as they come, not in big blobs of 'all the data between telnet commands'.
Definition at line 294 of file TelnetParser.cxx. |
|
|
Returns the class identifier for the class the object actually is. Should always be overridden in any class that has a static identifier member. Reimplemented from strmod::lcore::Protocol. Definition at line 93 of file TelnetParser.h. |
|
||||||||||||||||
|
This allows the internal state machine to only pay attention to the character sequence and be largely divorced from how the characters are actually sliced and diced. As a courtesy to slicers and dicers, it will keep track of a region, and details about certain kinds of parsed objects. Definition at line 236 of file TelnetParser.cxx. |
|
|
Globally unique identifier for this class. Every class that might need to be identified should have a public static const identifier object in it. Reimplemented from strmod::lcore::Protocol. |
1.3-rc1