Barry::Builder Class Reference

Base class for the builder functor hierarchy. More...

#include <builder.h>

Inheritance diagram for Barry::Builder:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool Retrieve (unsigned int databaseId)=0
 Called first in the sequence, to allow the application to load the needed data from memory, disk, etc.
virtual uint8_t GetRecType () const =0
 Called to retrive the unique ID for this record.
virtual void BuildHeader (Data &data, size_t &offset)=0
 Called before BuildFields() in order to build the header for this record.
virtual void BuildFields (Data &data, size_t &offset, const IConverter *ic)=0
 Called to build the record field data.


Detailed Description

Base class for the builder functor hierarchy.

This defines the API used by the Controller and Packet classes for building a raw device record to write to the device.

Definition at line 40 of file builder.h.


Member Function Documentation

virtual void Barry::Builder::BuildFields ( Data &  data,
size_t &  offset,
const IConverter ic 
) [pure virtual]

Called to build the record field data.

Store the raw data in data, using offset to know where to write. Be sure to update offset, and be sure to adjust the size of the data packet (possibly with Data::ReleaseBuffer()).

Implemented in Barry::RecordBuilder< RecordT, StorageT >.

Referenced by Barry::DBPacket::SetRecord(), and Barry::DBPacket::SetRecordByIndex().

Here is the caller graph for this function:

virtual void Barry::Builder::BuildHeader ( Data &  data,
size_t &  offset 
) [pure virtual]

Called before BuildFields() in order to build the header for this record.

Store the raw data in data, at the offset given in offset. When finished, update offset to point to the next spot to put new data.

Implemented in Barry::RecordBuilder< RecordT, StorageT >.

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

Here is the caller graph for this function:

virtual uint8_t Barry::Builder::GetRecType (  )  const [pure virtual]

Called to retrive the unique ID for this record.

Implemented in Barry::RecordBuilder< RecordT, StorageT >.

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

Here is the caller graph for this function:

virtual bool Barry::Builder::Retrieve ( unsigned int  databaseId  )  [pure virtual]

Called first in the sequence, to allow the application to load the needed data from memory, disk, etc.

If successful, return true. If at the end of the series, return false.

Implemented in Barry::RecordBuilder< RecordT, StorageT >.

Referenced by Barry::DBPacket::SetRecord(), and Barry::DBPacket::SetRecordByIndex().

Here is the caller graph for this function:


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

Generated on Tue Jun 30 16:08:51 2009 for Barry by  doxygen 1.5.8