Lumiera  0.pre.03
»edityourfreedom«
DataCap Class Reference

#include "lib/diff/gen-node.hpp"

Description

Definition at line 154 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> More...
 
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 isNested () const
 determine if payload constitutes a nested scope ("object") More...
 
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...
 
- Public Member Functions inherited from Variant< DataValues >
 Variant ()
 
 Variant (X &&x)
 
 Variant (Variant &ref)
 
 Variant (Variant const &ref)
 
 Variant (Variant &&rref)
 
 ~Variant ()
 
void accept (Visitor &visitor)
 
bool accept (Predicate &visitor) const
 
X & get ()
 
X const & get () const
 
 operator string () const
 diagnostic helper More...
 
Variantoperator= (X x)
 
Variantoperator= (Variant &ovar)
 
Variantoperator= (Variant const &ovar)
 
Variantoperator= (Variant &&rvar)
 

Classes

struct  Locator
 

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 ()
 

Constructor & Destructor Documentation

◆ DataCap() [1/4]

DataCap ( X &&  x)
inline

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

◆ DataCap() [2/4]

DataCap ( DataCap const &  )
default

◆ DataCap() [3/4]

DataCap ( DataCap &&  )
default

◆ DataCap() [4/4]

DataCap ( DataCap o)
inline

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

Member Function Documentation

◆ operator=() [1/2]

DataCap& operator= ( DataCap const &  )
default

◆ operator=() [2/2]

DataCap& operator= ( DataCap &&  )
default

◆ 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 85 of file gen-node.cpp.

References Variant< DataValues >::accept(), DERIVE_EQUALITY, and DataCap::matchRec().

+ Here is the call graph for this function:

◆ matchNum()

bool matchNum ( int64_t  num) const

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

References Variant< DataValues >::accept(), and MATCH_NUMBER.

Referenced by GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchTxt()

bool matchTxt ( string const &  text) const

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

References Variant< DataValues >::accept(), and MATCH_STRING.

Referenced by GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchTime()

bool matchTime ( time::TimeValue  time) const

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

References Variant< DataValues >::accept(), and MATCH_TIME.

Referenced by GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchBool()

bool matchBool ( bool  b) const

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

References util::unConst().

Referenced by GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchDbl()

bool matchDbl ( double  d) const

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

References Variant< DataValues >::accept(), and MATCH_DOUBLE.

Referenced by GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchLuid()

bool matchLuid ( hash::LuidH  hash) const

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

References util::unConst().

Referenced by GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchRec() [1/2]

bool matchRec ( RecRef const &  ref) const

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

References RecordRef< VAL >::empty(), RecordRef< VAL >::get(), and util::unConst().

Referenced by DataCap::matchData(), and GenNode::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchRec() [2/2]

bool matchRec ( Rec const &  rec) const

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

References RecordRef< VAL >::get(), r, and util::unConst().

+ Here is the call graph for this function:

◆ expand()

DataCap::Locator expand ( ) const
inline

Core operation to expand nested scopes recursively

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

References util::unConst().

+ Here is the call graph for this function:

◆ operator string()

operator string ( ) const

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

References Variant< DataValues >::buffer().

+ Here is the call graph for this function:

◆ get() [1/4]

◆ get() [2/4]

X const & get ( ) const
inline

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

Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder().

+ Here is the caller graph for this function:

◆ isNested()

bool isNested ( ) const
inline

determine if payload constitutes a nested scope ("object")

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

References lib::meta::BOTTOM_INDICATOR.

Referenced by TimelineController::buildMutator(), InteractionDirector::buildMutator(), MockElm::buildMutator(), and InteractionDirector::getWorkspaceWindow().

+ Here is the caller graph for this function:

◆ 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 704 of file gen-node.hpp.

References lib::meta::BOTTOM_INDICATOR, RecordRef< VAL >::empty(), RecordRef< VAL >::get(), Record< VAL >::getType(), and util::unConst().

Referenced by ClipPresenter::buildMutator(), and TrackPresenter::buildMutator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childIter()

Rec::scopeIter childIter ( ) const
inline

visit children of a nested Record<GenNode>

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

References Record< VAL >::scope(), and util::unConst().

+ Here is the call graph for this function:

◆ get() [3/4]

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 678 of file gen-node.hpp.

Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder().

+ Here is the caller graph for this function:

◆ get() [4/4]

Rec const& get ( ) const
inline

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

References util::unConst().

Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder().

+ Here is the call graph for this function:
+ 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: