cesium-native 0.67.0
Loading...
Searching...
No Matches
SchemaWriter.h
1#pragma once
2
3#include <CesiumJsonWriter/ExtensionWriterContext.h>
4#include <CesiumTilesetJsonWriter/Library.h>
5
6// forward declarations
7namespace CesiumTilesetJson {
8struct Schema;
9}
10
12
17struct CESIUMTILESETJSONWRITER_API SchemaWriterResult {
21 std::vector<std::byte> schemaBytes;
22
26 std::vector<std::string> errors;
27
31 std::vector<std::string> warnings;
32};
33
37struct CESIUMTILESETJSONWRITER_API SchemaWriterOptions {
41 bool prettyPrint = false;
42};
43
79
80} // namespace CesiumTilesetJsonWriter
A context for writing extensions where known extensions and their handlers can be registered.
SchemaWriterResult writeSchema(const CesiumTilesetJson::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.
CesiumJsonWriter::ExtensionWriterContext & getExtensions()
Gets the context used to control how schema extensions are written.
const CesiumJsonWriter::ExtensionWriterContext & getExtensions() const
Gets the context used to control how schema extensions are written.
Classes for writing a tileset.json from 3D Tiles 1.1.
Classes to represent a tileset.json from 3D Tiles 1.1.
Options for how to write a schema.
bool prettyPrint
If the schema JSON should be pretty printed.
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::string > errors
Errors, if any, that occurred during the write process.
std::vector< std::byte > schemaBytes
The final generated std::vector<std::byte> of the schema JSON.
An object defining classes and enums.
Definition Schema.h:19