Barry::NullParser Class Reference

If in debug mode, this class can be used as a null parser. More...

#include <parser.h>

Inheritance diagram for Barry::NullParser:
[legend]
Collaboration diagram for Barry::NullParser:
[legend]

List of all members.

Public Member Functions

virtual void Clear ()
 Reset and prepare for a new raw data packet.
virtual void SetIds (uint8_t RecType, uint32_t UniqueId)
 Stores the IDs.
virtual void ParseHeader (const Data &data, size_t &offset)
 Called to parse the header portion of the raw data packet.
virtual void ParseFields (const Data &data, size_t &offset, const IConverter *ic)
 Called to parse sub fields in the raw data packet.
virtual void Store ()
 Called at the very end of record parsing, and used to store the final packet somewhere, either in memory, disk, etc.

Detailed Description

If in debug mode, this class can be used as a null parser.

Call Init() and the protocol will be dumped to stdout and no parsing will be done.

Do NOT derive your own personal parser classes from this, unless you are perfectly confident that you will catch future API changes on the devel tree without the compiler's help.

Definition at line 94 of file parser.h.


Member Function Documentation

virtual void Barry::NullParser::Clear (  )  [inline, virtual]

Reset and prepare for a new raw data packet.

Implements Barry::Parser.

Definition at line 101 of file parser.h.

virtual void Barry::NullParser::ParseFields ( const Data data,
size_t &  offset,
const IConverter ic 
) [inline, virtual]

Called to parse sub fields in the raw data packet.

The same data is passed as was passed in ParseHeader, only the offset will be updated if it was advanced during the header parsing.

Implements Barry::Parser.

Definition at line 115 of file parser.h.

virtual void Barry::NullParser::ParseHeader ( const Data data,
size_t &  offset 
) [inline, virtual]

Called to parse the header portion of the raw data packet.

data contains the entire packet, and offset contains the location at which to start parsing.

Implements Barry::Parser.

Definition at line 109 of file parser.h.

virtual void Barry::NullParser::SetIds ( uint8_t  RecType,
uint32_t  UniqueId 
) [inline, virtual]

Stores the IDs.

Implements Barry::Parser.

Definition at line 104 of file parser.h.

virtual void Barry::NullParser::Store (  )  [inline, virtual]

Called at the very end of record parsing, and used to store the final packet somewhere, either in memory, disk, etc.

Implements Barry::Parser.

Definition at line 120 of file parser.h.


The documentation for this class was generated from the following file:

Generated on 29 Mar 2010 for Barry by  doxygen 1.6.1