cheshirekow  v0.1.0
mpblocks::clarkson93::ExampleTraits2< SCALAR, NDIM >::Deref Struct Reference

proves a means of turning a PointRef into a Point& More...

#include <mpblocks/clarkson93/ExampleTraits2.h>

Public Member Functions

Pointpoint (PointRef ptr)
 
Simplexsimplex (SimplexRef ptr)
 

Detailed Description

template<typename SCALAR, unsigned int NDIM>
struct mpblocks::clarkson93::ExampleTraits2< SCALAR, NDIM >::Deref

proves a means of turning a PointRef into a Point&

In the example traits PointRef is a Point* so we simply dereference this pointer. If PointRef were an index into an array of Point structures, then PointDeref should store a pointer to the beginning of that array. For example

typedef unsigned int PointRef;
struct PointDeref
{
Point* m_buf;
Point& operator()( PointRef i ){ return m_buf[i]; }
};

Definition at line 102 of file ExampleTraits2.h.

Member Function Documentation

template<typename SCALAR , unsigned int NDIM>
Point& mpblocks::clarkson93::ExampleTraits2< SCALAR, NDIM >::Deref::point ( PointRef  ptr)
inline

Definition at line 104 of file ExampleTraits2.h.

template<typename SCALAR , unsigned int NDIM>
Simplex& mpblocks::clarkson93::ExampleTraits2< SCALAR, NDIM >::Deref::simplex ( SimplexRef  ptr)
inline

Definition at line 105 of file ExampleTraits2.h.


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