CUV  0.9.201304091348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
cuv::reference< T, M, I > Struct Template Reference

This objects acts like a reference to the object stored at the wrapped pointer. More...

#include <reference.hpp>

Public Types

typedef T * pointer_type
 the wrapped pointer type
typedef unconst< T >::type value_type
 the type of the pointer
typedef M memory_space_type
 the memory space of the pointer
typedef reference< T, M, I > my_type
 the type of this reference
typedef I index_type
 hmm this should be size_t eventually

Public Member Functions

 operator value_type () const
 convert to the stored value
void operator= (const value_type &v)
 assign a new value
template<class _T >
boost::enable_if_c
< boost::is_convertible< _T,
value_type >::value >::type 
operator= (const _T &v)
 assign a value of a different (but convertible) value type
referenceoperator= (const reference &o)
 assignment from reference of same type
template<class O >
referenceoperator= (const reference< T, O, I > &o)
 assignment from reference of other memory type
pointer_type operator& (void) const
 get the wrapped pointer
 reference (const pointer_type &p)
 construct using a pointer
 reference (T &p)
 implicit construction using value
 reference (const T &p)
 implicit construction using value
my_typeoperator+= (const value_type &v)
 add to the value stored at ptr
my_typeoperator-= (const value_type &v)
 subtract from the value stored at ptr
my_typeoperator*= (const value_type &v)
 multiply with the value stored at ptr
my_typeoperator/= (const value_type &v)
 divide by the value stored at ptr
value_type operator++ (int)
 increment value at ptr
value_type operator-- (int)
 decrement value at ptr
value_type operator++ ()
 increment value at ptr
value_type operator-- ()
 decrement value at ptr
bool operator== (const value_type &v)
 compare value at ptr with another
bool operator<= (const value_type &v)
 compare value at ptr with another
bool operator< (const value_type &v)
 compare value at ptr with another
bool operator>= (const value_type &v)
 compare value at ptr with another
bool operator> (const value_type &v)
 compare value at ptr with another

Public Attributes

const pointer_type ptr
 the wrapped pointer

Detailed Description

template<class T, class M, class I>
struct cuv::reference< T, M, I >

This objects acts like a reference to the object stored at the wrapped pointer.

Definition at line 46 of file reference.hpp.


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