//****************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005 - 2007. All rights reserved. // Consult your license for conditions of use. // Developed by Jarl Lindrud. // Contact: jlindrud@hotmail.com . //****************************************************************************** #ifndef INCLUDE_RCF_TYPETRAITS_HPP #define INCLUDE_RCF_TYPETRAITS_HPP #include namespace RCF { template struct IsFundamental : public boost::is_fundamental {}; #if defined(_MSC_VER) && _MSC_VER < 1310 template<> struct IsFundamental : boost::mpl::true_ {}; template<> struct IsFundamental<__int64> : boost::mpl::true_ {}; template<> struct IsFundamental : boost::mpl::true_ {}; #endif template struct IsConst : public boost::is_const {}; template struct IsPointer : public boost::is_pointer {}; template struct IsReference : public boost::is_reference {}; template struct RemovePointer : public boost::remove_pointer {}; template struct RemoveReference : public boost::remove_reference {}; template struct RemoveCv : public boost::remove_cv {}; namespace IDL { template struct InParameter; template class InParameter_Value; template class InParameter_Ref; template class InParameter_Ptr; template struct OutParameter; template class OutParameter_Value; template class OutParameter_Ref; template class OutParameter_CRef; template class OutParameter_Ptr; } // namespace IDL } // namespace RCF namespace SF { template struct GetIndirection; } // namespace SF #if defined(_MSC_VER) && _MSC_VER <= 1310 #define RCF_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \ namespace RCF { \ \ template<> \ struct IsReference : public boost::mpl::false_ \ {}; \ \ template<> \ struct IsReference : public boost::mpl::true_ \ {}; \ \ template<> \ struct IsReference : public boost::mpl::true_ \ {}; \ \ template<> \ struct RemoveReference : public boost::mpl::identity \ {}; \ \ template<> \ struct RemoveReference : public boost::mpl::identity \ {}; \ \ template<> \ struct IsPointer : public boost::mpl::false_ \ {}; \ \ template<> \ struct IsPointer : public boost::mpl::true_ \ {}; \ \ template<> \ struct IsPointer : public boost::mpl::true_ \ {}; \ \ template<> \ struct IsPointer : public boost::mpl::true_ \ {}; \ \ template<> \ struct RemovePointer : public boost::mpl::identity \ {}; \ \ template<> \ struct RemovePointer : public boost::mpl::identity \ {}; \ \ template<> \ struct RemovePointer : public boost::mpl::identity \ {}; \ \ template<> \ struct RemovePointer : public boost::mpl::identity \ {}; \ \ template<> \ struct RemoveCv : public boost::mpl::identity \ {}; \ \ template<> \ struct RemoveCv : public boost::mpl::identity \ {}; \ \ template<> \ struct RemoveCv : public boost::mpl::identity \ {}; \ \ template<> \ struct RemoveCv : public boost::mpl::identity \ {}; \ \ namespace IDL { \ \ template<> \ struct OutParameter : public boost::mpl::identity< OutParameter_Value > \ {}; \ \ template<> \ struct OutParameter : public boost::mpl::identity< OutParameter_Ptr > \ {}; \ \ template<> \ struct OutParameter : public boost::mpl::identity< OutParameter_Ref > \ {}; \ \ template<> \ struct OutParameter : public boost::mpl::identity< OutParameter_CRef > \ {}; \ \ template<> \ struct InParameter : public boost::mpl::identity< InParameter_Value > \ {}; \ \ template<> \ struct InParameter : public boost::mpl::identity< InParameter_Ptr > \ {}; \ \ template<> \ struct InParameter : public boost::mpl::identity< InParameter_Ptr > \ {}; \ \ template<> \ struct InParameter : public boost::mpl::identity< InParameter_Ref > \ {}; \ \ template<> \ struct InParameter : public boost::mpl::identity< InParameter_Ref > \ {}; \ \ } \ \ } \ \ namespace SF { \ \ template<> \ struct GetIndirection \ { \ typedef boost::mpl::int_<0> Level; \ typedef T Base; \ }; \ \ template<> \ struct GetIndirection \ { \ typedef boost::mpl::int_<1> Level; \ typedef T Base; \ }; \ \ template<> \ struct GetIndirection \ { \ typedef boost::mpl::int_<1> Level; \ typedef T Base; \ }; \ \ template<> \ struct GetIndirection \ { \ typedef boost::mpl::int_<2> Level; \ typedef T Base; \ }; \ \ template<> \ struct GetIndirection \ { \ typedef boost::mpl::int_<2> Level; \ typedef T Base; \ }; \ \ template<> \ struct GetIndirection \ { \ typedef boost::mpl::int_<2> Level; \ typedef T Base; \ }; \ \ } #else #define RCF_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) #endif #endif // ! INCLUDE_RCF_TYPETRAITS_HPP