Backends are registered centrally and used to transition DOM formats to and from a textual format. More...
#include <DomBackend.h>
Inherited by AZ::Dom::JsonBackend< ParseFlags, WriteFormat >.
Public Types | |
using | WriteCallback = AZStd::function< Visitor::Result(Visitor &)> |
Public Member Functions | |
virtual Visitor::Result | ReadFromBuffer (const char *buffer, size_t size, AZ::Dom::Lifetime lifetime, Visitor &visitor)=0 |
Attempt to read this format from the given buffer into the target Visitor. | |
virtual Visitor::Result | ReadFromBufferInPlace (char *buffer, AZStd::optional< size_t > size, Visitor &visitor) |
virtual Visitor::Result | WriteToBuffer (AZStd::string &buffer, WriteCallback callback)=0 |
Attempt to write a value to the specified string using a write callback. | |
Backends are registered centrally and used to transition DOM formats to and from a textual format.
A callback that accepts a Visitor, making DOM calls to inform the serializer, and returns an aggregate error code to indicate whether or not the operation succeeded.
|
pure virtual |
Attempt to read this format from the given buffer into the target Visitor.
Implemented in AZ::Dom::JsonBackend< ParseFlags, WriteFormat >.
|
virtual |
Attempt to read this format from a mutable string into the target Visitor. This enables some backends to parse without making additional string allocations. This string must be null terminated. This string may be modified and read in place without being copied, so when calling this please ensure that:
Reimplemented in AZ::Dom::JsonBackend< ParseFlags, WriteFormat >.
|
pure virtual |
Attempt to write a value to the specified string using a write callback.
Implemented in AZ::Dom::JsonBackend< ParseFlags, WriteFormat >.