cheshirekow  v0.1.0
mpblocks::clarkson93::ExampleTraits::PointDeref Struct Reference

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

#include <mpblocks/clarkson93/ExampleTraits.h>

Public Member Functions

const Pointoperator() (PointRef ptr)
 

Detailed Description

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 105 of file ExampleTraits.h.

Member Function Documentation

const Point& mpblocks::clarkson93::ExampleTraits::PointDeref::operator() ( PointRef  ptr)
inline

Definition at line 107 of file ExampleTraits.h.


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