class Repository : public RefCountedObject

Collection of snapshots used in report generation.

A Repository is a collection of Snapshots. The repository defines the set of snapshots included in a report generation. There are three types of snapshots; Images (for instance a snapshot of the model or a plot), table data and 3D models. See Snapshot for further descriptions on the different snapshot types.

The report creator (ReportCreatorWord, ReportCreatorPowerPoint and ReportCreatorHtml) takes a repository parameter upon creation.

A repository and all its content can be saved and loaded from file using saveRepository() and loadRepository(). A stored repository can, for instance, be used as a reference case.

Add a snapshot using addSnapshot() and query existing snapshots with snapshot().

Public Functions


Creates an empty repository.

bool loadRepository(const Str &filename)

Loads an existing repository from file.

bool saveRepository(const Str &filename)

Saves a repository to file.

size_t snapshotCount() const

Returns the number of snapshots in this repository.

Snapshot *snapshot(size_t index)

Returns the snapshot at index index.

const Snapshot *snapshot(size_t index) const

Returns the snapshot at index index.

void addSnapshot(Snapshot *snapshot)

Adds the snapshot snapshot to the repository.

bool removeSnapshot(size_t index)

Removes the snapshot at the give index in the repository.

void removeAllSnapshots()

Removes all snapshots from the repository.