|
| 1 | +/* |
| 2 | + * Copyright 2010, |
| 3 | + * François Bleibel, |
| 4 | + * Olivier Stasse, |
| 5 | + * Nicolas Mansard |
| 6 | + * Joseph Mirabel |
| 7 | + * |
| 8 | + * CNRS/AIST |
| 9 | + * |
| 10 | + * This file is part of sot-core. |
| 11 | + * sot-core is free software: you can redistribute it and/or |
| 12 | + * modify it under the terms of the GNU Lesser General Public License |
| 13 | + * as published by the Free Software Foundation, either version 3 of |
| 14 | + * the License, or (at your option) any later version. |
| 15 | + * sot-core is distributed in the hope that it will be |
| 16 | + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
| 17 | + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | + * GNU Lesser General Public License for more details. You should |
| 19 | + * have received a copy of the GNU Lesser General Public License along |
| 20 | + * with sot-core. If not, see <http://www.gnu.org/licenses/>. |
| 21 | + */ |
| 22 | + |
| 23 | +#include <sot/core/matrix-geometry.hh> |
| 24 | + |
| 25 | +namespace dynamicgraph { |
| 26 | + namespace sot { |
| 27 | + template< typename TypeRef > |
| 28 | + struct TypeNameHelper |
| 29 | + { |
| 30 | + static const std::string typeName; |
| 31 | + }; |
| 32 | + template< typename TypeRef > |
| 33 | + const std::string TypeNameHelper<TypeRef>::typeName = "unspecified"; |
| 34 | + |
| 35 | +#define ADD_KNOWN_TYPE( typeid ) \ |
| 36 | + template<>const std::string TypeNameHelper<typeid>::typeName = #typeid |
| 37 | + |
| 38 | + ADD_KNOWN_TYPE(bool); |
| 39 | + ADD_KNOWN_TYPE(double); |
| 40 | + ADD_KNOWN_TYPE(Vector); |
| 41 | + ADD_KNOWN_TYPE(Matrix); |
| 42 | + ADD_KNOWN_TYPE(MatrixRotation); |
| 43 | + ADD_KNOWN_TYPE(MatrixTwist); |
| 44 | + ADD_KNOWN_TYPE(MatrixHomogeneous); |
| 45 | + ADD_KNOWN_TYPE(VectorQuaternion); |
| 46 | + ADD_KNOWN_TYPE(VectorRollPitchYaw); |
| 47 | + |
| 48 | +#undef ADD_KNOWN_TYPE |
| 49 | + } /* namespace sot */ |
| 50 | +} /* namespace dynamicgraph */ |
0 commit comments