|
|
The payload of one entity instance, in either ARON representation. More...
#include <RobotAPI/libraries/armem/core/Commit.h>
Public Member Functions | |
| InstanceData () | |
| InstanceData (aron::data::DictPtr variant) | |
Implicit by design, so that = {dto.toAron()} keeps working unchanged. | |
| InstanceData (aron::data::dto::DictPtr dto) | |
Implicit by design, so that = {dto.toAronDTO()} reads the same way. | |
| InstanceData (const InstanceData &other) | |
| InstanceData (InstanceData &&other) noexcept | |
| operator bool () const | |
| Whether any data is held at all. Instance data may legitimately be null. | |
| InstanceData & | operator= (const InstanceData &other) |
| InstanceData & | operator= (InstanceData &&other) noexcept |
| aron::data::dto::DictPtr | toDTO () const |
| The ice representation. Cheap in both cases: a variant keeps its ice object alive. | |
| aron::data::DictPtr | toVariant () const |
| The variant representation. | |
| ~InstanceData () | |
The payload of one entity instance, in either ARON representation.
ARON data exists in two forms: the variant form (aron::data::Dict), which is a navigable object graph carrying paths, and the ice form (aron::data::dto::Dict), which is what actually goes over the wire.
Producing the variant form only to send it is pure overhead – it costs roughly a dozen heap allocations per ARON node and is then converted to ice by copying a pointer. Writers that do not need to navigate what they wrote can therefore hand over toAronDTO() instead of toAron() and skip building the graph.
This class accepts both implicitly, so existing call sites are unaffected and writers can be moved over one at a time.
|
default |
| InstanceData | ( | aron::data::DictPtr | variant | ) |
Implicit by design, so that = {dto.toAron()} keeps working unchanged.
Implicit by design, so that = {dto.toAronDTO()} reads the same way.
|
default |
|
noexcept |
|
default |
|
explicit |
Whether any data is held at all. Instance data may legitimately be null.
|
default |
|
noexcept |
| aron::data::dto::DictPtr toDTO | ( | ) | const |
The ice representation. Cheap in both cases: a variant keeps its ice object alive.
| aron::data::DictPtr toVariant | ( | ) | const |
The variant representation.
Built on first use if this was constructed from the ice form, and cached afterwards.