hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Pointer< T > Class Template Referenceabstract

Abstract base class for implementing pointer objects. More...

#include <Pointer.hpp>

Inheritance diagram for hexed::Pointer< T >:
hexed::Mortal_ptr< T >

Public Member Functions

virtual T * get ()=0
 obtains the raw address of the variable this points to
 
virtual const T * get () const =0
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
 operator bool () const
 returns true iff this is not null
 
T & operator* ()
 obtains a reference to the object this points to
 
T * operator-> ()
 accesses the members of the object this points to
 
T & value ()
 obtains a reference to the object this points to
 
const T & operator* () const
 obtains a reference to the object this points to
 
const T * operator-> () const
 accesses the members of the object this points to
 
const T & value () const
 obtains a reference to the object this points to
 

Detailed Description

template<typename T>
class hexed::Pointer< T >

Abstract base class for implementing pointer objects.

Derived classes must implement a get() member function that returns a raw pointer, and Pointer implements the rest of the usual pointer interface semantics in terms of get().

Member Function Documentation

◆ get() [1/2]

template<typename T >
virtual const T * hexed::Pointer< T >::get ( ) const
pure virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implemented in hexed::Mortal_ptr< T >.

◆ get() [2/2]

template<typename T >
virtual T * hexed::Pointer< T >::get ( )
pure virtual

obtains the raw address of the variable this points to

Implemented in hexed::Mortal_ptr< T >.

◆ operator*() [1/2]

template<typename T >
T & hexed::Pointer< T >::operator* ( )
inline

obtains a reference to the object this points to

undefined behavior if this is null

◆ operator*() [2/2]

template<typename T >
const T & hexed::Pointer< T >::operator* ( ) const
inline

obtains a reference to the object this points to

undefined behavior if this is null

◆ operator->() [1/2]

template<typename T >
T * hexed::Pointer< T >::operator-> ( )
inline

accesses the members of the object this points to

undefined behavior if this is null

◆ operator->() [2/2]

template<typename T >
const T * hexed::Pointer< T >::operator-> ( ) const
inline

accesses the members of the object this points to

undefined behavior if this is null

◆ value() [1/2]

template<typename T >
T & hexed::Pointer< T >::value ( )
inline

obtains a reference to the object this points to

throws an exception if this is null

◆ value() [2/2]

template<typename T >
const T & hexed::Pointer< T >::value ( ) const
inline

obtains a reference to the object this points to

throws an exception if this is null


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