FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vec_traits.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #ifndef MATHTOOLS_VEC_TRAITS_H
17 #define MATHTOOLS_VEC_TRAITS_H
18 
19 #include "num_traits.h"
20 
21 namespace math {
22 
27 struct VecAccessTag { };
28 
37 
66 
95 struct PointerVecAccessTag : public VecAccessTag { };
96 
133 struct StdArrayVecAccessTag : public VecAccessTag { };
134 
135 
167 template<typename VEC> struct VecTraits
168 {
169  // typedef VecAccessTag AccessCategory;
170  // typedef double CoordType;
171  // enum { Arity = 3 };
172 };
173 
176 template<typename VEC> struct VecAccess { };
177 
178 } // namespace math
179 
180 #endif // MATHTOOLS_VEC_TRAITS_H
Empty generic class to be specialized by vector type.
Definition: vec_traits.h:176
Tag dispatch for vector coordinates to be accessed with a static constPointer() function.
Definition: vec_traits.h:95
Tag dispatch for STL iterator interface.
Definition: vec_traits.h:36
Definition: consts.h:18
Tag dispatch for vector coordinates to be accessed with a temporary std::array<> object.
Definition: vec_traits.h:133
Tag dispatch for iterator interface provided by static functions.
Definition: vec_traits.h:65
Base class for tag dispatching on how to access vector coordinates.
Definition: vec_traits.h:27
Type traits on vector types.
Definition: vec_traits.h:167