Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
DataSource< diff::GenNode > Struct Reference

#include "lib/text-template-gen-node-binding.hpp"

Description

Data-binding for a tree of GenNode data (ETD).

Attributes are accessible as keys, while iteration descends into the child scope of the attribute indicated in the ${for <key>}` tag.

See also
TextTemplate_test::verify_ETD_binding()

Definition at line 73 of file text-template-gen-node-binding.hpp.

Public Types

using Node = diff::GenNode
 
using Rec = diff::Rec
 
using Value = std::string
 
using Iter = Rec::scopeIter
 

Public Attributes

Node const * data_
 
DataSourceparScope_
 

Public Member Functions

bool isSubScope ()
 
 DataSource (Node const &root)
 
Node const * findNode (string key)
 
bool contains (string key)
 
Value retrieveContent (string key)
 
Iter getSequence (string key)
 
DataSource openContext (Iter &iter)
 

Constructor & Destructor Documentation

◆ DataSource()

DataSource ( Node const &  root)
inline

Definition at line 82 of file text-template-gen-node-binding.hpp.

Member Typedef Documentation

◆ Node

Definition at line 75 of file text-template-gen-node-binding.hpp.

◆ Rec

using Rec = diff::Rec

Definition at line 76 of file text-template-gen-node-binding.hpp.

◆ Value

using Value = std::string

Definition at line 88 of file text-template-gen-node-binding.hpp.

◆ Iter

Definition at line 89 of file text-template-gen-node-binding.hpp.

Member Function Documentation

◆ isSubScope()

bool isSubScope ( )
inline

Definition at line 80 of file text-template-gen-node-binding.hpp.

◆ findNode()

Node const * findNode ( string  key)
inline

Definition at line 92 of file text-template-gen-node-binding.hpp.

References GenNode::data, DataCap::get(), Record< VAL >::get(), Record< VAL >::hasAttribute(), and GenNode::isNested().

+ Here is the call graph for this function:

◆ contains()

bool contains ( string  key)
inline

Definition at line 111 of file text-template-gen-node-binding.hpp.

◆ retrieveContent()

Value retrieveContent ( string  key)
inline

Definition at line 117 of file text-template-gen-node-binding.hpp.

◆ getSequence()

Iter getSequence ( string  key)
inline

Definition at line 123 of file text-template-gen-node-binding.hpp.

◆ openContext()

DataSource openContext ( Iter iter)
inline

Definition at line 135 of file text-template-gen-node-binding.hpp.

Member Data Documentation

◆ data_

Node const* data_

Definition at line 78 of file text-template-gen-node-binding.hpp.

◆ parScope_

DataSource* parScope_

Definition at line 79 of file text-template-gen-node-binding.hpp.

+ Collaboration diagram for DataSource< diff::GenNode >:

The documentation for this struct was generated from the following file: