#include "Register_Implement.h" #include #include namespace meow{ template inline RegisterInterface::RegisterInterface(){ } template inline bool RegisterInterface::regImplement(ImplementInterface* imp){ if(implements.find(imp->identify()) != implements.end()){ return false; } implements[imp->identify()] = imp; return true; } template inline ImplementInterface* RegisterInterface::getImplement(T const& identify){ if(implements.find(identify) == implements.end()){ return NULL; } return implements[identify]; } template inline std::vector RegisterInterface::getIdentifys() const{ std::vector ret; for(typename std::map*>::const_iterator it = implements.begin(); it != implements.end(); it++){ ret.push_back(it->first); } return ret; } }