Honeycomb  0.1
Component-Model Framework
Public Member Functions | List of all members
honey::deref_wrap< T, Ptr, ConstPtr > Class Template Reference

Wraps a pointer so that it behaves similar to a reference. More...

#include <StdUtil.h>

Public Member Functions

 deref_wrap (Ptr ptr=nullptr)
 
T & operator* ()
 
const T & operator* () const
 
T * operator-> ()
 
const T * operator-> () const
 
 operator T & ()
 
 operator const T & () const
 
bool operator== (const deref_wrap &rhs) const
 
bool operator!= (const deref_wrap &rhs) const
 
Ptr & ptr ()
 
const ConstPtr & ptr () const
 

Detailed Description

template<class T, class Ptr = T*, class ConstPtr = const T*>
class honey::deref_wrap< T, Ptr, ConstPtr >

Wraps a pointer so that it behaves similar to a reference.

In a std container, this wrapper type can be used instead of an object pointer so that the constness of the container carries through to its objects.

Constructor & Destructor Documentation

template<class T, class Ptr = T*, class ConstPtr = const T*>
honey::deref_wrap< T, Ptr, ConstPtr >::deref_wrap ( Ptr  ptr = nullptr)
inline

Member Function Documentation

template<class T, class Ptr = T*, class ConstPtr = const T*>
honey::deref_wrap< T, Ptr, ConstPtr >::operator const T & ( ) const
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
honey::deref_wrap< T, Ptr, ConstPtr >::operator T & ( )
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
bool honey::deref_wrap< T, Ptr, ConstPtr >::operator!= ( const deref_wrap< T, Ptr, ConstPtr > &  rhs) const
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
T& honey::deref_wrap< T, Ptr, ConstPtr >::operator* ( )
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
const T& honey::deref_wrap< T, Ptr, ConstPtr >::operator* ( ) const
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
T* honey::deref_wrap< T, Ptr, ConstPtr >::operator-> ( )
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
const T* honey::deref_wrap< T, Ptr, ConstPtr >::operator-> ( ) const
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
bool honey::deref_wrap< T, Ptr, ConstPtr >::operator== ( const deref_wrap< T, Ptr, ConstPtr > &  rhs) const
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
Ptr& honey::deref_wrap< T, Ptr, ConstPtr >::ptr ( )
inline
template<class T, class Ptr = T*, class ConstPtr = const T*>
const ConstPtr& honey::deref_wrap< T, Ptr, ConstPtr >::ptr ( ) const
inline

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