Struct ArchiveIndexSchema

Struct Documentation

struct ArchiveIndexSchema

Schema for the index catalog that specifies where objects are stored in the data catalogs.

Each row in the index catalog corresponds to a combination of an object and a data catalog, and contains the range of rows used by that object in the catalog (in the ‘row0’ and ‘nrows’ fields). The ‘cat.archive’ field indicates which catalog in the archive the index entry refers to (where 0 is the index itself, and 1 is the first data catalog), and ‘cat.persistable’ refers to which catalog the index entry refers to from the perspective of the saved object.

An object may thus have more than one row in the index, but the ‘id’ and ‘name’ fields must be the same for all index entires that correspond to a single object. These contain, respectively, the unique ID returned by OutputArchive::put and the name returned by Persistable::getPersistenceName() and used by InputArchive to look up a PersistableFactory in the registry.

Public Functions

ArchiveIndexSchema(const ArchiveIndexSchema&)
ArchiveIndexSchema &operator=(const ArchiveIndexSchema&)
ArchiveIndexSchema(ArchiveIndexSchema&&)
ArchiveIndexSchema &operator=(ArchiveIndexSchema&&)

Public Members

Schema schema
Key<int> id
Key<int> catArchive
Key<int> catPersistable
Key<int> row0
Key<int> nRows
Key<std::string> name
Key<std::string> module

Public Static Functions

static ArchiveIndexSchema const &get()

Return the singleton instance.

Public Static Attributes

int const MAX_NAME_LENGTH = 64
int const MAX_MODULE_LENGTH = 64
constexpr int const NO_CATALOGS_SAVED = -1

Special value used for catArchive, catPersistable, and row0 when an object with no state is saved.