Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
A complement to allow instantiation of a TextTemplate with ETD data.
Instead of requiring a specific data source type, the text template engine relies on an extension point through a data-binding template, which can be (partially) specialised to implement data access for any suitable kind of structured data. The Lumiera ETD is a recursive data type comprised of lib::diff::GenNode elements, which in turn can hold a small selection of binary data elements. This scheme for structured data is widely used for internal communication between the components of the Lumiera application; it offers all the structural elements to provide a full featured backing data structure for the text template engine.
Since the ETD is based on binary data, we need to invoke a string rendering during data access, in the end relying on util::toString(). This limits the precision of floating-pont and time data (assuming this is adequate for the purpose of instantiating placeholders in a text template). A further challenge arises from the openness of the ETD format, which is intended for loose coupling between subsystems, and deliberately imposes not much structural constraints, while also offering only very limited introspection capabilities (to prevent a »programming by inspection« style). Some further conventions are thus necessary
${value}
placeholder in that scope.Definition in file text-template-gen-node-binding.hpp.
Classes | |
struct | DataSource< diff::GenNode > |
Data-binding for a tree of GenNode data (ETD). More... | |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |