Public Member Functions

Barry::DBData Class Reference

Database record data class. More...

#include <data.h>

Collaboration diagram for Barry::DBData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DBData ()
 Default constructor, constructs an empty local Data object.
 DBData (const DBData &other)
 Copy constructor - always creates an internal Data object, and uses Data object's copy constructor to make it.
 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.

Detailed Description

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 169 of file data.h.


Constructor & Destructor Documentation

Barry::DBData::DBData (  ) 

Default constructor, constructs an empty local Data object.

Definition at line 509 of file data.cc.

Barry::DBData::DBData ( const DBData other  ) 

Copy constructor - always creates an internal Data object, and uses Data object's copy constructor to make it.

Copies all meta data as well. If you want to optimize the copy, use one of the constructors below.

Copies all meta data as well.

Definition at line 519 of file data.cc.

Barry::DBData::DBData ( const void *  ValidData,
size_t  size 
)

Constructs a local Data object that points to external memory.

Definition at line 531 of file data.cc.

Barry::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

Definition at line 557 of file data.cc.


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