Moved the common directory into the libs directory

This commit is contained in:
Kayne Ruse
2013-06-16 13:59:11 +10:00
parent a0fa874a29
commit 419c9d8765
13 changed files with 79 additions and 10 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef SERVICELOCATOR_HPP_
#define SERVICELOCATOR_HPP_
template<typename T>
class ServiceLocator {
public:
static T* Set(T* t) {
delete service;
return service = t;
}
static T* Get() {
return service;
}
private:
static T* service;
};
template<typename T>
T* ServiceLocator<T>::service = nullptr;
#endif