Changeset 12060 for source/ariba/utility/system
- Timestamp:
- Jun 19, 2013, 11:05:49 AM (11 years ago)
- Location:
- source/ariba/utility/system
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/system/StartupWrapper.cpp
r10700 r12060 36 36 // Telematics. 37 37 // [License] 38 39 // XXX NOTE: Use this class with caution! Config support is outdated. 38 40 39 41 #include "StartupWrapper.h" -
source/ariba/utility/system/StartupWrapper.h
r4483 r12060 36 36 // Telematics. 37 37 // [License] 38 39 // XXX NOTE: Use this class with caution! Config support is outdated. 38 40 39 41 #ifndef __STARTUP_WRAPPER_H -
source/ariba/utility/system/SystemQueue.cpp
r7533 r12060 69 69 } 70 70 71 // maps to function call internally to the Event-system 72 void SystemQueue::scheduleCall( const boost::function0<void>& function, uint32_t delay) 73 { 74 // copy function object 75 boost::function0<void>* function_ptr = new boost::function0<void>(); 76 (*function_ptr) = function; 77 78 // schedule special call-event 79 scheduleEvent( SystemEvent(&internal_function_caller, SystemEventType::DEFAULT, function_ptr), delay ); 80 81 } 82 71 83 #ifdef UNDERLAY_OMNET 72 84 void SystemQueue::handleMessage(cMessage* msg){ -
source/ariba/utility/system/SystemQueue.h
r7468 r12060 60 60 #endif 61 61 62 #include <boost/function.hpp> 63 64 62 65 using std::vector; 63 66 using boost::posix_time::ptime; … … 108 111 */ 109 112 void scheduleEvent( const SystemEvent& event, uint32_t delay = 0 ); 113 114 /** 115 * This method schedules a function call in the SystemQueue. 116 * (Like scheduleEvent, but to be used with boost::bind.) 117 * 118 * @param function: The function to be called [void function()] 119 * @param The delay in milli-seconds 120 */ 121 void scheduleCall( const boost::function0<void>& function, uint32_t delay = 0 ); 110 122 111 123 /** … … 170 182 #endif 171 183 184 185 172 186 private: 173 187 … … 235 249 volatile bool systemQueueRunning; 236 250 #endif 237 251 252 253 private: 254 /** 255 * This inner class handles the function-call events. 256 * @see SystemQueue::scheduleCall 257 */ 258 class FunctionCaller : public SystemEventListener 259 { 260 void handleSystemEvent(const SystemEvent& event) 261 { 262 boost::function0<void>* function_ptr = event.getData< boost::function0<void> >(); 263 (*function_ptr)(); 264 delete function_ptr; 265 } 266 }; 267 268 FunctionCaller internal_function_caller; 238 269 }; // class SystemQueue 239 270
Note:
See TracChangeset
for help on using the changeset viewer.