|
|
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 |
Here is the caller graph for this function:| InstanceData | ( | aron::data::DictPtr | variant | ) |
Implicit by design, so that = {dto.toAron()} keeps working unchanged.
Definition at line 34 of file Commit.cpp.
Implicit by design, so that = {dto.toAronDTO()} reads the same way.
Definition at line 38 of file Commit.cpp.
|
default |
Here is the call graph for this function:
|
noexcept |
|
default |
|
explicit |
Whether any data is held at all. Instance data may legitimately be null.
Definition at line 65 of file Commit.cpp.
|
default |
Here is the call graph for this function:
|
noexcept |
| aron::data::dto::DictPtr toDTO | ( | ) | const |
The ice representation. Cheap in both cases: a variant keeps its ice object alive.
Definition at line 43 of file Commit.cpp.
| aron::data::DictPtr toVariant | ( | ) | const |
The variant representation.
Built on first use if this was constructed from the ice form, and cached afterwards.
Definition at line 55 of file Commit.cpp.
Here is the call graph for this function: