Mirror reflection library 0.5.13
|
00001 00011 #ifndef MIRROR_UTILS_NATIVE_TYPES_1011291729_HPP 00012 #define MIRROR_UTILS_NATIVE_TYPES_1011291729_HPP 00013 00014 #include <mirror/preprocessor.hpp> 00015 #include <mirror/meta_prog/range.hpp> 00016 #include <mirror/meta_prog/contains.hpp> 00017 #include <string> 00018 #include <ctime> 00019 00020 MIRROR_NAMESPACE_BEGIN 00021 00022 // Macro which calls the passed MACRO for each of the native types 00023 #define MIRROR_UTILS_FOR_EACH_NATIVE_TYPE(MACRO, DATA) \ 00024 MACRO(bool, DATA) \ 00025 MACRO(char, DATA) \ 00026 MACRO(short int, DATA) \ 00027 MACRO(int, DATA) \ 00028 MACRO(long int, DATA) \ 00029 MACRO(unsigned short int, DATA) \ 00030 MACRO(unsigned int, DATA) \ 00031 MACRO(unsigned long int, DATA) \ 00032 MACRO(float, DATA) \ 00033 MACRO(double, DATA) \ 00034 MACRO(long double, DATA) \ 00035 MACRO(std::string, DATA) \ 00036 MACRO(std::tm, DATA) 00037 00038 // Macro which expands into a list of types that are considered 00039 // native by the various utilities provided by Mirror including 00040 // the factory generator plugins 00041 #define MIRROR_UTILS_NATIVE_TYPE_LIST() \ 00042 bool, \ 00043 char, \ 00044 short int, \ 00045 int, \ 00046 long int, \ 00047 unsigned short int, \ 00048 unsigned int, \ 00049 unsigned long int, \ 00050 float, \ 00051 double, \ 00052 long double, \ 00053 std::string, \ 00054 std::tm 00055 00056 // Range of types that are considered native by the various utilities 00057 // provided by Mirror including the factory generator plugins 00058 typedef mp::range<MIRROR_UTILS_NATIVE_TYPE_LIST()> util_native_types; 00059 00060 // Template meta-function checking if X is a utility native type 00061 template <typename X> 00062 struct is_util_native_type 00063 : public mp::contains<util_native_types, X>::type 00064 { }; 00065 00066 MIRROR_NAMESPACE_END 00067 00068 #endif // include guard 00069