#include <sol3/core/message_schema.h>
◆ EvolutionPolicy
How should this schema evolve.
| Enumerator |
|---|
| ALWAYS | This schema should always be updated, useful for dynamic runtime introspection where we want to be able to parse and introspect every field on the wire
|
| FORWARDS_COMPATIBLE | This schema should only be used for reading flatbuffers which are forwards compatible. Useful if using compile time types to access message fields.
|
◆ MessageSchema() [1/2]
| sol3::core::MessageSchema::MessageSchema |
( |
| ) |
|
|
default |
◆ MessageSchema() [2/2]
| sol3::core::MessageSchema::MessageSchema |
( |
flatbuffers::span< uint8_t const > |
schema_buffer, |
|
|
EvolutionPolicy |
policy |
|
) |
| |
◆ conformsTo()
| std::string sol3::core::MessageSchema::conformsTo |
( |
MessageSchema const & |
previous_schema | ) |
const |
Tests if this schema is a forwards/backwards compatible evolution of the provided previous schema.
See: https://flatbuffers.dev/evolution/
returns non-empty string that describes any compatibility issues
◆ evolve()
| void sol3::core::MessageSchema::evolve |
( |
MessageSchema const & |
new_schema | ) |
|
This will "evolve" the current schema object to the new schema object based on the EvolutionPolicy. This will throw an exception if the new_schema does not match the policy.
Note this will not change the underlying policy.
◆ fileIdentifier()
| uint32_t sol3::core::MessageSchema::fileIdentifier |
( |
| ) |
const |
Returns the flatbuffer file identifier, or 0 if not set.
◆ fileIdentifierString()
| std::string sol3::core::MessageSchema::fileIdentifierString |
( |
| ) |
const |
Returns the flatbuffer file identifier string, or empty if not set.
◆ operator bool()
| sol3::core::MessageSchema::operator bool |
( |
| ) |
const |
◆ operator!=()
| bool sol3::core::MessageSchema::operator!= |
( |
MessageSchema const & |
schema | ) |
const |
|
inline |
◆ operator==()
| bool sol3::core::MessageSchema::operator== |
( |
MessageSchema const & |
schema | ) |
const |
Tests if the schema is byte for byte equivalent to the current schema.
◆ parser()
Returns a parser that can be used to generate json from messages from this schema.
◆ policy()
◆ schemaBufferSpan()
| flatbuffers::span<uint8_t const> sol3::core::MessageSchema::schemaBufferSpan |
( |
| ) |
const |
|
inline |
◆ table()
| reflection::Schema const* sol3::core::MessageSchema::table |
( |
| ) |
const |
◆ toJson()
Convert a verified buffer to JSON using this schema.
◆ verify()
| bool sol3::core::MessageSchema::verify |
( |
flatbuffers::span< uint8_t const > |
buffer | ) |
const |
The documentation for this class was generated from the following file: