blob: 34d9129c52e3502251a32271b50f1cc382a5b8f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <map>
namespace meow{
template<class T>
inline RegisterInterface<T>::RegisterInterface(){ }
template<class T>
inline bool RegisterInterface<T>::regImplement(ImplementInterface<T>* imp){
if(implements.find(imp->identify()) != implements.end()){
return false;
}
implements[imp->identify()] = imp;
return true;
}
template<class T>
inline ImplementInterface<T>*
RegisterInterface<T>::getImplement(T const& identify){
if(implements.find(identify) == implements.end()){
return NULL;
}
return implements[identify];
}
}
|