Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RecordRef< VAL > Class Template Reference

#include "lib/diff/record.hpp"

Description

template<typename VAL>
class lib::diff::RecordRef< VAL >

wrapped record reference.

A helper for lib::GenNode and the diff representation. RecordRef is copyable and movable, but like a reference can not be rebound. It can be used to refer to a subtree within the diff representation, without the need to copy.

Remarks
this is almost identical to std::ref, with the notable difference that it can be default-created into "bottom" state; this also implies to have a NULL check on dereferentiation.

Definition at line 611 of file record.hpp.

Public Member Functions

 RecordRef () noexcept
 by default create an invalid ("bottom") reference More...
 
 RecordRef (Target &o) noexcept
 create a reference bound to the given target; can not be rebound More...
 
 RecordRef (Target &&)=delete
 prevent moving into black hole More...
 
 RecordRef (RecordRef const &)=default
 
 RecordRef (RecordRef &&)=default
 
bool empty () const
 
Targetget () const noexcept
 
 operator bool () const
 
 operator Target & () const
 target is accessed by cast More...
 
RecordRefoperator= (RecordRef const &)=delete
 references can not be reassigned More...
 
RecordRefoperator= (RecordRef &)=delete
 
RecordRefoperator= (RecordRef &&o)
 assignment is not allowed, but moving is More...
 

Friends

bool operator!= (RecordRef const &r1, RecordRef const &r2)
 
bool operator== (RecordRef const &r1, RecordRef const &r2)
 

Private Types

using Target = Record< VAL >
 

Private Attributes

Targetrecord_
 

Member Typedef Documentation

using Target = Record<VAL>
private

Definition at line 613 of file record.hpp.

Constructor & Destructor Documentation

RecordRef ( )
inlinenoexcept

by default create an invalid ("bottom") reference

Definition at line 620 of file record.hpp.

RecordRef ( Target o)
inlinenoexcept

create a reference bound to the given target; can not be rebound

Definition at line 626 of file record.hpp.

RecordRef ( Target &&  )
delete

prevent moving into black hole

RecordRef ( RecordRef< VAL > const &  )
default
RecordRef ( RecordRef< VAL > &&  )
default

Member Function Documentation

RecordRef& operator= ( RecordRef< VAL > const &  )
delete

references can not be reassigned

RecordRef& operator= ( RecordRef< VAL > &  )
delete
RecordRef& operator= ( RecordRef< VAL > &&  o)
inline

assignment is not allowed, but moving is

Definition at line 642 of file record.hpp.

operator bool ( ) const
inlineexplicit

Definition at line 650 of file record.hpp.

bool empty ( ) const
inline

Definition at line 656 of file record.hpp.

References RecordRef< VAL >::record_.

Referenced by DataCap::matchRec(), and DataCap::recordType().

+ Here is the caller graph for this function:

operator Target & ( ) const
inline

target is accessed by cast

Exceptions
error::Logicon bottom reference

Definition at line 664 of file record.hpp.

References RecordRef< VAL >::record_.

Target* get ( ) const
inlinenoexcept

Definition at line 673 of file record.hpp.

References RecordRef< VAL >::record_.

Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder(), DataCap::matchRec(), DataCap::recordType(), and GenericRecordRepresentation_test::wrapRef().

+ Here is the caller graph for this function:

Member Data Documentation

Target* record_
private

Friends And Related Function Documentation

bool operator== ( RecordRef< VAL > const &  r1,
RecordRef< VAL > const &  r2 
)
friend
Note
equality of references (instance pointers), not targets

Definition at line 680 of file record.hpp.

bool operator!= ( RecordRef< VAL > const &  r1,
RecordRef< VAL > const &  r2 
)
friend

Definition at line 685 of file record.hpp.

+ Collaboration diagram for RecordRef< VAL >:

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