DataTypeTraits.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2014 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
23 #ifndef VARIANT_TOPIC_TOOLS_DATA_TYPE_TRAITS_H
24 #define VARIANT_TOPIC_TOOLS_DATA_TYPE_TRAITS_H
25 
26 #include <boost/type_traits.hpp>
27 
31 
32 namespace variant_topic_tools {
33  namespace type_traits {
34  template <typename T, typename Enable = void> struct DataType;
35 
36  template <typename T> struct DataType<T, typename boost::
37  enable_if<IsBuiltin<T> >::type> {
41  };
42 
43  template <typename T> struct DataType<T, typename boost::
44  enable_if<IsArray<T> >::type> {
48  };
49 
50  template <typename T> struct DataType<T, typename boost::
51  enable_if<IsMessage<T> >::type> {
55  };
56 
57  template <typename T, typename Enable = void> struct ToDataType;
58 
59  template <typename T> struct ToDataType<T, typename boost::
60  enable_if<IsBuiltin<typename ToBuiltinType<T>::BuiltinType> >::type> {
62  };
63 
64  template <typename T> struct ToDataType<T, typename boost::
65  enable_if<IsArray<typename ToArrayType<T>::ArrayType> >::type> {
67  };
68 
69  template <typename T> struct ToDataType<T, typename boost::
70  enable_if<IsMessage<typename ToMessageType<T>::MessageType> >::type> {
72  };
73  };
74 };
75 
76 #endif
Header file providing the array type traits.
Header file providing the built-in type traits.
Header file providing the message type traits.


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Sat Jan 9 2021 03:56:49