# envirext.h

    00001 //==========================================================================
    00002 //  ENVIREXT.H - part of
    00003 //                     OMNeT++/OMNEST
    00004 //            Discrete System Simulation in C++
    00005 //
    00006 //
    00007 //  Declaration of the following classes:
    00008 //    cOutputVectorManager  : actually records for cOutVector objects
    00009 //
    00010 //==========================================================================
    00011
    00012 /*--------------------------------------------------------------*
    00013   Copyright (C) 1992-2005 Andras Varga
    00014
    00015   This file is distributed WITHOUT ANY WARRANTY. See the file
    00016   `license' for details on this and other legal matters.
    00017 *--------------------------------------------------------------*/
    00018
    00019 #ifndef __ENVIREXT_H
    00020 #define __ENVIREXT_H
    00021
    00022 #include <iostream>
    00023 #include "defs.h"
    00024 #include "cpolymorphic.h"
    00025
    00026
    00027 class cModule;
    00028 class cStatistic;
    00029 class cPar;
    00030
    00051 class ENVIR_API cOutputVectorManager : public cPolymorphic
    00052 {
    00053   private:
    00054     // copy constructor and assignment unsupported, make them inaccessible and also leave unimplemented
    00055     cOutputVectorManager(const cOutputVectorManager&);
    00056     cOutputVectorManager& operator=(const cOutputVectorManager&);
    00057
    00058   public:
    00061
    00065     explicit cOutputVectorManager() {}
    00066
    00070     virtual ~cOutputVectorManager() {}
    00072
    00075
    00079     virtual void startRun() = 0;
    00080
    00084     virtual void endRun() = 0;
    00086
    00089
    00095     virtual void *registerVector(const char *modulename, const char *vectorname, int tuple) = 0;
    00096
    00100     virtual void deregisterVector(void *vechandle) = 0;
    00101
    00107     virtual bool record(void *vechandle, simtime_t t, double value) = 0;
    00108
    00114     virtual bool record(void *vechandle, simtime_t t, double value1, double value2) = 0;
    00115
    00120     virtual const char *fileName() const = 0;
    00121
    00125     virtual void flush() = 0;
    00127 };
    00128
    00129
    00150 class ENVIR_API cOutputScalarManager : public cPolymorphic
    00151 {
    00152   private:
    00153     // copy constructor and assignment unsupported, make them inaccessible and also leave unimplemented
    00154     cOutputScalarManager(const cOutputScalarManager&);
    00155     cOutputScalarManager& operator=(const cOutputScalarManager&);
    00156
    00157   public:
    00160
    00164     explicit cOutputScalarManager() {}
    00165
    00169     virtual ~cOutputScalarManager() {}
    00171
    00174
    00178     virtual void startRun() = 0;
    00179
    00183     virtual void endRun() = 0;
    00185
    00188
    00192     virtual void recordScalar(cModule *module, const char *name, double value) = 0;
    00193
    00198     virtual const char *fileName() const = 0;
    00199
    00203     virtual void flush() = 0;
    00205 };
    00206
    00207
    00227 class ENVIR_API cSnapshotManager : public cPolymorphic
    00228 {
    00229   private:
    00230     // copy constructor and assignment unsupported, make them inaccessible and also leave unimplemented
    00231     cSnapshotManager(const cSnapshotManager&);
    00232     cSnapshotManager& operator=(const cSnapshotManager&);
    00233
    00234   public:
    00237
    00241     explicit cSnapshotManager() {}
    00242
    00246     virtual ~cSnapshotManager() {}
    00248
    00251
    00255     virtual void startRun() = 0;
    00256
    00260     virtual void endRun() = 0;
    00262
    00268     virtual std::ostream *getStreamForSnapshot() = 0;
    00269
    00273     virtual void releaseStreamForSnapshot(std::ostream *os) = 0;
    00274
    00279     virtual const char *fileName() const = 0;
    00281 };
    00282
    00283 #endif
    00284
    00285