Barry::Parser Class Reference

Base class for the parser hierarchy. More...

#include <parser.h>

Inheritance diagram for Barry::Parser:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Detailed Description

Base class for the parser hierarchy.

This class provides the interface that the Controller class uses to pass raw data it reads from the device. The Controller, along with the Packet class, calls each of the virtual functions below in the same order.

This class is kept as a pure abstract class, in order to make sure that the compiler will catch any API changes, for code derived from it.

Definition at line 52 of file parser.h.


Member Function Documentation

virtual void Barry::Parser::Clear (  )  [pure virtual]

Reset and prepare for a new raw data packet.

Implemented in Barry::NullParser, Barry::RecordParser< RecordT, StorageT >, DataDumpParser, ChecksumParser, and DataDumpParser.

Referenced by Barry::DBPacket::Parse().

Here is the caller graph for this function:

virtual void Barry::Parser::ParseFields ( const Data data,
size_t &  offset,
const IConverter ic 
) [pure 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.

Implemented in Barry::NullParser, Barry::RecordParser< RecordT, StorageT >, DataDumpParser, ChecksumParser, and DataDumpParser.

Referenced by Barry::DBPacket::Parse().

Here is the caller graph for this function:

virtual void Barry::Parser::ParseHeader ( const Data data,
size_t &  offset 
) [pure 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.

Implemented in Barry::NullParser, Barry::RecordParser< RecordT, StorageT >, DataDumpParser, ChecksumParser, and DataDumpParser.

Referenced by Barry::DBPacket::Parse().

Here is the caller graph for this function:

virtual void Barry::Parser::SetIds ( uint8_t  RecType,
uint32_t  UniqueId 
) [pure virtual]

Stores the IDs.

Implemented in Barry::NullParser, Barry::RecordParser< RecordT, StorageT >, DataDumpParser, ChecksumParser, and DataDumpParser.

Referenced by Barry::DBPacket::Parse().

Here is the caller graph for this function:

virtual void Barry::Parser::Store (  )  [pure virtual]

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

Implemented in Barry::NullParser, Barry::RecordParser< RecordT, StorageT >, DataDumpParser, ChecksumParser, and DataDumpParser.

Referenced by Barry::DBPacket::Parse().

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208