aboutsummaryrefslogtreecommitdiff
path: root/Parser.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-22 14:44:47 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-22 14:44:47 +0200
commit8c0562c8ef37cd5e80c58609f7bc7ae352365f65 (patch)
tree42e9906c5ddf1b0e719ee3eb7b965a444be64c38 /Parser.h
parentbc02054d56118110a36aea72d21f9d5e73d07d1f (diff)
refactor parser factory
Diffstat (limited to 'Parser.h')
-rw-r--r--Parser.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/Parser.h b/Parser.h
index 01efb3c..c6a2cf1 100644
--- a/Parser.h
+++ b/Parser.h
@@ -5,7 +5,15 @@
class Parser {
public:
- virtual void parse(FileReader & f, MuseumDeserializer & d) = 0;
- virtual unsigned int heuristic(FileReader & f) = 0;
+ virtual void parse(MuseumDeserializer & d) = 0;
+ virtual unsigned int heuristic() = 0;
+
+protected:
+ friend class ParserFactory;
+ void set_file(FileReader & f);
+ FileReader & get_file();
+
+private:
+ FileReader * file = nullptr;
};