Lumiera  0.pre.03
»edit your freedom«
DataCap Class Reference

Description

Definition at line 162 of file gen-node.hpp.

Public Member Functions

template<typename X >
 DataCap (X &&x)
 
 DataCap (DataCap const &)=default
 
 DataCap (DataCap &&)=default
 
 DataCap (DataCap &o)
 
Rec::scopeIter childIter () const
 visit children of a nested Record<GenNode>
 
Locator expand () const
 
template<typename X >
X & get ()
 
template<typename X >
X const & get () const
 
template<>
Recget ()
 especially when accessing for a Record, a payload of type RecordRef<Record<GenNode>> (aka RecRef) will be automatically dereferenced. More...
 
template<>
Rec const & get () const
 
bool hasAttribute (string key) const
 
bool isNested () const
 determine if payload constitutes a nested scope ("object")
 
bool matchBool (bool) const
 
bool matchData (DataCap const &) const
 Implementation of content equality test, delgating to content. More...
 
bool matchDbl (double) const
 
bool matchLuid (hash::LuidH) const
 
bool matchNum (int64_t) const
 
bool matchRec (RecRef const &) const
 
bool matchRec (Rec const &) const
 
bool matchTime (time::TimeValue) const
 
bool matchTxt (string const &) const
 
 operator string () const
 
DataCapoperator= (DataCap const &)=default
 
DataCapoperator= (DataCap &&)=default
 
string recordType () const
 peek into the type field of a nested Record<GenNode> More...
 
template<typename X >
std::optional< X > retrieveAttribute (string key) const
 peek into the attributes of a nested Record
 
- Public Member Functions inherited from Variant< DataValues >
 Variant (X &&x)
 
 Variant (Variant &ref)
 
 Variant (Variant const &ref)
 
 Variant (Variant &&rref)
 
void accept (Visitor &visitor)
 
bool accept (Predicate &visitor) const
 
string accept (Renderer &visitor) const
 
X & get ()
 
X const & get () const
 
 operator string () const
 diagnostic helper
 
Variantoperator= (X x)
 
Variantoperator= (Variant &ovar)
 
Variantoperator= (Variant const &ovar)
 
Variantoperator= (Variant &&rvar)
 

Classes

struct  Locator
 

Private Member Functions

RecmaybeAccessNestedRec ()
 

Additional Inherited Members

- Public Types inherited from Variant< DataValues >
enum  
 
using FirstMatching = variant::FirstMatchingType< DataValues, _P_ >
 Metafunction to pick the first of the variant's types, which satisfies the given trait or predicate template. More...
 
using VisitorConstFunc = typename variant::VFunc< RET >::template VisitorInterface< meta::ConstAll< typename DataValues ::List > >
 
using VisitorFunc = typename variant::VFunc< RET >::template VisitorInterface< DataValues >
 
- Protected Member Functions inherited from Variant< DataValues >
Buff< X > & buff ()
 
Buffer & buffer ()
 
Buffer const & buffer () const
 
X * maybeGet ()
 

Member Function Documentation

◆ matchData()

bool matchData ( DataCap const &  o) const

Implementation of content equality test, delgating to content.

Exceptions
error::Logicwhen the given other DataCap does not hold a value of the same type than this DataCap.
Remarks
since the GenNode::ID is generated including a type hash, the equality operator of GenNode ensures this content test is only called on a compatible DataCap.

special treatment to allow matching a RecRef with an Record or RecRef on the other side

Definition at line 87 of file gen-node.cpp.

◆ expand()

DataCap::Locator expand ( ) const
inline

Core operation to expand nested scopes recursively

Definition at line 661 of file gen-node.hpp.

◆ recordType()

string recordType ( ) const
inline

peek into the type field of a nested Record<GenNode>

Returns
either the contents of a nested record's type field or the util::BOTTOM_INDICATOR, when not a record.
Remarks
this function never raises an error, even if the element in fact doesn't constitute a nested scope. Effectively this allows to "peek" into the contents to some degree.

Definition at line 769 of file gen-node.hpp.

Referenced by TrackPresenter::buildMutator().

+ Here is the caller graph for this function:

◆ maybeAccessNestedRec()

Rec * maybeAccessNestedRec ( )
inlineprivate

helper to possibly peek into a nested record

Definition at line 749 of file gen-node.hpp.

◆ get()

Rec& get ( )
inline

especially when accessing for a Record, a payload of type RecordRef<Record<GenNode>> (aka RecRef) will be automatically dereferenced.

Effectively this allows a GenNode with a RecRef payload to "stand in" for a node holding a full Record inline. And it allows the construction of a special Ref-GenNode , which even shares the identity (the ID) of the referenced record-GenNode.

Note
effectively this opens an indirect loophole to const correctness, since it is possible explicitly to retrieve the RecRef from a const GenNode and then to access the referred-to Record without const. In case this turns out to be problematic, we'd have to alter the semantics of RecRef

Definition at line 729 of file gen-node.hpp.

Referenced by WrappedStandardExeBuilder::__call__().

+ Here is the caller graph for this function:
+ Inheritance diagram for DataCap:
+ Collaboration diagram for DataCap:

The documentation for this class was generated from the following files: