Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 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 ( X &&  x)
inline

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

DataCap ( DataCap const &  )
default
DataCap ( DataCap &&  )
default
DataCap ( DataCap o)
inline

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

Member Function Documentation

DataCap& operator= ( DataCap const &  )
default
DataCap& operator= ( DataCap &&  )
default
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:

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:

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:

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:

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:

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:

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:

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:

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:

DataCap::Locator expand ( ) const
inline

Core operation to expand nested scopes recursively

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

References util::unConst().

+ Here is the call graph for this function:

operator string ( ) const

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

X & get ( )
inline

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

Referenced by CoreService::act(), Tangible::doMark(), WrappedStandardExeBuilder::invokeOriginalBuilder(), Tangible::mark(), GenNodeBasic_test::objectShortcut(), SessionCommandFunction_test::perform_massivelyParallel(), GenNodeBasic_test::simpleUsage(), and GenNodeBasic_test::symbolReference().

+ Here is the caller graph for this function:

X const & get ( ) const
inline

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

Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder().

+ Here is the caller graph for this function:

bool isNested ( ) const
inline

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

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

References lib::meta::BOTTOM_INDICATOR, and DataCap::recordType().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

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

Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder().

+ Here is the caller graph for this function:

Rec const& get ( ) const
inline

Definition at line 687 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: