summaryrefslogtreecommitdiff
path: root/src/factories/BaseFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/factories/BaseFactory.h')
-rw-r--r--src/factories/BaseFactory.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/factories/BaseFactory.h b/src/factories/BaseFactory.h
index 18c03ef..5dc8b81 100644
--- a/src/factories/BaseFactory.h
+++ b/src/factories/BaseFactory.h
@@ -71,7 +71,16 @@ T GetSafeNode(YAML::Node& node, const std::string& key, const T& def) {
return node[key].as<T>();
}
-class IParsedData {};
+class IParsedData {
+public:
+ virtual std::optional<std::vector<uint8_t>> ToCacheBuffer() {
+ return std::nullopt;
+ }
+
+ virtual void FromCacheBuffer(std::vector<uint8_t>& buffer) {
+
+ }
+};
template<typename T>
class GenericData : public IParsedData {
@@ -103,7 +112,10 @@ public:
}
virtual uint32_t GetAlignment() {
return 4;
- };
+ }
+ virtual bool IsCacheable() {
+ return false;
+ }
private:
virtual std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() = 0;
}; \ No newline at end of file