![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/optional-ref.hpp"
Optional or switchable link to an existing object.
This reference wrapper is accessed like a functor, but has the ability to be disabled. This disabled state is managed automatically by ctor and dtor, can be detected through bool check and – contrary to a NULL pointer – produces a real exception instead of crashing.
Definition at line 52 of file optional-ref.hpp.
Public Member Functions | |
| OptionalRef () | |
| ~OptionalRef () | |
| OptionalRef (T &target) | |
| operator bool () const | |
| T & | operator() () const |
| void | link_to (T &target) |
| void | clear () |
| bool | isValid () const |
| bool | points_to (T const &target) const |
Friends | |
| bool | operator== (OptionalRef const &r1, OptionalRef const &r2) |
| bool | operator!= (OptionalRef const &r1, OptionalRef const &r2) |
| bool | operator== (OptionalRef const &ref, T const &otherTarget) |
| bool | operator== (T const &otherTarget, OptionalRef const &ref) |
| bool | operator!= (T const &otherTarget, OptionalRef const &ref) |
| bool | operator!= (OptionalRef const &ref, T const &otherTarget) |
Private Attributes | |
| T * | ref_ |
|
inline |
Definition at line 58 of file optional-ref.hpp.
|
inline |
Definition at line 62 of file optional-ref.hpp.
References OptionalRef< T >::clear().
Here is the call graph for this function:
|
inlineexplicit |
| target | ...not allowing implicit conversion from T& |
Definition at line 70 of file optional-ref.hpp.
|
inlineexplicit |
Definition at line 74 of file optional-ref.hpp.
References OptionalRef< T >::isValid().
Here is the call graph for this function:
|
inline |
Definition at line 78 of file optional-ref.hpp.
References OptionalRef< T >::isValid(), LERR_, and OptionalRef< T >::ref_.
Here is the call graph for this function:
|
inline |
Definition at line 90 of file optional-ref.hpp.
References OptionalRef< T >::ref_.
Referenced by AutoRegistered< TAR >::setRegistryInstance().
Here is the caller graph for this function:
|
inline |
Definition at line 96 of file optional-ref.hpp.
References OptionalRef< T >::ref_.
Referenced by OptionalRef< T >::~OptionalRef(), and AutoRegistered< TAR >::deactivateRegistryLink().
Here is the caller graph for this function:
|
inline |
Definition at line 105 of file optional-ref.hpp.
References OptionalRef< T >::ref_.
Referenced by OptionalRef< T >::operator bool(), OptionalRef< T >::operator()(), and OptionalRef< T >::points_to().
Here is the caller graph for this function:
|
inline |
Definition at line 111 of file optional-ref.hpp.
References OptionalRef< T >::isValid(), and OptionalRef< T >::ref_.
Referenced by AutoRegistered< TAR >::is_attached_to().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 54 of file optional-ref.hpp.
Referenced by OptionalRef< T >::clear(), OptionalRef< T >::isValid(), OptionalRef< T >::link_to(), OptionalRef< T >::operator()(), and OptionalRef< T >::points_to().
|
friend |
Definition at line 118 of file optional-ref.hpp.
|
friend |
Definition at line 123 of file optional-ref.hpp.
|
friend |
|
friend |
Definition at line 135 of file optional-ref.hpp.
|
friend |
Definition at line 136 of file optional-ref.hpp.
|
friend |
Definition at line 137 of file optional-ref.hpp.
Inheritance diagram for OptionalRef< T >:
Collaboration diagram for OptionalRef< T >: