Reference::To< Type, active > Class Template Reference

Template class manages Reference::Able objects. More...

#include <ReferenceTo.h>

Public Member Functions

constexpr To ()=default
 Default constructor.
 To (const To &)
 Copy constructor.
 ~To ()
 Destructor.
Tooperator= (const To &)
 Assignment operator.
 To (Type *ptr)
 Construct from pointer.
Tooperator= (Type *)
 Assign from pointer.
Type & operator* () const
 Object dereferencing operator.
Type * operator-> () const
 Member dereferencing operator.
bool operator== (const Type *ptr) const
 Comparison operator.
bool operator!= (const Type *ptr) const
 Comparison operator.
bool is_equal_to (const Type *ptr) const
 Work around "warning: ISO C++ says that these are ambiguous.
 operator Type * () const
 Cast to Type* operator.
bool operator! () const
 Returns true if reference is null.
 operator bool () const
 Returns true if reference is other than null.
void set (Type *)
 Set the pointer.
Type * get () const
 Return the pointer.
Type * release ()
 Return the pointer and unhook without deleting the object.
const Type * ptr () const
 Return pointer without testing for validity.
Type * ptr ()
 Return pointer without testing for validity.
std::string name () const
 Return the name of the object, as returned by typeid.

Detailed Description

template<class Type, bool active = true>
class Reference::To< Type, active >

Template class manages Reference::Able objects.

A smart pointer that gets invalidated when its target is destroyed.

Member Function Documentation

◆ is_equal_to()

template<class Type, bool active>
bool Reference::To< Type, active >::is_equal_to ( const Type * ptr) const

Work around "warning: ISO C++ says that these are ambiguous.

even though the worst conversion for the first is better than the worst conversion for the second"

References ptr().

Referenced by operator!=(), and operator==().


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

Generated using doxygen 1.14.0