Changes in src/Parser/ChangeTracker.cpp [112b09:2f40c0e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ChangeTracker.cpp
r112b09 r2f40c0e 7 7 8 8 #include "Helpers/MemDebug.hpp" 9 #include "Parser/ChangeTracker.hpp" 10 #include "Patterns/Singleton_impl.hpp" 9 11 10 #include "ChangeTracker.hpp"11 12 ChangeTracker* ChangeTracker::instance = NULL;13 12 14 13 /** … … 27 26 ChangeTracker::~ChangeTracker() { 28 27 World::getInstance().signOff(this); 29 }30 31 /**32 * Returns the change tracker instance.33 *34 * \return this35 */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 a46 * singleton and destruction might lead to a loss of consistency.47 */48 void ChangeTracker::destroy() {49 delete instance;50 instance = NULL;51 28 } 52 29 … … 76 53 } 77 54 } 55 56 CONSTRUCT_SINGLETON(ChangeTracker)
Note:
See TracChangeset
for help on using the changeset viewer.