Collection of snapshots used in report generation. More...
Public Member Functions | |
Repository () | |
Creates an empty repository. More... | |
bool | loadRepository (const Str &filename) |
Loads an existing repository from file. More... | |
bool | saveRepository (const Str &filename) |
Saves a repository to file. More... | |
size_t | snapshotCount () const |
Returns the number of snapshots in this repository. More... | |
Snapshot * | snapshot (size_t index) |
Returns the snapshot at index index. More... | |
const Snapshot * | snapshot (size_t index) const |
Returns the snapshot at index index. More... | |
void | addSnapshot (Snapshot *snapshot) |
Adds the snapshot snapshot to the repository. More... | |
bool | removeSnapshot (size_t index) |
Removes the snapshot at the give index in the repository. More... | |
void | removeAllSnapshots () |
Removes all snapshots from the repository. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
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().
cee::rep::Repository::Repository | ( | ) |
Creates an empty repository.
void cee::rep::Repository::addSnapshot | ( | Snapshot * | snapshot | ) |
Adds the snapshot snapshot to the repository.
bool cee::rep::Repository::loadRepository | ( | const Str & | filename | ) |
Loads an existing repository from file.
void cee::rep::Repository::removeAllSnapshots | ( | ) |
Removes all snapshots from the repository.
bool cee::rep::Repository::removeSnapshot | ( | size_t | index | ) |
Removes the snapshot at the give index in the repository.
bool cee::rep::Repository::saveRepository | ( | const Str & | filename | ) |
Saves a repository to file.
Snapshot * cee::rep::Repository::snapshot | ( | size_t | index | ) |
Returns the snapshot at index index.
const Snapshot * cee::rep::Repository::snapshot | ( | size_t | index | ) | const |
Returns the snapshot at index index.
size_t cee::rep::Repository::snapshotCount | ( | ) | const |
Returns the number of snapshots in this repository.