Database record data class. More...
#include <data.h>
Public Member Functions | |
DBData () | |
Default constructor, constructs an empty local Data object. | |
DBData (const void *ValidData, size_t size) | |
Constructs a local Data object that points to external memory. | |
DBData (Data &externalData, bool copy) | |
If copy == false, constructs an external Data object, no local. |
Database record data class.
The purpose of this class is to contain the raw data that flows between low level activity such as device read/writes, backup read/writes, and record parsing.
This class contains the low level record data block, unparsed, as well as the surrounding meta data, such as the database name it belongs to, the Unique ID, the Rec Type, and format version/type based on what commands were used to extract the data from the device. (When using newer commands, the format of the records, potentially including the individual field type codes, are different.)
Possible bi-directional data flow in all of Barry: Note that this class, DBData, represents the data+meta stage.
data+meta <-> device data+meta <-> backup file data+meta <-> record object record object <-> boost serialization contact record object <-> ldif
Possible uni-directional data flow in all of Barry:
record object -> text dump
Definition at line 154 of file data.h.
DBData::DBData | ( | ) |
DBData::DBData | ( | const void * | ValidData, | |
size_t | size | |||
) |
DBData::DBData | ( | Data & | externalData, | |
bool | copy | |||
) |
If copy == false, constructs an external Data object, no local.
If copy == true, constructs an internal Data object copy For speed, set copy to false. If you want Copy On Write behaviour, similar to Data(buf,size), then use the above (buf, size) constructor, not this one, since this constructor uses Data's copy constructor.
If copy == true, constructs an internal Data object copy