]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser.h
Various fixes of issues reported by static analyzers.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser.h
index 0cda75b63f6aec9a43906408314a62f7b72c712b..8bddc5178055cbab605b1efe0258d397a26a2f03 100644 (file)
@@ -22,6 +22,7 @@
 #define PARSER_H
 
 #include <string>
+#include <map>
 
 class ADMIN;
 
@@ -30,8 +31,10 @@ class BASE_PARSER
     public:
         struct FACTORY
         {
-            virtual BASE_PARSER * create() = 0;
+            virtual ~FACTORY() {}
+            virtual BASE_PARSER * create(const ADMIN & admin) = 0;
         };
+        typedef std::map<std::string, FACTORY *> REGISTRY;
 
         BASE_PARSER(const ADMIN & admin, const std::string & t)
             : m_currAdmin(admin),