From d1024b559c44a143eca214fb8732001080e8b037 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 6 Dec 2024 17:33:40 -0500 Subject: Change output format to zstd compressed Godot serialized variant --- generator/godot_variant.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 generator/godot_variant.h (limited to 'generator/godot_variant.h') diff --git a/generator/godot_variant.h b/generator/godot_variant.h new file mode 100644 index 0000000..6f2651a --- /dev/null +++ b/generator/godot_variant.h @@ -0,0 +1,28 @@ +#ifndef GODOT_VARIANT_H_84682779 +#define GODOT_VARIANT_H_84682779 + +#include +#include +#include +#include +#include +#include + +struct GodotVariant { + using variant_type = std::variant, + std::vector >; + + variant_type value; + + GodotVariant(int32_t v) : value(v) {} + GodotVariant(std::string v) : value(std::move(v)) {} + GodotVariant(std::map v) : value(std::move(v)) {} + GodotVariant(std::vector v) : value(std::move(v)) {} + + bool operator<(const GodotVariant& rhs) const; + + void Serialize(std::basic_ostream& output) const; +}; + +#endif /* end of include guard: GODOT_VARIANT_H_84682779 */ -- cgit 1.4.1