mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method - Handler classes - Binary(De)Serializer now have 'version' field - Serialization versioning now uses named enum Save compatibility with 1.4.X saves should be intact
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "BinaryDeserializer.h"
|
||||
#include "SerializerVersion.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
@@ -21,11 +22,11 @@ public:
|
||||
std::string fName;
|
||||
std::unique_ptr<std::fstream> sfile;
|
||||
|
||||
CLoadFile(const boost::filesystem::path & fname, int minimalVersion = SERIALIZATION_VERSION); //throws!
|
||||
CLoadFile(const boost::filesystem::path & fname, ESerializationVersion minimalVersion = ESerializationVersion::CURRENT); //throws!
|
||||
virtual ~CLoadFile();
|
||||
int read(void * data, unsigned size) override; //throws!
|
||||
|
||||
void openNextFile(const boost::filesystem::path & fname, int minimalVersion); //throws!
|
||||
void openNextFile(const boost::filesystem::path & fname, ESerializationVersion minimalVersion); //throws!
|
||||
void clear();
|
||||
void reportState(vstd::CLoggerBase * out) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user