FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
math::FuncIteratorVecAccessTag Struct Reference

Tag dispatch for iterator interface provided by static functions. More...

#include <mathtools/vec_traits.h>

Inheritance diagram for math::FuncIteratorVecAccessTag:
math::VecAccessTag

Detailed Description

Tag dispatch for iterator interface provided by static functions.

This means there exists functions provinding iterator access for the vector objects.

Example :

struct MyVector2D
{
double x;
double y;
};
namespace math {
template<> struct VecAccess<MyVector2D>
{
static double* begin(MyVector2d& vec) { &return vec.x; } // Optional: required only for mutating algorithms
static double* end(MyVector2d& vec) { &return vec.y; } // Optional: required only for mutating algorithms
static const double* begin(const MyVector2d& vec) { &return vec.x; }
static const double* end(const MyVector2d& vec) { &return vec.y; }
};
}

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