#include <builder.h>
Inheritance diagram for Barry::RecordBuilder< RecordT, StorageT >:
This template takes the following template arguments:
Example SaveDatabase() call:
FIXME
Definition at line 87 of file 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. | |
~RecordBuilder () | |
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 uint32_t | GetUniqueId () const |
virtual void | BuildHeader (Data &data, size_t &offset) |
Functor member called by Controller::SaveDatabase() during processing. | |
virtual void | BuildFields (Data &data, size_t &offset) |
Called to build the record field data. |
Barry::RecordBuilder< RecordT, StorageT >::RecordBuilder | ( | StorageT & | storage | ) | [inline] |
Barry::RecordBuilder< RecordT, StorageT >::RecordBuilder | ( | StorageT * | storage | ) | [inline] |
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.
virtual uint8_t Barry::RecordBuilder< RecordT, StorageT >::GetRecType | ( | ) | const [inline, virtual] |
virtual void Barry::RecordBuilder< RecordT, StorageT >::BuildHeader | ( | Data & | data, | |
size_t & | offset | |||
) | [inline, virtual] |
virtual void Barry::RecordBuilder< RecordT, StorageT >::BuildFields | ( | Data & | data, | |
size_t & | offset | |||
) | [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.