aboutsummaryrefslogtreecommitdiffstats
path: root/meowpp/oo/Register_Implement.hpp
diff options
context:
space:
mode:
authorcathook <b01902109@csie.ntu.edu.tw>2014-05-02 01:29:33 +0800
committercathook <b01902109@csie.ntu.edu.tw>2014-05-02 01:29:33 +0800
commitd2d7a49563a8f04bd07264a4a989d5656313d375 (patch)
tree45812ca8bcc20b59e9f4f4e54bf052eb39a6c0be /meowpp/oo/Register_Implement.hpp
parent395a4bceaac30588963dacb8e006e9ebbe2ca6dd (diff)
downloadmeow-d2d7a49563a8f04bd07264a4a989d5656313d375.tar
meow-d2d7a49563a8f04bd07264a4a989d5656313d375.tar.gz
meow-d2d7a49563a8f04bd07264a4a989d5656313d375.tar.bz2
meow-d2d7a49563a8f04bd07264a4a989d5656313d375.tar.lz
meow-d2d7a49563a8f04bd07264a4a989d5656313d375.tar.xz
meow-d2d7a49563a8f04bd07264a4a989d5656313d375.tar.zst
meow-d2d7a49563a8f04bd07264a4a989d5656313d375.zip
update test
Diffstat (limited to 'meowpp/oo/Register_Implement.hpp')
-rw-r--r--meowpp/oo/Register_Implement.hpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/meowpp/oo/Register_Implement.hpp b/meowpp/oo/Register_Implement.hpp
deleted file mode 100644
index bee7f3e..0000000
--- a/meowpp/oo/Register_Implement.hpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "Register_Implement.h"
-
-
-#include <map>
-#include <vector>
-
-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];
- }
- template<class T>
- inline std::vector<T>
- RegisterInterface<T>::getIdentifys() const{
- std::vector<T> ret;
- for(typename std::map<T, ImplementInterface<T>*>::const_iterator
- it = implements.begin(); it != implements.end(); it++){
- ret.push_back(it->first);
- }
- return ret;
- }
-}