Honeycomb  0.1
Component-Model Framework
Public Member Functions | Friends | List of all members
honey::optional< T & > Class Template Reference

Specialization for references. More...

#include <Optional.h>

Public Member Functions

 optional ()
 
 optional (T *rhs)
 
 optional (optnull_t)
 
 optional (const optional &rhs)
 
 optional (optional &rhs)
 
 optional (optional &&rhs)
 
template<class U >
 optional (const optional< U > &rhs)
 
template<class U >
 optional (optional< U > &rhs)
 
template<class U >
 optional (optional< U > &&rhs)
 
template<class U >
 optional (U &&rhs)
 
template<class U >
void bind (U &&rhs)
 Bind wrapped reference to object. More...
 
template<class U >
void bind (U *rhs)
 Bind wrapped reference from object pointer. Unbinds if pointer is null. More...
 
void bind (nullptr_t)
 Unbinds object. More...
 
optionaloperator= (optnull_t)
 Unbinds object. More...
 
optionaloperator= (const optional &rhs)
 Assign wrapped object. More...
 
optionaloperator= (optional &rhs)
 
optionaloperator= (optional &&rhs)
 
template<class U >
optionaloperator= (const optional< U > &rhs)
 
template<class U >
optionaloperator= (optional< U > &rhs)
 
template<class U >
optionaloperator= (optional< U > &&rhs)
 
template<class U >
optionaloperator= (U &&rhs)
 Assign object. Reference must be bound to an object before being assigned, this is asserted at runtime. More...
 
bool operator== (optnull_t) const
 
bool operator!= (optnull_t) const
 
const T & operator* () const
 
T & operator* ()
 
const T * operator-> () const
 
T * operator-> ()
 
 operator const T & () const
 
 operator T & ()
 
 operator bool () const
 
 operator bool ()
 
const T & get () const
 
T & get ()
 
const T * ptr () const
 
T * ptr ()
 

Friends

template<class T_ >
class optional
 
ostream & operator<< (ostream &os, const optional &rhs)
 

Detailed Description

template<class T>
class honey::optional< T & >

Specialization for references.

The wrapped reference must be bound before it can be assigned, either construct with an object ref/pointer or call bind(). All assignments operate on the bound object. Assigning to optnull or calling bind(nullptr) to will unbind the wrapped reference.

See also
optional

Constructor & Destructor Documentation

template<class T >
honey::optional< T & >::optional ( )
inline
template<class T >
honey::optional< T & >::optional ( T *  rhs)
inline
template<class T >
honey::optional< T & >::optional ( optnull_t  )
inline
template<class T >
honey::optional< T & >::optional ( const optional< T & > &  rhs)
inline
template<class T >
honey::optional< T & >::optional ( optional< T & > &  rhs)
inline
template<class T >
honey::optional< T & >::optional ( optional< T & > &&  rhs)
inline
template<class T >
template<class U >
honey::optional< T & >::optional ( const optional< U > &  rhs)
inline
template<class T >
template<class U >
honey::optional< T & >::optional ( optional< U > &  rhs)
inline
template<class T >
template<class U >
honey::optional< T & >::optional ( optional< U > &&  rhs)
inline
template<class T >
template<class U >
honey::optional< T & >::optional ( U &&  rhs)
inline

Member Function Documentation

template<class T >
template<class U >
void honey::optional< T & >::bind ( U &&  rhs)
inline

Bind wrapped reference to object.

template<class T >
template<class U >
void honey::optional< T & >::bind ( U *  rhs)
inline

Bind wrapped reference from object pointer. Unbinds if pointer is null.

template<class T >
void honey::optional< T & >::bind ( nullptr_t  )
inline

Unbinds object.

template<class T >
const T& honey::optional< T & >::get ( ) const
inline
template<class T >
T& honey::optional< T & >::get ( )
inline
template<class T >
honey::optional< T & >::operator bool ( ) const
inlineexplicit
template<class T >
honey::optional< T & >::operator bool ( )
inlineexplicit
template<class T >
honey::optional< T & >::operator const T & ( ) const
inline
template<class T >
honey::optional< T & >::operator T & ( )
inline
template<class T >
bool honey::optional< T & >::operator!= ( optnull_t  ) const
inline
template<class T >
const T& honey::optional< T & >::operator* ( ) const
inline
template<class T >
T& honey::optional< T & >::operator* ( )
inline
template<class T >
const T* honey::optional< T & >::operator-> ( ) const
inline
template<class T >
T* honey::optional< T & >::operator-> ( )
inline
template<class T >
optional& honey::optional< T & >::operator= ( optnull_t  )
inline

Unbinds object.

template<class T >
optional& honey::optional< T & >::operator= ( const optional< T & > &  rhs)
inline

Assign wrapped object.

template<class T >
optional& honey::optional< T & >::operator= ( optional< T & > &  rhs)
inline
template<class T >
optional& honey::optional< T & >::operator= ( optional< T & > &&  rhs)
inline
template<class T >
template<class U >
optional& honey::optional< T & >::operator= ( const optional< U > &  rhs)
inline
template<class T >
template<class U >
optional& honey::optional< T & >::operator= ( optional< U > &  rhs)
inline
template<class T >
template<class U >
optional& honey::optional< T & >::operator= ( optional< U > &&  rhs)
inline
template<class T >
template<class U >
optional& honey::optional< T & >::operator= ( U &&  rhs)
inline

Assign object. Reference must be bound to an object before being assigned, this is asserted at runtime.

template<class T >
bool honey::optional< T & >::operator== ( optnull_t  ) const
inline
template<class T >
const T* honey::optional< T & >::ptr ( ) const
inline
template<class T >
T* honey::optional< T & >::ptr ( )
inline

Friends And Related Function Documentation

template<class T >
ostream& operator<< ( ostream &  os,
const optional< T & > &  rhs 
)
friend
template<class T >
template<class T_ >
friend class optional
friend

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