16 #ifndef __OMNETPP_CENVIR_H    17 #define __OMNETPP_CENVIR_H    21 #include "simkerneldefs.h"    22 #include "simtime_t.h"    23 #include "opp_string.h"    24 #include "clistener.h"      25 #include "clifecyclelistener.h"    28 namespace osg { 
class Node; }
    49 class cConfigurationEx;
    54 #define EVCB  cSimulation::getActiveEnvir()->suppressNotifications ? (void)0 : (*cSimulation::getActiveEnvir())    86     bool suppressNotifications;
    89     bool debugOnErrors = 
false;
   130     virtual void simulationEvent(
cEvent *event) = 0;
   136     virtual void messageScheduled(
cMessage *msg) = 0;
   142     virtual void messageCancelled(
cMessage *msg) = 0;
   151     virtual void beginSend(
cMessage *msg) = 0;
   157     virtual void messageSendHop(
cMessage *msg, 
cGate *srcGate) = 0;
   163     virtual void endSend(
cMessage *msg) = 0;
   169     virtual void messageCreated(
cMessage *msg) = 0;
   182     virtual void messageDeleted(
cMessage *msg) = 0;
   187     virtual void moduleReparented(
cModule *module, 
cModule *oldparent, 
int oldId) = 0;
   195     virtual void componentMethodBegin(
cComponent *from, 
cComponent *to, 
const char *methodFmt, va_list va, 
bool silent) = 0;
   201     virtual void componentMethodEnd() = 0;
   208     virtual void moduleCreated(
cModule *newmodule) = 0;
   221     virtual void moduleDeleted(
cModule *module) = 0;
   226     virtual void gateCreated(
cGate *newgate) = 0;
   232     virtual void gateDeleted(
cGate *gate) = 0;
   238     virtual void connectionCreated(
cGate *srcgate) = 0;
   244     virtual void connectionDeleted(
cGate *srcgate) = 0;
   250     virtual void displayStringChanged(
cComponent *component) = 0;
   292     virtual void preconfigure(
cComponent *component) = 0;
   300     virtual void configure(
cComponent *component) = 0;
   306     virtual void readParameter(
cPar *parameter) = 0;
   318     virtual bool isModuleLocal(
cModule *parentmod, 
const char *modname, 
int index) = 0;
   342     virtual cXMLElement *getXMLDocument(
const char *filename, 
const char *xpath=
nullptr) = 0;
   365     virtual cXMLElement *getParsedXMLString(
const char *content, 
const char *xpath=
nullptr) = 0;
   380     virtual void forgetXMLDocument(
const char *filename) = 0;
   394     virtual void forgetParsedXMLString(
const char *content) = 0;
   405     virtual void flushXMLDocumentCache() = 0;
   416     virtual void flushXMLParsedContentCache() = 0;
   422     virtual unsigned getExtraStackForEnvir() 
const = 0;
   450     virtual std::string resolveResourcePath(
const char *fileName, 
cComponentType *context=
nullptr) = 0;
   462     virtual bool isGUI() 
const = 0;
   475     virtual bool isExpressMode() 
const = 0;
   481     virtual void bubble(
cComponent *component, 
const char *text) = 0;
   492     virtual void alert(
const char *msg) = 0;
   497     virtual void printfmsg(
const char *fmt,...);
   503     virtual std::string gets(
const char *prompt, 
const char *defaultReply=
nullptr) = 0;
   510     virtual bool askYesNo(
const char *prompt) = 0;
   521     virtual void getImageSize(
const char *imageName, 
double& outWidth, 
double& outHeight) = 0;
   530     virtual void getTextExtent(
const cFigure::Font& font, 
const char *text, 
double& outWidth, 
double& outHeight, 
double& outAscent) = 0;
   543     virtual void appendToImagePath(
const char *directory) = 0;
   568     virtual void loadImage(
const char *fileName, 
const char *imageName=
nullptr) = 0;
   603     virtual double getZoomLevel(
const cModule *module) = 0;
   611     virtual double getAnimationTime() 
const = 0;
   622     virtual double getAnimationSpeed() 
const = 0;
   631     virtual double getRemainingAnimationHoldTime() 
const = 0;
   641     virtual int getNumRNGs() 
const = 0;
   646     virtual cRNG *getRNG(
int k) = 0;
   666     virtual void *registerOutputVector(
const char *modulename, 
const char *vectorname) = 0;
   671     virtual void deregisterOutputVector(
void *vechandle) = 0;
   676     virtual void setVectorAttribute(
void *vechandle, 
const char *name, 
const char *value) = 0;
   683     virtual bool recordInOutputVector(
void *vechandle, 
simtime_t t, 
double value) = 0;
   699     virtual void recordScalar(
cComponent *component, 
const char *name, 
double value, 
opp_string_map *attributes=
nullptr) = 0;
   745     virtual std::ostream *getStreamForSnapshot() = 0;
   750     virtual void releaseStreamForSnapshot(std::ostream *os) = 0;
   758     virtual int getArgCount() 
const = 0;
   763     virtual char **getArgVector() 
const = 0;
   768     virtual int getParsimProcId() 
const = 0;
   774     virtual int getParsimNumPartitions() 
const = 0;
   779     virtual unsigned long getUniqueNumber() = 0;
   785     virtual void refOsgNode(osg::Node *scene) = 0;
   791     virtual void unrefOsgNode(osg::Node *scene) = 0;
   806     virtual bool idle() = 0;
   822     virtual bool ensureDebugger(
cRuntimeError *error = 
nullptr) = 0;
 The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
 
Thrown when the simulation kernel or other components detect a runtime error. 
Definition: cexception.h:282
 
Common base for module and channel classes. 
Definition: ccomponent.h:48
 
Represents a module gate. 
Definition: cgate.h:63
 
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
 
int64_t-based, base-10 fixed-point simulation time. 
Definition: simtime.h:66
 
Represents an XML element in an XML configuration file. 
Definition: cxmlelement.h:73
 
Abstract interface for random number generator classes. 
Definition: crng.h:49
 
Represents an event in the discrete event simulator. 
Definition: cevent.h:43
 
Represents a module or channel parameter. 
Definition: cpar.h:68
 
virtual const char * getCurrentEventName()
Definition: cenvir.h:268
 
A callback interface for receiving notifications at various stages simulations, including setting up...
Definition: clifecyclelistener.h:186
 
virtual cModule * getCurrentEventModule()
Definition: cenvir.h:280
 
cEnvir represents the "environment" or user interface of the simulation. 
Definition: cenvir.h:73
 
virtual const char * getCurrentEventClassName()
Definition: cenvir.h:274
 
This class holds various data that is captured when a particular log statement executes. It also contains the text written to the log stream. 
Definition: clog.h:369
 
virtual void componentInitBegin(cComponent *component, int stage)
Definition: cenvir.h:121
 
This class represents modules in the simulation. 
Definition: cmodule.h:47
 
Stores a (NED) property with its (possibly compound) value. 
Definition: cproperty.h:38
 
Represents a configuration suitable for use with the Envir library. 
Definition: cconfiguration.h:282
 
Lightweight string-to-string map, used internally in some parts of OMNeT++. 
Definition: opp_string.h:200
 
bool isLoggingEnabled() const 
Definition: cenvir.h:468
 
A cEnvir that can be instantiated as a user interface, like Cmdenv and Tkenv. 
Definition: cenvir.h:853
 
virtual void objectDeleted(cObject *object)
Definition: cenvir.h:116
 
Common base class for cModuleType and cChannelType. 
Definition: ccomponenttype.h:49
 
Definition: cabstracthistogram.h:21
 
SimulationLifecycleEventType
Event type for cISimulationLifecycleListener's lifecycleEvent() method. 
Definition: clifecyclelistener.h:28
 
virtual void undisposedObject(cObject *obj)
Definition: cenvir.h:259
 
int simsignal_t
Signal handle. 
Definition: clistener.h:24
 
cStatistic is an abstract class for computing statistical properties of a random variable. 
Definition: cstatistic.h:34
 
Represents the configuration, as accessed by the simulation kernel. 
Definition: cconfiguration.h:70