Add to_json and from_json script functions

This commit is contained in:
GenevensiS
2025-08-07 18:45:12 +02:00
committed by GitHub
parent 12eb39b5e2
commit dc348b4812
18 changed files with 748 additions and 142 deletions
+5 -4
View File
@@ -25,8 +25,9 @@ DECLARE_POINTER_TYPE(StyleSheet);
class Writer {
public:
/// Construct a writer that writes to the given output stream
Writer(OutputStream& output);
Writer(OutputStream& output, Version file_app_version);
/// Tell the reflection code we are not reading
static constexpr bool isReading = false;
static constexpr bool isWriting = true;
@@ -72,11 +73,11 @@ public:
// special behaviour
void handle(const GameP&);
void handle(const StyleSheetP&);
private:
// --------------------------------------------------- : Data
/// Indentation of the current block
int indentation;
private:
// --------------------------------------------------- : Data
/// Blocks opened to which nothing has been written
vector<const Char*> pending_opened;