Add: store headers for chunks with SL_STRUCTLIST

This commit is contained in:
Patric Stout
2021-06-07 11:35:21 +02:00
committed by Patric Stout
parent cdb3dd0493
commit 3826703bc3
16 changed files with 1149 additions and 271 deletions

View File

@@ -456,7 +456,7 @@ public:
/**
* Get the pre-header description of the fields in the savegame.
*/
virtual SaveLoadCompatTable GetCompatDescription() const { return {}; }
virtual SaveLoadCompatTable GetCompatDescription() const = 0;
/**
* Get the description for how to load the chunk. Depending on the
@@ -481,6 +481,7 @@ template <class TImpl, class TObject>
class DefaultSaveLoadHandler : public SaveLoadHandler {
public:
SaveLoadTable GetDescription() const override { return static_cast<const TImpl *>(this)->description; }
SaveLoadCompatTable GetCompatDescription() const override { return static_cast<const TImpl *>(this)->compat_description; }
virtual void Save(TObject *object) const {}
void Save(void *object) const override { this->Save(static_cast<TObject *>(object)); }