00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef INSTIGATE_SCRIPTING_GENERIC_TYPE_TRAITS
00016 #define INSTIGATE_SCRIPTING_GENERIC_TYPE_TRAITS
00017
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 namespace instigate {
00038 namespace scripting {
00039 namespace generic {
00040 template <typename T> class type_traits;
00041 template <typename T> class type_traits<const T>;
00042 template <typename T> class type_traits<T*>;
00043 template <typename T> class type_traits<const T*>;
00044 template <typename T> class type_traits<T&>;
00045 template <typename T> class type_traits<const T&>;
00046 }
00047 }
00048 }
00049
00059 template <typename T>
00060 struct instigate::scripting::generic::type_traits
00061 {
00062 typedef T& reference_type;
00063 typedef const T& const_reference_type;
00064 typedef T value_type;
00065 typedef const T const_value_type;
00066 typedef T* pointer_type;
00067 typedef const T* const_pointer_type;
00068 };
00069
00070
00072 template <typename T>
00073 struct instigate::scripting::generic::type_traits<const T>
00074 {
00075 typedef T& reference_type;
00076 typedef const T& const_reference_type;
00077 typedef T value_type;
00078 typedef const T const_value_type;
00079 typedef T* pointer_type;
00080 typedef const T* const_pointer_type;
00081 };
00082
00084 template <typename T>
00085 struct instigate::scripting::generic::type_traits<T*>
00086 {
00087 typedef T& reference_type;
00088 typedef const T& const_reference_type;
00089 typedef T value_type;
00090 typedef const T const_value_type;
00091 typedef T* pointer_type;
00092 typedef const T* const_pointer_type;
00093 };
00094
00096 template <typename T>
00097 struct instigate::scripting::generic::type_traits<const T*>
00098 {
00099 typedef T& reference_type;
00100 typedef const T& const_reference_type;
00101 typedef T value_type;
00102 typedef const T const_value_type;
00103 typedef T* pointer_type;
00104 typedef const T* const_pointer_type;
00105 };
00106
00108 template <typename T>
00109 struct instigate::scripting::generic::type_traits<T&>
00110 {
00111 typedef T& reference_type;
00112 typedef const T& const_reference_type;
00113 typedef T value_type;
00114 typedef const T const_value_type;
00115 typedef T* pointer_type;
00116 typedef const T* const_pointer_type;
00117 };
00118
00120 template <typename T>
00121 struct instigate::scripting::generic::type_traits<const T&>
00122 {
00123 typedef T& reference_type;
00124 typedef const T& const_reference_type;
00125 typedef T value_type;
00126 typedef const T const_value_type;
00127 typedef T* pointer_type;
00128 typedef const T* const_pointer_type;
00129 };
00130
00131 #endif // INSTIGATE_SCRIPTING_GENERIC_TYPE_TRAITS