OMNeT++ Simulation Library  5.6.1
cISnapshotManager Class Referenceabstract

#include <envirext.h>

Description

Abstract base class for snapshot managers.

cISnapshotManagers 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 cISnapshotManager, register your new class with the Register_Class() macro, then select it by adding the following to omnetpp.ini:

[General]
snapshotmanager-class="MyClass"
Inheritance diagram for cISnapshotManager:
cObject cISimulationLifecycleListener noncopyable

Public Member Functions

Constructor, destructor
 cISnapshotManager ()
 
virtual ~cISnapshotManager ()
 
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 * getFileName () const =0
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
virtual const char * getName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual _OPPDEPRECATED std::string info () const
 
virtual _OPPDEPRECATED std::string detailedInfo () const
 
virtual cObjectdup () const
 
virtual void parsimPack (cCommBuffer *buffer) const
 
virtual void parsimUnpack (cCommBuffer *buffer)
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
void copyNotSupported () const
 
- Public Member Functions inherited from cISimulationLifecycleListener
virtual ~cISimulationLifecycleListener ()
 
virtual void listenerAdded ()
 
virtual void listenerRemoved ()
 

Protected Member Functions

virtual void lifecycleEvent (SimulationLifecycleEventType eventType, cObject *details) override
 
- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Additional Inherited Members

- Static Public Member Functions inherited from cISimulationLifecycleListener
static const char * getSimulationLifecycleEventName (SimulationLifecycleEventType eventType)
 

Constructor & Destructor Documentation

◆ cISnapshotManager()

cISnapshotManager ( )
inlineexplicit

Constructor.

◆ ~cISnapshotManager()

virtual ~cISnapshotManager ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ lifecycleEvent()

virtual void lifecycleEvent ( SimulationLifecycleEventType  eventType,
cObject details 
)
overrideprotectedvirtual

A cISimulationLifecycleListener method. Delegates to startRun() and endRun(); override if needed.

Implements cISimulationLifecycleListener.

◆ startRun()

virtual void startRun ( )
pure virtual

Called at the beginning of a simulation run.

◆ endRun()

virtual void endRun ( )
pure virtual

Called at the end of a simulation run.

◆ getStreamForSnapshot()

virtual std::ostream* getStreamForSnapshot ( )
pure virtual

Returns a stream where a snapshot can be written.

◆ releaseStreamForSnapshot()

virtual void releaseStreamForSnapshot ( std::ostream *  os)
pure virtual

Releases a stream after a snapshot was written.

◆ getFileName()

virtual const char* getFileName ( ) const
pure virtual

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


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