Changeset 6919 for source/ariba/utility/system
- Timestamp:
- Nov 13, 2009, 1:41:34 PM (15 years ago)
- Location:
- source/ariba/utility/system
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/system/SystemEvent.h
r3690 r6919 59 59 const void* data; //< data attached to the event 60 60 61 public: 61 public: 62 62 // TODO: these should be private, but the gcc 3.4 in scratchbox for cross-compiling 63 63 // for Maemo (Nokia N810) gets confused when the friend class SystemQueue has a … … 66 66 uint32_t delayTime; //< time the event is scheduled at, or 0 if it is to be fired immediately 67 67 uint32_t remainingDelay; //< remaining delay time for sleeping 68 68 69 69 public: 70 inline SystemEvent( 71 SystemEventListener* mlistener, 72 SystemEventType mtype = SystemEventType::DEFAULT, 73 void* mdata = NULL) 74 : scheduledTime(boost::posix_time::not_a_date_time), 75 delayTime(0), 76 remainingDelay(0), 77 listener(mlistener), 78 type(mtype), 79 data(mdata) { 70 inline SystemEvent(SystemEventListener* mlistener, SystemEventType mtype = 71 SystemEventType::DEFAULT, void* mdata = NULL) : 72 listener(mlistener), type(mtype), data(mdata), scheduledTime( 73 boost::posix_time::not_a_date_time), delayTime(0), 74 remainingDelay(0) 75 76 { 80 77 } 81 78 82 79 template<typename T> 83 inline SystemEvent( SystemEventListener* mlistener, 84 SystemEventType mtype = SystemEventType::DEFAULT, 85 T* mdata = NULL) 86 : scheduledTime(boost::posix_time::not_a_date_time), 87 delayTime(0), 88 remainingDelay(0), 89 listener(mlistener), 90 type(mtype), 91 data((void*)mdata) { 80 inline SystemEvent(SystemEventListener* mlistener, SystemEventType mtype = 81 SystemEventType::DEFAULT, T* mdata = NULL) : 82 listener(mlistener), type(mtype), data((void*) mdata), scheduledTime( 83 boost::posix_time::not_a_date_time), delayTime(0), 84 remainingDelay(0) { 92 85 } 93 94 95 86 96 87 inline SystemEvent(const SystemEvent& copy) { … … 126 117 template<typename T> 127 118 inline T* getData() const { 128 return (T*) *this;119 return (T*) *this; 129 120 } 130 121 … … 147 138 }; 148 139 149 }} // spovnet, common 140 } 141 } // spovnet, common 150 142 151 143 #endif /* SYSTEMEVENT_H_ */ -
source/ariba/utility/system/SystemQueue.cpp
r5316 r6919 125 125 126 126 SystemQueue::QueueThread::QueueThread(QueueThread* _transferQueue) 127 : running( false ), transferQueue( _transferQueue ) {127 : transferQueue( _transferQueue ), running( false ) { 128 128 } 129 129 -
source/ariba/utility/system/SystemQueue.h
r4702 r6919 234 234 #ifdef UNDERLAY_OMNET 235 235 236 #if 0 236 237 // 237 238 // the system queue must be a singleton in simulations, too. … … 243 244 // this is the macro definition from macros.h 244 245 // 245 // #define Define_Module(CLASSNAME) \246 // static cModule *CLASSNAME##__create() {return new CLASSNAME();} \246 // #define Define_Module(CLASSNAME) /backslash 247 // static cModule *CLASSNAME##__create() {return new CLASSNAME();} /backslash 247 248 // EXECUTE_ON_STARTUP(CLASSNAME##__mod, modtypes.instance()->add(new cModuleType(#CLASSNAME,#CLASSNAME,(ModuleCreateFunc)CLASSNAME##__create));) 248 249 // 249 250 // and this is how we do it :) 250 251 // 252 #endif 251 253 252 254 static cModule* SystemQueue__create() {
Note:
See TracChangeset
for help on using the changeset viewer.