cesium-native  0.41.0
SchemaWriter.h
1 #pragma once
2 
3 #include "Cesium3DTilesWriter/Library.h"
4 
5 #include <CesiumJsonWriter/ExtensionWriterContext.h>
6 
7 // forward declarations
8 namespace Cesium3DTiles {
9 struct Schema;
10 }
11 
12 namespace Cesium3DTilesWriter {
13 
18 struct CESIUM3DTILESWRITER_API SchemaWriterResult {
22  std::vector<std::byte> schemaBytes;
23 
27  std::vector<std::string> errors;
28 
32  std::vector<std::string> warnings;
33 };
34 
38 struct CESIUM3DTILESWRITER_API SchemaWriterOptions {
42  bool prettyPrint = false;
43 };
44 
48 class CESIUM3DTILESWRITER_API SchemaWriter {
49 public:
54 
59 
64 
74  const Cesium3DTiles::Schema& schema,
75  const SchemaWriterOptions& options = SchemaWriterOptions()) const;
76 
77 private:
79 };
80 
81 } // namespace Cesium3DTilesWriter
SchemaWriter()
Constructs a new instance.
SchemaWriterResult writeSchema(const Cesium3DTiles::Schema &schema, const SchemaWriterOptions &options=SchemaWriterOptions()) const
Serializes the provided schema object into a byte vector using the provided flags to convert.
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 3D Tiles.
Definition: Library.h:6
Classes for using 3D Tiles.
Definition: Buffer.h:7
Options for how to write a schema.
Definition: SchemaWriter.h:38
The result of writing a schema with SchemaWriterWriter::writeSchema.
Definition: SchemaWriter.h:18
std::vector< std::byte > schemaBytes
The final generated std::vector<std::byte> of the schema JSON.
Definition: SchemaWriter.h:22
std::vector< std::string > warnings
Warnings, if any, that occurred during the write process.
Definition: SchemaWriter.h:32
std::vector< std::string > errors
Errors, if any, that occurred during the write process.
Definition: SchemaWriter.h:27
An object defining classes and enums.
Definition: Schema.h:19