Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef BASIC_MODULE_H
00023 #define BASIC_MODULE_H
00024
00025 #include <omnetpp.h>
00026 #include "NotificationBoard.h"
00027 #include "NotifierConsts.h"
00028
00029 #ifndef EV
00030 #define EV (ev.isDisabled()||!debug) ? (std::ostream&)ev : ev << logName() << "::" << getClassName() << ": "
00031 #endif
00032
00033
00053 class INET_API BasicModule: public cSimpleModule, public INotifiable
00054 {
00055 protected:
00057 NotificationBoard *nb;
00058
00060 bool coreDebug;
00061
00063 bool debug;
00064
00066 std::string loggingName;
00067
00068 protected:
00070 virtual cModule *findHost(void) const;
00071
00073 const char* getLogName(int);
00074
00075 protected:
00077 virtual void initialize(int);
00078
00088 virtual int numInitStages() const {return 2;}
00089
00097 const char* logName(void) const
00098 {
00099 return loggingName.c_str();
00100 };
00101
00106 virtual void receiveChangeNotification(int category, const cPolymorphic *details) {}
00107 };
00108
00109 #endif
00110
00111