3 This file is part of gldbg
4 Copyright © 2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the GPL
24 virtual Tool *create(GlDbg &) const = 0;
32 virtual void decode(const char *, unsigned) = 0;
34 static std::list<Factory *> &get_factories();
39 class RegisteredTool: public Tool
42 class Factory: public Tool::Factory
44 virtual Tool *create(GlDbg &g) const { return new T(g); }
47 static Factory factory;
50 // The no-op expression is necessary to instantiate the static member
51 RegisteredTool() { (void)factory; }
55 typename RegisteredTool<T>::Factory RegisteredTool<T>::factory;