00001 #ifndef Exc_Ruby__detail__template_helpers__hpp_
00002 #define Exc_Ruby__detail__template_helpers__hpp_
00003
00009 namespace Exc_Ruby
00010 {
00011
00012 namespace detail
00013 {
00014
00016 template<class T> struct Strip_Ref
00017 {
00019 typedef T Type;
00020 };
00021
00023 template<class T> struct Strip_Ref<T&> {
00025 typedef T Type;
00026 };
00027
00030 template<class T> struct Fun_Type
00031 {
00033 typedef T& Type;
00034 };
00035 #ifndef DOXYGEN
00036 template<class T> struct Fun_Type<T*> { typedef T* Type; };
00037 template<> struct Fun_Type<bool> { typedef bool Type; };
00038 template<> struct Fun_Type<char> { typedef char Type; };
00039 template<> struct Fun_Type<signed char> { typedef signed char Type; };
00040 template<> struct Fun_Type<unsigned char> { typedef unsigned char Type; };
00041
00042 template<> struct Fun_Type<signed short> { typedef signed short Type; };
00043 template<> struct Fun_Type<unsigned short> { typedef unsigned short Type; };
00044
00045 template<> struct Fun_Type<signed long> { typedef signed long Type; };
00046 template<> struct Fun_Type<unsigned long> { typedef unsigned long Type; };
00047
00048 template<> struct Fun_Type<signed int> { typedef signed int Type; };
00049 template<> struct Fun_Type<unsigned int> { typedef unsigned int Type; };
00050 template<> struct Fun_Type<float> { typedef float Type; };
00051 template<> struct Fun_Type<double> { typedef double Type; };
00052 template<> struct Fun_Type<long double> { typedef long double Type; };
00053
00054 #endif
00055
00057
00065 template<typename T>
00066 struct Copy_Type
00067 {
00069 typedef typename Fun_Type<typename Strip_Ref<T>::Type >::Type Type;
00070 };
00071
00072 }
00073
00074 }
00075
00076 #endif // Exc_Ruby__detail__template_helpers__hpp_
00077