cesium-native 0.43.0
Loading...
Searching...
No Matches
SchemaWriter.h
1#pragma once
2
3#include "CesiumGltfWriter/Library.h"
4
5#include <CesiumJsonWriter/ExtensionWriterContext.h>
6
7// forward declarations
8namespace CesiumGltf {
9struct Schema;
10}
11
12namespace CesiumGltfWriter {
13
18struct CESIUMGLTFWRITER_API SchemaWriterResult {
22 std::vector<std::byte> schemaBytes;
23
27 std::vector<std::string> errors;
28
32 std::vector<std::string> warnings;
33};
34
38struct CESIUMGLTFWRITER_API SchemaWriterOptions {
42 bool prettyPrint = false;
43};
44
80
81} // namespace CesiumGltfWriter
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how schema extensions are written.
SchemaWriterResult writeSchema(const CesiumGltf::Schema &schema, const SchemaWriterOptions &options=SchemaWriterOptions()) const
Serializes the provided schema object into a byte vector using the provided flags to convert.
SchemaWriter()
Constructs a new instance.
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how schema extensions are written.
A context for writing extensions where known extensions and their handlers can be registered.
Classes for writing glTF models.
Definition GltfWriter.h:14
Classes for working with glTF models.
Options for how to write a schema.
The result of writing a schema with SchemaWriter::writeSchema.
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
std::vector< std::byte > schemaBytes
The final generated std::vector<std::byte> of the schema JSON.
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
An object defining classes and enums.
Definition Schema.h:18