Base class for the builder functor hierarchy. More...
#include <builder.h>
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. |
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.
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().
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().
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().
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().