Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Special collection to represent object-like data.
To be used in a context where introspection, open, extensible definitions and loose coupling of data representation matters. Typically, structures defined in terms of Record elements are linked to the actual core representation of the same entities relying on diff messages. Record is one of the supported flavours within the DataCap of GenNode elements, which in turn serve as the standard handle to refer to other elements, entities, attributes or references within the "backbone" of the Lumiera GUI.
A Record holds
The Record type is shaped from its intended use: It serves to symbolically represent objects in the "external tree description". Here, "objects" means objects for real, i.e. with types, fields and an enclosed scope. Yet the term external means that we do not work on these objects right here, we only represent them, for later referral, symbolically.
This leads to the following decisions
Record entities are meant to be immutable. The proper way to alter a Record is to apply a diff. Yet for the implementation of this diff handling, a Record::Mutator is provided, to allow controlled partial re-building of a given data element. Moreover, especially for Record<GenNode>, this mutator can be used for a DSL-style compact notation of a complete "object tree" – a feature intended for writing unit tests.
Definition in file record.hpp.
#include "lib/error.hpp"
#include "lib/nocopy.hpp"
#include "lib/iter-adapter.hpp"
#include "lib/iter-adapter-stl.hpp"
#include "lib/itertools.hpp"
#include "lib/format-util.hpp"
#include "lib/util.hpp"
#include <algorithm>
#include <utility>
#include <vector>
#include <string>
Classes | |
class | Record< VAL >::Mutator |
class | PlantingHandle< BA, DEFAULT > |
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBuffer, without having to disclose the concrete buffer type or size. More... | |
class | Record< VAL > |
object-like record of data. More... | |
class | RecordRef< VAL > |
wrapped record reference. More... | |
struct | RecordSetup< VAL > |
struct | RecordSetup< string > |
Type configuration (extension point). More... | |
Functions | |
template<typename VAL > | |
Record< VAL >::Mutator & | mutateInPlace (Record< VAL > &record_to_mutate) |
open an existing record for modification in-place. More... | |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |
lib::idi | |
Identification Schemes. | |
|
inline |
open an existing record for modification in-place.
Definition at line 594 of file record.hpp.
References lib::diff::mutateInPlace().
Referenced by lib::diff::mutateInPlace().