File indexing completed on 2025-01-05 04:01:18

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "io/binary_stream.hpp"
0010 
0011 #include "type_system.hpp"
0012 
0013 namespace glaxnimate::io::rive {
0014 
0015 
0016 
0017 class RiveSerializer
0018 {
0019 public:
0020     explicit RiveSerializer(QIODevice* file);
0021 
0022     void write_header(int vmaj, int vmin, Identifier file_id);
0023 
0024     void write_property_table(const PropertyTable& properties);
0025 
0026     void write_object(const Object& output);
0027 
0028     void write_property_value(PropertyType id, const QVariant& value);
0029 
0030 private:
0031     BinaryOutputStream stream;
0032 };
0033 
0034 } // namespace glaxnimate::io::rive