Changeset 12524 for source/ariba/utility


Ignore:
Timestamp:
Oct 11, 2013, 5:10:15 PM (11 years ago)
Author:
hock@…
Message:

moved SystemQueue::instance() into cpp:
fixes some weird issues in some corner cases.
(e.g. strange compiler settings in application which links to libariba..)

Location:
source/ariba/utility/system
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/system/SystemQueue.cpp

    r12060 r12524  
    5353}
    5454
     55
     56SystemQueue& SystemQueue::instance()
     57{
     58        static SystemQueue _inst;
     59//      std::cout << "SystemQueue::instance: " << &_inst << std::endl;
     60        return _inst;
     61}
     62
     63
    5564void SystemQueue::scheduleEvent( const SystemEvent& event, uint32_t delay ) {
    5665#ifndef UNDERLAY_OMNET
     
    92101
    93102void SystemQueue::run() {
    94 #ifndef UNDERLAY_OMNET
    95103        systemQueueRunning = true;
    96104        directScheduler.run();
    97105        delayScheduler.run();
    98 #endif
    99106}
    100107
  • source/ariba/utility/system/SystemQueue.h

    r12060 r12524  
    7878 */
    7979
    80 #ifndef UNDERLAY_OMNET
    81 class SystemQueue : private boost::noncopyable {
    82 #else
    83 class SystemQueue : public cSimpleModule {
    84 #endif
    85        
     80class SystemQueue : private boost::noncopyable
     81{
    8682        use_logging_h(SystemQueue);
    8783        friend class EnterMethod;
     
    9086         * Get the SystemQueue singleton instance.
    9187         */
    92         static SystemQueue& instance() {
    93                 static SystemQueue _inst;
    94                 return _inst;
    95         }
    96 
    97 #ifdef UNDERLAY_OMNET
    98         /**
    99          * Prevent deletion of this module
    100          * by implementing the virtual method
    101          * and doing nothing in it
    102          */
    103         virtual void deleteModule(){}
    104 #endif
     88        static SystemQueue& instance();
    10589
    10690        /**
     
    177161         */
    178162        ~SystemQueue();
    179 
    180 #ifdef UNDERLAY_OMNET
    181         virtual void handleMessage( cMessage* msg );
    182 #endif
    183 
    184163       
    185164       
Note: See TracChangeset for help on using the changeset viewer.