- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# cSnapshotManager Class Reference
[Extension interface to Envir]

`#include <envirext.h>`

Inheritance diagram for cSnapshotManager:

List of all members.

## Detailed Description

Abstract base class for snapshot managers.

cSnapshotManagers are plugins into the Envir user interface library (src/envir) that provide an output stream into which snapshots are written (see cSimulation::snapshot()).

The default output snapshot manager is cFileSnapshotManager, defined in the Envir library.

To create your own snaphot manager class, subclass cSnapshotManager, register your new class with the Register_Class() macro, then select it by adding the following to `omnetpp.ini`:

     [General]
     snapshotmanager-class="MyClass"

## Public Member Functions
Constructor, destructor
| cSnapshotManager ()
virtual | ~cSnapshotManager ()
Controlling the beginning and end of collecting data.
virtual void | startRun ()=0
virtual void | endRun ()=0
Snapshot management
virtual std::ostream * | getStreamForSnapshot ()=0
virtual void | releaseStreamForSnapshot (std::ostream *os)=0
virtual const char * | fileName () const =0

## Constructor & Destructor Documentation

cSnapshotManager::cSnapshotManager | ( |  | ) | `[inline, explicit]`

| Constructor.

virtual cSnapshotManager::~cSnapshotManager | ( |  | ) | `[inline, virtual]`

| Destructor.

## Member Function Documentation

virtual void cSnapshotManager::endRun | ( |  | ) | `[pure virtual]`

| Called at the end of a simulation run.

virtual const char* cSnapshotManager::fileName | ( |  | ) | const`[pure virtual]`

| Returns the snapshot file name. Returns NULL if this object is not producing file output.

virtual std::ostream* cSnapshotManager::getStreamForSnapshot | ( |  | ) | `[pure virtual]`

| Returns a stream where a snapshot can be written.

virtual void cSnapshotManager::releaseStreamForSnapshot | ( | std::ostream * | os | ) | `[pure virtual]`

| Releases a stream after a snapshot was written.

virtual void cSnapshotManager::startRun | ( |  | ) | `[pure virtual]`

| Called at the beginning of a simulation run.

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

- envirext.h