Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ChangeTracker.cpp

    r112b09 r2f40c0e  
    77
    88#include "Helpers/MemDebug.hpp"
     9#include "Parser/ChangeTracker.hpp"
     10#include "Patterns/Singleton_impl.hpp"
    911
    10 #include "ChangeTracker.hpp"
    11 
    12 ChangeTracker* ChangeTracker::instance = NULL;
    1312
    1413/**
     
    2726ChangeTracker::~ChangeTracker() {
    2827  World::getInstance().signOff(this);
    29 }
    30 
    31 /**
    32  * Returns the change tracker instance.
    33  *
    34  * \return this
    35  */
    36 ChangeTracker* ChangeTracker::get() {
    37   if (instance == NULL) {
    38     instance = new ChangeTracker();
    39   }
    40 
    41   return instance;
    42 }
    43 
    44 /**
    45  * Destroys the change tracker instance. Be careful, the change tracker is a
    46  * singleton and destruction might lead to a loss of consistency.
    47  */
    48 void ChangeTracker::destroy() {
    49   delete instance;
    50   instance = NULL;
    5128}
    5229
     
    7653  }
    7754}
     55
     56CONSTRUCT_SINGLETON(ChangeTracker)
Note: See TracChangeset for help on using the changeset viewer.