Public Types | Public Member Functions

Barry::DeviceParser Class Reference

A parser class that "parses" raw data into a device. More...

#include <m_desktop.h>

Inheritance diagram for Barry::DeviceParser:
Inheritance graph
Collaboration diagram for Barry::DeviceParser:
Collaboration graph

List of all members.

Public Types

enum  WriteMode {

Public Member Functions

virtual WriteMode DecideWrite (const DBData &record) const
virtual void ParseRecord (const DBData &data, const IConverter *ic)
 Parser overrides.

Detailed Description

A parser class that "parses" raw data into a device.

Basically this is a pipe-oriented way to call SaveDatabase().

Note that this is a multi-record parser. For each incoming DBData that has a new DBName, a new save will be started. There is no way to filter out records, except via the callback, so the easiest way to filter out records by database name is on the Builder side.

Definition at line 249 of file m_desktop.h.

Member Enumeration Documentation


Similar to SaveDatabase().

Erases all records from the existing database and then uploads all new records.


Adds any new records, and for records with Unique IDs that already exist, overwrite them.


Adds any new records, but if a record exists with the current Unique ID, skip that record and don't write it to the device.


Adds all incoming records as brand new records, generating a new Unique ID for each one, and leaving any existing records intact.


Calls the virtual function DecideWrite(...) for each record, passing in the data.

DecideWrite() returns one of these WriteMode values.


Primarily used by DecideWrite(), and causes the current record to not be written.

Definition at line 252 of file m_desktop.h.

Member Function Documentation

virtual WriteMode Barry::DeviceParser::DecideWrite ( const DBData record  )  const [inline, virtual]


you must derive and override this if you use the DECIDE_BY_CALLBACK mode. May be called multiple times per record.

Definition at line 300 of file m_desktop.h.

void Barry::DeviceParser::ParseRecord ( const DBData data,
const IConverter ic 
) [virtual]

Parser overrides.

Implements Barry::Parser.

Definition at line 748 of file

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