aboutsummaryrefslogtreecommitdiff
path: root/src/tool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool.h')
-rw-r--r--src/tool.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/tool.h b/src/tool.h
index 49d069aac..a2a94f7fc 100644
--- a/src/tool.h
+++ b/src/tool.h
@@ -51,9 +51,32 @@ struct ToolDiggingProperties
{}
};
-std::string tool_get_imagename(const std::string &toolname);
+struct ToolDefinition
+{
+ std::string imagename;
+ ToolDiggingProperties properties;
+
+ ToolDefinition(){}
+ ToolDefinition(const std::string &imagename_,
+ ToolDiggingProperties properties_):
+ imagename(imagename_),
+ properties(properties_)
+ {}
+};
+
+class IToolDefManager
+{
+public:
+ IToolDefManager(){}
+ virtual ~IToolDefManager(){}
+ virtual bool registerTool(std::string toolname, const ToolDefinition &def)=0;
+ virtual ToolDefinition* getToolDefinition(const std::string &toolname)=0;
+ virtual std::string getImagename(const std::string &toolname)=0;
+ virtual ToolDiggingProperties getDiggingProperties(
+ const std::string &toolname)=0;
+};
-ToolDiggingProperties tool_get_digging_properties(const std::string &toolname);
+IToolDefManager* createToolDefManager();
#endif