Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
gen-node.hpp
Go to the documentation of this file.
1/*
2 GEN-NODE.hpp - generic node element for tree like data representation
3
4 Copyright (C)
5 2015, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
94#ifndef LIB_DIFF_GEN_NODE_H
95#define LIB_DIFF_GEN_NODE_H
96
97
98#include "lib/error.hpp"
99#include "lib/idi/entry-id.hpp"
100#include "lib/time/timevalue.hpp"
101#include "lib/diff/record.hpp"
102#include "lib/variant.hpp"
103#include "lib/util.hpp"
104
105#include <optional>
106#include <utility>
107#include <string>
108#include <deque>
109
110namespace lib {
111namespace diff{
112
113 namespace error = lumiera::error;
114
115 struct GenNode;
116 struct Ref;
117
119 template<>
121 {
122 using Storage = std::vector<GenNode>;
123 using ElmIter = Storage::const_iterator;
124
127 using Access = GenNode const&;
128 };
129
130
131
132
137 ,int64_t
138 ,short
139 ,char
140 ,bool
141 ,double
142 ,string
148 ,RecRef
149 ,Rec
150 >;
151
152
153
155 : public Variant<DataValues>
156 {
157 public:
158 template<typename X>
159 DataCap(X&& x)
160 : Variant<DataValues>(std::forward<X>(x))
161 { }
162
164 DataCap(DataCap const&) =default;
165 DataCap(DataCap&&) =default;
167 : DataCap((DataCap const&)o)
168 { }
169
170 DataCap& operator= (DataCap const&) =default;
172
173 bool matchData (DataCap const&) const;
174 bool matchNum (int64_t) const;
175 bool matchTxt (string const&) const;
176 bool matchTime (time::TimeValue) const;
177 bool matchBool (bool) const;
178 bool matchDbl (double) const;
179 bool matchLuid (hash::LuidH) const;
180 bool matchRec (RecRef const&) const;
181 bool matchRec (Rec const&) const;
182
183 struct Locator;
184 Locator expand() const;
185
186 operator string() const;
187
188 template<typename X>
189 X& get();
190 template<typename X>
191 X const& get() const;
192
195 childIter() const
196 {
197 const Rec* rec = unConst(this)->maybeGet<Rec>();
198 if (!rec)
199 return Rec::scopeIter();
200 else
201 return rec->scope();
202 }
203
205 bool isNested() const;
206
208 string recordType() const;
209
211 template<typename X>
212 std::optional<X>
213 retrieveAttribute (string key) const;
214
215 bool hasAttribute (string key) const;
216
217 private:
219 };
220
221
223 struct GenNode
224 {
225 class ID
226 : public idi::BareEntryID
227 {
228 friend struct GenNode;
229
230 template<typename X>
231 ID (X*, string const& symbolicID)
232 : idi::BareEntryID (symbolicID,
233 idi::getTypeHash<X>())
234 { }
235
237 : idi::BareEntryID{move (rawD)}
238 { }
239
240 public:
241 explicit
242 ID (GenNode const& node)
243 : ID(node.idi)
244 { }
245
246 // standard copy operations acceptable
247
248 operator string() const
249 {
250 return "ID(\""+getSym()+"\")";
251 }
252 };
253
254
255 //------GenNode Data fields---
256
259
260
261 template<typename X>
262 GenNode(X&& val)
263 : idi(&val, buildChildID<X>())
264 , data(std::forward<X>(val))
265 { }
266
267 template<typename X>
268 GenNode(string const& symbolicID, X&& val)
269 : idi(&val, symbolicID)
270 , data(std::forward<X>(val))
271 { }
272
273 GenNode(string const& symbolicID, CStr text)
274 : GenNode(symbolicID, string(text))
275 { }
276
278 : GenNode(string(text))
279 { }
280
282 GenNode(GenNode const&) =default;
283 GenNode(GenNode&&) =default;
284 GenNode(GenNode& o) : GenNode((GenNode const&)o) { }
285 GenNode(Ref const& r);
286 GenNode(Ref & r);
287 GenNode(Ref && r);
288
305 GenNode&
307 {
308 if (&o != this)
309 {
310 data = o.data;
311 idi = o.idi;
312 }
313 return *this;
314 }
315
316 GenNode&
318 {
319 ASSERT (&o != this);
320 data = std::forward<DataCap>(o.data);
321 idi = std::forward<ID>(o.idi);
322 return *this;
323 }
324
325 //note: NOT defining a swap operation, because swapping inline storage is pointless!
326
327
328
329
331 operator string() const
332 {
333 return "GenNode-"+string(idi)+"-"+string(data);
334 }
335
336 bool
337 isNamed() const
338 {
339 return not util::startsWith (idi.getSym(), "_CHILD_");
340 }
341
342 bool
343 isTypeID() const
344 {
345 return "type" == idi.getSym();
346 }
347
348 template<typename X>
349 bool contains (X const& elm) const;
350
351
352 bool matches (GenNode const& o) const { return this->matches(o.idi); }
353 bool matches (ID const& id) const { return idi == id; }
354 bool matches (int number) const { return data.matchNum(number);}
355 bool matches (int64_t number) const { return data.matchNum(number);}
356 bool matches (short number) const { return data.matchNum(number);}
357 bool matches (char number) const { return data.matchNum(number);}
358 bool matches (double number) const { return data.matchDbl(number);}
359 bool matches (string text) const { return data.matchTxt(text);}
360 bool matches (const char* text) const { return data.matchTxt(text);}
361 bool matches (time::TimeValue t) const { return data.matchTime(t); }
362 bool matches (bool b) const { return data.matchBool(b); }
363 bool matches (hash::LuidH h) const { return data.matchLuid(h); }
364 bool matches (RecRef const& ref) const { return data.matchRec(ref); }
365 bool matches (Rec const& rec) const { return data.matchRec(rec); }
366
367 class ScopeExplorer;
368
369 struct ScopeExplorerIterator;
371
372 iterator begin() ;
373 iterator begin() const;
374 iterator end() ;
375 iterator end() const;
376
377
379
387 friend ChildDataIter
389 {
390 return ChildDataIter{ n.data.childIter()
391 , [](GenNode const& child) ->DataCap const&
392 {
393 return child.data;
394 }
395 };
396 }
397
398 friend ChildDataIter
400 {
401 return ChildDataIter{ std::forward<Rec::scopeIter>(scopeIter)
402 , [](GenNode const& child) ->DataCap const&
403 {
404 return child.data;
405 }
406 };
407 }
408
409
410 friend string
411 name (GenNode const& node)
412 {
413 return node.idi.getSym();
414 }
415
416 friend bool
417 operator== (GenNode const& n1, GenNode const& n2)
418 {
419 return n1.idi == n2.idi
420 and n1.data.matchData(n2.data);
421 }
422
423 friend bool
424 operator!= (GenNode const& n1, GenNode const& n2)
425 {
426 return not (n1 == n2);
427 }
428
442 {
443 bool
444 operator() (GenNode const& left, GenNode const& right) const
445 {
446 return left.idi.getSym() < right.idi.getSym();
447 }
448 };
449
451 template<typename X>
452 static GenNode
453 asAttribute (idi::BareEntryID && rawID, X&& payload)
454 {
455 return GenNode{ID{move (rawID)}, DataCap{forward<X> (payload)}};
456 }
457
460 template<typename X>
461 std::optional<X>
462 retrieveAttribute (string key) const;
463
464 bool hasAttribute (string key) const;
465 bool isNested() const;
466 bool hasChildren() const;
468
469
470
471 protected:
473 GenNode (ID&& id, DataCap&& d)
474 : idi(std::move(id))
475 , data(std::move(d))
476 { }
477
478 template<typename X>
479 static GenNode::ID
480 fabricateRefID (string const& symbolicID)
481 {
482 X* typeID(0);
483 return ID(typeID, symbolicID);
484 }
485
486 private:
487 template<typename X>
488 static string
490 {
491 return "_CHILD_" + idi::generateSymbolicID<X>();
492 }
493 };
494
495
497 string renderCompact (GenNode const&);
498 string renderCompact (RecRef const&);
499 string renderCompact (Rec const&);
500
501
502
503
504
505
513 template<typename ELM>
515 {
518
519 template<class X>
521 template<class X>
522 static No check(...);
523
524 public:
525 static const bool value = (sizeof(Yes)==sizeof(check<ELM>(0)));
526 };
527
528
529
530
531 /* === iteration / recursive expansion === */
532
533
541 {
544
546 : node_(nullptr)
547 { }
548
549 Locator(GenNode const& n)
550 : node_(&n)
551 { }
552
553 Locator(Rec const& r)
554 : node_(nullptr)
555 , scope_(r.begin())
556 { }
557
558 const GenNode *
559 get() const
560 {
561 return node_? node_
562 : scope_? scope_.operator->()
563 : nullptr;
564 }
565
566 /* === Iteration control API for IterStateWrapper == */
567
568 bool
570 {
571 return this->get();
572 }
573
574 GenNode const&
575 yield() const
576 {
577 return *get();
578 }
579
580 void
582 {
583 if (node_)
584 node_ = nullptr;
585 else
586 ++scope_;
587 }
588 };
589
590
597 {
599
600 std::deque<ScopeIter> scopes_;
601
602 public:
605 {
606 scopes_.emplace_back(n);
607 }
608
609 size_t
610 depth() const
611 {
612 return scopes_.size();
613 }
614
615 /* === Iteration control API for IterStateWrapper == */
616
617 bool
619 {
620 return not scopes_.empty()
621 and bool(scopes_.back());
622 }
623
624 GenNode const&
625 yield() const
626 {
627 return *(scopes_.back());
628 }
629
630 void
632 {
633 ScopeIter& current = scopes_.back();
634 scopes_.emplace_back (current->data.expand());
635 ++current;
636 while (not scopes_.empty() and not scopes_.back())
637 scopes_.pop_back();
638 }
639
640 friend bool
642 {
643 return not s1.scopes_.empty()
644 and not s2.scopes_.empty()
645 and s1.scopes_.size() == s2.scopes_.size()
646 and s1.yield() == s2.yield();
647 }
648 };
649
650
652 inline DataCap::Locator
654 {
655 Rec* val = unConst(this)->maybeGet<Rec>();
656 if (!val)
657 return Locator();
658 else
659 return Locator(*val);
660 }
661
662
664 : IterStateWrapper<ScopeExplorer>
665 {
667
668 size_t level() const { return unConst(this)->stateCore().depth(); }
669 };
670
671
672 inline GenNode::iterator GenNode::begin() { return iterator(*this); }
673 inline GenNode::iterator GenNode::begin() const { return iterator(*this); }
675 inline GenNode::iterator GenNode::end() const { return iterator(); }
676
677 template<typename X>
678 inline bool
679 GenNode::contains (X const& elm) const
680 {
681 for (auto & n : *this)
682 if (n.matches(elm))
683 return true;
684 return false;
685 }
686
687
688
689
690 /* === References : special treatment on element access === */
691
692 template<typename X>
693 inline X&
695 {
697 }
698
699 template<typename X>
700 inline X const&
702 {
704 }
705
719 template<>
720 inline Rec&
722 {
723 Rec* rec = maybeGet<Rec>();
724 if (rec) return *rec;
725
727 }
728
729 template<>
730 inline Rec const&
732 {
733 Rec* rec = unConst(this)->maybeGet<Rec>();
734 if (rec) return *rec;
735
737 }
738
740 inline Rec*
742 {
743 Rec* nested = maybeGet<Rec>();
744 if (!nested)
745 { // 2nd try: maybe we hold a reference?
746 RecRef* ref = maybeGet<RecRef>();
747 if (ref and not ref->empty())
748 nested = ref->get();
749 }
750 return nested;
751 }
752
760 inline string
762 {
763 Rec* nested = unConst(this)->maybeAccessNestedRec();
764 return nested? nested->getType()
765 : util::BOTTOM_INDICATOR;
766 }
767
768 inline bool
770 {
771 return nullptr != unConst(this)->maybeAccessNestedRec();
772 }
773
774
775 template<typename X>
776 inline std::optional<X>
777 DataCap::retrieveAttribute (string key) const
778 {
779 static_assert (not std::is_reference_v<X>
780 ,"optional access only possible by value");
781
782 Rec* nested = unConst(this)->maybeAccessNestedRec();
783 if (nested and nested->hasAttribute (key))
784 {
785 DataCap const& nestedAttributeData = nested->get(key).data;
786 X* payload = unConst(nestedAttributeData).maybeGet<X>();
787 if (payload) return *payload; // Note: payload copied into optional
788 }
789 return std::nullopt;
790 }
791
792 inline bool
793 DataCap::hasAttribute (string key) const
794 {
795 Rec* nested = unConst(this)->maybeAccessNestedRec();
796 return nested and nested->hasAttribute (key);
797 }
798
799 template<typename X>
800 inline std::optional<X>
801 GenNode::retrieveAttribute (string key) const
802 {
803 return data.retrieveAttribute<X> (key);
804 }
805
806 inline bool
807 GenNode::hasAttribute (string key) const
808 {
809 return data.hasAttribute (key);
810 }
811
812 inline bool
814 {
815 return data.isNested();
816 }
817
818 inline bool
820 {
821 return not isnil (data.childIter());
822 }
823
824 inline Rec::scopeIter
826 {
827 return data.childIter();
828 }
829
830
831
832
833
834
841 struct Ref
842 : GenNode
843 {
847 explicit
848 Ref(string const& symbolicID)
849 : GenNode(fabricateRefID<Rec> (symbolicID)//note: seeds the type hash with Rec, not RecRef
850 , DataCap(RecRef())) // note: places NIL into the reference part
851 { }
852
856 Ref(GenNode& oNode)
857 : GenNode(ID(oNode)
858 , DataCap(RecRef(oNode.data.get<Rec>())))
859 { }
860
861 static const Ref I;
862 static const Ref NO;
863 static const Ref END;
864 static const Ref THIS;
865 static const Ref CHILD;
866 static const Ref ATTRIBS;
867 };
868
869
870 // slice down on copy construction...
871 inline GenNode::GenNode(Ref const& r) : idi(r.idi), data(r.data) { }
872 inline GenNode::GenNode(Ref & r) : idi(r.idi), data(r.data) { }
873 inline GenNode::GenNode(Ref && r) : idi(std::move(r.idi)),
874 data(std::move(r.data)) { }
875
876
877 /* === Specialisation to add fluent GenNode builder API to Record<GenNode> === */
878
879 template<>
880 inline GenNode
882 {
883 return GenNode{std::move(record_)};
884 }
885
886 template<>
887 inline GenNode
889 {
890 return GenNode::asAttribute (std::move(rawID), std::move(record_));
891 }
892
893 template<>
894 inline GenNode
895 MakeRec::genNode (string const& symbolicID)
896 {
897 return GenNode{symbolicID, std::move(record_)};
898 }
899
900
901 /* === Extension point to apply a tree-diff === */
902
907 template<>
908 void MakeRec::buildMutator (BufferHandle buff);
909
910
911
912 /* === Specialisation for handling of attributes in Record<GenNode> === */
913
914 template<>
915 inline bool
916 Rec::isAttribute (GenNode const& attrib)
917 {
918 return attrib.isNamed();
919 }
920
921 template<>
922 inline bool
923 Rec::isTypeID (GenNode const& attrib)
924 {
925 return attrib.isTypeID();
926 }
927
928 template<>
929 inline string
930 Rec::extractTypeID (GenNode const& v)
931 {
932 return isTypeID(v)? v.data.get<string>()
933 : Rec::TYPE_NIL;
934 }
935
936 template<>
937 inline string
938 Rec::extractKey (GenNode const& v)
939 {
940 return isAttribute(v)? v.idi.getSym()
941 : "";
942 }
943
944 template<>
945 inline GenNode const&
946 Rec::extractVal (GenNode const& v)
947 {
948 return v;
949 }
950
951 template<>
952 inline string
953 Rec::renderAttribute (GenNode const& a)
954 {
955 return a.idi.getSym() +" = "+ string(a.data);
956 }
957
958 template<>
959 template<typename X>
960 inline GenNode
961 Rec::buildAttribute (string const& key, X&& payload)
962 {
963 return GenNode{key, forward<X>(payload)};
964 }
965
966
967
968}// namespace lib::diff
969
970namespace variant {
971 using diff::Rec;
972
977 template<typename TYPES>
978 struct CanBuildFrom<diff::MakeRec, Node<Rec, TYPES>>
979 : std::true_type
980 {
981 using Type = Rec;
982 };
983
984}} // namespace lib::variant
985#endif /*LIB_DIFF_GEN_NODE_H*/
Another Lumiera Forward Iterator building block, based on incorporating a state type as »*State Core*...
Iterator tool treating pulled data by a custom transformation (function)
Typesafe union record.
Definition variant.hpp:216
bool matchRec(RecRef const &) const
Definition gen-node.cpp:253
bool matchTxt(string const &) const
Definition gen-node.cpp:178
bool matchBool(bool) const
Definition gen-node.cpp:237
DataCap & operator=(DataCap const &)=default
bool matchNum(int64_t) const
Definition gen-node.cpp:122
DataCap(DataCap const &)=default
Rec::scopeIter childIter() const
visit children of a nested Record<GenNode>
Definition gen-node.hpp:195
Rec * maybeAccessNestedRec()
Definition gen-node.hpp:741
X const & get() const
bool matchDbl(double) const
Definition gen-node.cpp:150
bool hasAttribute(string key) const
Definition gen-node.hpp:793
bool matchTime(time::TimeValue) const
Definition gen-node.cpp:209
std::optional< X > retrieveAttribute(string key) const
peek into the attributes of a nested Record
Definition gen-node.hpp:777
bool matchData(DataCap const &) const
Implementation of content equality test, delgating to content.
Definition gen-node.cpp:78
Locator expand() const
Definition gen-node.hpp:653
string recordType() const
peek into the type field of a nested Record<GenNode>
Definition gen-node.hpp:761
bool matchLuid(hash::LuidH) const
Definition gen-node.cpp:245
DataCap(DataCap &&)=default
DataCap(DataCap &o)
Definition gen-node.hpp:166
bool isNested() const
determine if payload constitutes a nested scope ("object")
Definition gen-node.hpp:769
ID(X *, string const &symbolicID)
Definition gen-node.hpp:231
ID(GenNode const &node)
Definition gen-node.hpp:242
ID(idi::BareEntryID &&rawD)
Definition gen-node.hpp:236
Building block for monad-like depth-first expansion of a GenNode.
Definition gen-node.hpp:597
GenNode const & yield() const
Definition gen-node.hpp:625
std::deque< ScopeIter > scopes_
Definition gen-node.hpp:600
friend bool operator==(ScopeExplorer const &s1, ScopeExplorer const &s2)
Definition gen-node.hpp:641
IterStateWrapper< DataCap::Locator > ScopeIter
Definition gen-node.hpp:598
wrapped record reference.
Definition record.hpp:618
bool empty() const
Definition record.hpp:662
Target * get() const noexcept
Definition record.hpp:679
void buildMutator(BufferHandle)
attachment point to receive and apply tree-diff changes.
object-like record of data.
Definition record.hpp:142
static const string TYPE_NIL
Definition record.hpp:153
operator std::string() const
for diagnostic purpose
Definition record.hpp:792
static bool isAttribute(VAL const &v)
Access get(string key) const
Definition record.hpp:245
static string extractTypeID(VAL const &v)
bool hasAttribute(string key) const
Definition record.hpp:233
scopeIter scope() const
Definition record.hpp:319
string getType() const
Definition record.hpp:227
static VAL buildAttribute(string const &key, X &&payload)
IterAdapter< ElmIter, const Record * > iterator
Definition record.hpp:309
static string renderAttribute(VAL const &a)
static Access extractVal(VAL const &v)
iter_stl::_SeqT< const Storage >::Range scopeIter
Definition record.hpp:310
static bool isTypeID(VAL const &v)
static string extractKey(VAL const &v)
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor,...
type erased baseclass for building a combined hash and symbolic ID.
Definition entry-id.hpp:134
string const & getSym() const
Definition entry-id.hpp:169
Duration is the internal Lumiera time metric.
Offset measures a distance in time.
A time interval anchored at a specific point in time.
basic constant internal time value.
Lumiera's internal time value datatype.
Bare symbolic and hash ID used for accounting of asset like entries.
Lumiera error handling (C++ interface).
const char * CStr
Definition error.hpp:42
std::vector< GenNode > Storage
Definition gen-node.hpp:122
Storage::const_iterator ElmIter
Definition gen-node.hpp:123
Record< GenNode > Rec
Definition gen-node.hpp:133
GenNode const & Access
using const reference data access relevant for handling large subtrees
Definition gen-node.hpp:127
string renderCompact(Rec const &rec)
compact textual representation of a Record<GenNode> (»object«).
Definition gen-node.cpp:290
RecordRef< GenNode > RecRef
Definition gen-node.hpp:134
meta::Types< int,int64_t,short,char,bool,double,string,time::Time,time::Offset,time::Duration,time::TimeSpan,hash::LuidH,RecRef,Rec > DataValues
Definition gen-node.hpp:150
char Yes_t
helper types to detect the overload resolution chosen by the compiler
Definition meta/util.hpp:99
Type list with head and tail; T ≡ Nil marks list end.
Definition typelist.hpp:90
variadic sequence of types
Definition typelist.hpp:102
Implementation namespace for support and library code.
STL namespace.
bool startsWith(string const &str, string const &prefix)
check if string starts with a given prefix
Definition util.hpp:185
Special collection to represent object-like data.
GenNode const & yield() const
Definition gen-node.hpp:575
const GenNode * get() const
Definition gen-node.hpp:559
Locator(GenNode const &n)
Definition gen-node.hpp:549
allow for storage in ordered containers, ordering based on the human-readable ID within the GenNode.
Definition gen-node.hpp:442
bool operator()(GenNode const &left, GenNode const &right) const
Definition gen-node.hpp:444
generic data element node within a tree
Definition gen-node.hpp:224
GenNode & operator=(GenNode const &o)
copy assignment
Definition gen-node.hpp:306
bool matches(short number) const
Definition gen-node.hpp:356
bool matches(GenNode const &o) const
Definition gen-node.hpp:352
bool matches(bool b) const
Definition gen-node.hpp:362
friend bool operator!=(GenNode const &n1, GenNode const &n2)
Definition gen-node.hpp:424
static GenNode::ID fabricateRefID(string const &symbolicID)
Definition gen-node.hpp:480
bool matches(Rec const &rec) const
Definition gen-node.hpp:365
friend string name(GenNode const &node)
Definition gen-node.hpp:411
bool matches(string text) const
Definition gen-node.hpp:359
TransformIter< Rec::scopeIter, DataCap const & > ChildDataIter
Definition gen-node.hpp:378
bool matches(const char *text) const
Definition gen-node.hpp:360
bool contains(X const &elm) const
Definition gen-node.hpp:679
Rec::scopeIter getChildren() const
Definition gen-node.hpp:825
bool matches(double number) const
Definition gen-node.hpp:358
bool hasAttribute(string key) const
Definition gen-node.hpp:807
friend bool operator==(GenNode const &n1, GenNode const &n2)
Definition gen-node.hpp:417
friend ChildDataIter childData(Rec::scopeIter &&scopeIter)
Definition gen-node.hpp:399
GenNode(string const &symbolicID, X &&val)
Definition gen-node.hpp:268
bool matches(hash::LuidH h) const
Definition gen-node.hpp:363
std::optional< X > retrieveAttribute(string key) const
mismatch tolerant convenience shortcut to peek into the attributes of a nested Record
Definition gen-node.hpp:801
GenNode(GenNode const &)=default
bool matches(time::TimeValue t) const
Definition gen-node.hpp:361
bool isTypeID() const
Definition gen-node.hpp:343
bool isNamed() const
Definition gen-node.hpp:337
GenNode(GenNode &&)=default
GenNode(CStr text)
Definition gen-node.hpp:277
GenNode(ID &&id, DataCap &&d)
Definition gen-node.hpp:473
bool matches(int number) const
Definition gen-node.hpp:354
bool matches(ID const &id) const
Definition gen-node.hpp:353
bool hasChildren() const
Definition gen-node.hpp:819
GenNode(string const &symbolicID, CStr text)
Definition gen-node.hpp:273
friend ChildDataIter childData(GenNode const &n)
visit the data of nested child elements
Definition gen-node.hpp:388
static string buildChildID()
Definition gen-node.hpp:489
static GenNode asAttribute(idi::BareEntryID &&rawID, X &&payload)
fabricate a GenNode with the literally given ID
Definition gen-node.hpp:453
GenNode(GenNode &o)
Definition gen-node.hpp:284
bool matches(RecRef const &ref) const
Definition gen-node.hpp:364
bool isNested() const
Definition gen-node.hpp:813
bool matches(char number) const
Definition gen-node.hpp:357
ScopeExplorerIterator iterator
Definition gen-node.hpp:370
bool matches(int64_t number) const
Definition gen-node.hpp:355
Constructor for a specially crafted 'ref GenNode'.
Definition gen-node.hpp:843
Ref(GenNode &oNode)
build reference to a Record, using the original ID
Definition gen-node.hpp:856
static const Ref END
symbolic ID ref "_END_"
Definition gen-node.hpp:863
static const Ref I
symbolic ID ref "_I_"
Definition gen-node.hpp:861
Ref(string const &symbolicID)
create an empty ID stand-in.
Definition gen-node.hpp:848
static const Ref THIS
symbolic ID ref "_THIS_"
Definition gen-node.hpp:864
static const Ref NO
symbolic ID ref "_NO_"
Definition gen-node.hpp:862
static const Ref CHILD
symbolic ID ref "_CHILD_"
Definition gen-node.hpp:865
static const Ref ATTRIBS
symbolic ID ref "_ATTRIBS_"
Definition gen-node.hpp:866
metafunction to detect types able to be wrapped into a GenNode.
Definition gen-node.hpp:515
static Yes check(variant::CanBuildFrom< X, DataValues >::Type *)
a family of time value like entities and their relationships.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A typesafe union record to carry embedded values of unrelated type.