]> git.tdb.fi Git - gldbg.git/blobdiff - source/tool.cpp
Add framework necessary to support more modular tools
[gldbg.git] / source / tool.cpp
diff --git a/source/tool.cpp b/source/tool.cpp
new file mode 100644 (file)
index 0000000..0e2cae1
--- /dev/null
@@ -0,0 +1,22 @@
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2010  Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#include "tool.h"
+
+using namespace std;
+
+list<Tool::Factory *> &Tool::get_factories()
+{
+       static list<Tool::Factory *> factories;
+       return factories;
+}
+
+
+Tool::Factory::Factory()
+{
+       get_factories().push_back(this);
+}