// This file is a part of the Framsticks GDK library. // Copyright (C) 2002-2011 Szymon Ulatowski. See LICENSE.txt for details. // Refer to http://www.framsticks.com/ for further information. #ifndef _NEUROFACTORY_H_ #define _NEUROFACTORY_H_ #include #include class NeuroImpl; class NeuroFactory { std::map impl; public: NeuroImpl* setImplementation(NeuroClass *nc,NeuroImpl *ni,bool deleteold=1); NeuroImpl* setImplementation(const SString& classname,NeuroImpl *ni,bool deleteold=1); NeuroImpl* getImplementation(NeuroClass *nc); class NeuroImpl* createNeuroImpl(Neuro *n) {NeuroClass *nc=n->getClass(); if (!nc) return 0; return createNeuroImpl(nc);} class NeuroImpl* createNeuroImpl(NeuroClass *nc); void setStandardImplementation(); void freeImplementation(); void removeUnimplemented(); }; #endif