Main MRPT website > C++ reference for MRPT 1.5.6
TTypeName_impl.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef TTYPENAME_IMPL_H
10 #define TTYPENAME_IMPL_H
11 
12 #include <mrpt/utils/TTypeName.h>
13 #include <list>
14 #include <vector>
15 #include <deque>
16 #include <set>
17 #include <map>
18 
19 // This file extends TTypeName.h for STL C++ types.
20 
21 namespace mrpt
22 {
23  namespace utils
24  {
25  /** @name Conversion of type to string at compile time
26  @{ */
27 
29 
30  #define MRPT_DECLARE_TTYPENAME_CONTAINER(_CONTAINER) \
31  template< typename V > \
32  struct TTypeName <_CONTAINER<V> > { \
33  static std::string get() { \
34  return std::string( #_CONTAINER )+std::string("<")+std::string( TTypeName<V>::get() ) + std::string(">"); \
35  } \
36  };
37 
42 
43  #define MRPT_DECLARE_TTYPENAME_CONTAINER_ASSOC(_CONTAINER) \
44  template< typename K, typename V > \
45  struct TTypeName <_CONTAINER<K,V> > { \
46  static std::string get() { \
47  return std::string( #_CONTAINER )+std::string("<")+std::string( TTypeName<K>::get() )+ std::string(",")+std::string( TTypeName<V>::get() )+std::string(">"); \
48  } \
49  };
50 
53 
54 
55  template< typename T1, typename T2 >
56  struct TTypeName <std::pair<T1,T2> > {
57  static std::string get() {
59  }
60  };
61 
62  /** @} */
63 
64  } // End of namespace
65 } // End of namespace
66 
67 #endif
A template to obtain the type of its argument as a string at compile time.
Definition: TTypeName.h:47
STL namespace.
MRPT_DECLARE_TTYPENAME(mrpt::graphs::detail::TMRSlamNodeAnnotations)
#define MRPT_DECLARE_TTYPENAME_CONTAINER(_CONTAINER)
GLsizei const GLchar ** string
Definition: glext.h:3919
#define MRPT_DECLARE_TTYPENAME_CONTAINER_ASSOC(_CONTAINER)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019