RCFProto
 All Classes Functions Typedefs
TypeTraits.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
19 #ifndef INCLUDE_RCF_TYPETRAITS_HPP
20 #define INCLUDE_RCF_TYPETRAITS_HPP
21 
22 #include <boost/type_traits.hpp>
23 
24 namespace RCF {
25 
26  template<typename T>
27  struct IsFundamental : public boost::is_fundamental<T>
28  {};
29 
30  template<typename T>
31  struct IsConst : public boost::is_const<T>
32  {};
33 
34  template<typename T>
35  struct IsPointer : public boost::is_pointer<T>
36  {};
37 
38  template<typename T>
39  struct IsReference : public boost::is_reference<T>
40  {};
41 
42  template<typename T>
43  struct RemovePointer : public boost::remove_pointer<T>
44  {};
45 
46  template<typename T>
47  struct RemoveReference : public boost::remove_reference<T>
48  {};
49 
50  template<typename T>
51  struct RemoveCv : public boost::remove_cv<T>
52  {};
53 
54  template<typename T>
55  struct Out
56  {
57  };
58 
59  template<typename T>
60  struct RemoveOut
61  {
62  typedef T type;
63  };
64 
65  template<typename T>
66  struct IsOut : public boost::mpl::false_
67  {
68  };
69 
70  template<typename T>
71  struct RemoveOut< Out<T> >
72  {
73  typedef T type;
74  };
75 
76  template<typename T>
77  struct IsOut< Out<T> >
78  {
79  typedef boost::mpl::true_ type;
80  enum { value = type::value };
81  };
82 
83 } // namespace RCF
84 
85 namespace SF {
86 
87  template<typename T> struct GetIndirection;
88 
89 } // namespace SF
90 
91 #endif // ! INCLUDE_RCF_TYPETRAITS_HPP