#include <builder.h>
Public Member Functions | |
RecordBuilder (StorageT &storage) | |
Constructor that references an externally managed storage object. | |
RecordBuilder (StorageT *storage) | |
Constructor that references a locally managed storage object. | |
virtual bool | Retrieve (unsigned int databaseId) |
Called first in the sequence, to allow the application to load the needed data from memory, disk, etc. | |
virtual uint8_t | GetRecType () const |
Called to retrive the unique ID for this record. | |
virtual void | BuildHeader (Data &data, size_t &offset) |
Functor member called by Controller::SaveDatabase() during processing. | |
virtual void | BuildFields (Data &data, size_t &offset, const IConverter *ic) |
Called to build the record field data. |
This template takes the following template arguments:
Example SaveDatabase() call:
FIXME
Definition at line 91 of file builder.h.
Barry::RecordBuilder< RecordT, StorageT >::RecordBuilder | ( | StorageT & | storage | ) | [inline] |
Barry::RecordBuilder< RecordT, StorageT >::RecordBuilder | ( | StorageT * | storage | ) | [inline] |
virtual void Barry::RecordBuilder< RecordT, StorageT >::BuildFields | ( | Data & | data, | |
size_t & | offset, | |||
const IConverter * | ic | |||
) | [inline, 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()).
Implements Barry::Builder.
virtual void Barry::RecordBuilder< RecordT, StorageT >::BuildHeader | ( | Data & | data, | |
size_t & | offset | |||
) | [inline, virtual] |
virtual uint8_t Barry::RecordBuilder< RecordT, StorageT >::GetRecType | ( | ) | const [inline, virtual] |
virtual bool Barry::RecordBuilder< RecordT, StorageT >::Retrieve | ( | unsigned int | databaseId | ) | [inline, 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.
Implements Barry::Builder.