type_gentype.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 namespace glm
32 {
33  enum profile
34  {
38  };
39 
40  typedef std::size_t sizeType;
41 
42 namespace detail
43 {
44  template
45  <
46  typename VALTYPE,
47  template <typename> class TYPE
48  >
49  struct genType
50  {
51  public:
52  enum ctor{null};
53 
54  typedef VALTYPE value_type;
55  typedef VALTYPE & value_reference;
56  typedef VALTYPE * value_pointer;
57  typedef VALTYPE const * value_const_pointer;
58  typedef TYPE<bool> bool_type;
59 
61  static bool is_vector();
62  static bool is_matrix();
63 
64  typedef TYPE<VALTYPE> type;
65  typedef TYPE<VALTYPE> * pointer;
66  typedef TYPE<VALTYPE> const * const_pointer;
67  typedef TYPE<VALTYPE> const * const const_pointer_const;
68  typedef TYPE<VALTYPE> * const pointer_const;
69  typedef TYPE<VALTYPE> & reference;
70  typedef TYPE<VALTYPE> const & const_reference;
71  typedef TYPE<VALTYPE> const & param_type;
72 
74  // Address (Implementation details)
75 
78 
79  //protected:
80  // enum kind
81  // {
82  // GEN_TYPE,
83  // VEC_TYPE,
84  // MAT_TYPE
85  // };
86 
87  // typedef typename TYPE::kind kind;
88  };
89 
90  template
91  <
92  typename VALTYPE,
93  template <typename> class TYPE
94  >
96  {
97  return true;
98  }
99 /*
100  template <typename valTypeT, unsigned int colT, unsigned int rowT, profile proT = nice>
101  class base
102  {
103  public:
105  // Traits
106 
107  typedef sizeType size_type;
108  typedef valTypeT value_type;
109 
110  typedef base<value_type, colT, rowT> class_type;
111 
112  typedef base<bool, colT, rowT> bool_type;
113  typedef base<value_type, rowT, 1> col_type;
114  typedef base<value_type, colT, 1> row_type;
115  typedef base<value_type, rowT, colT> transpose_type;
116 
117  static size_type col_size();
118  static size_type row_size();
119  static size_type value_size();
120  static bool is_scalar();
121  static bool is_vector();
122  static bool is_matrix();
123 
124  private:
125  // Data
126  col_type value[colT];
127 
128  public:
130  // Constructors
131  base();
132  base(class_type const & m);
133 
134  explicit base(T const & x);
135  explicit base(value_type const * const x);
136  explicit base(col_type const * const x);
137 
139  // Conversions
140  template <typename vU, uint cU, uint rU, profile pU>
141  explicit base(base<vU, cU, rU, pU> const & m);
142 
144  // Accesses
145  col_type& operator[](size_type i);
146  col_type const & operator[](size_type i) const;
147 
149  // Unary updatable operators
150  class_type& operator= (class_type const & x);
151  class_type& operator+= (T const & x);
152  class_type& operator+= (class_type const & x);
153  class_type& operator-= (T const & x);
154  class_type& operator-= (class_type const & x);
155  class_type& operator*= (T const & x);
156  class_type& operator*= (class_type const & x);
157  class_type& operator/= (T const & x);
158  class_type& operator/= (class_type const & x);
159  class_type& operator++ ();
160  class_type& operator-- ();
161  };
162 */
163 
164  //template <typename T>
165  //struct traits
166  //{
167  // static const bool is_signed = false;
168  // static const bool is_float = false;
169  // static const bool is_vector = false;
170  // static const bool is_matrix = false;
171  // static const bool is_genType = false;
172  // static const bool is_genIType = false;
173  // static const bool is_genUType = false;
174  //};
175 
176  //template <>
177  //struct traits<half>
178  //{
179  // static const bool is_float = true;
180  // static const bool is_genType = true;
181  //};
182 
183  //template <>
184  //struct traits<float>
185  //{
186  // static const bool is_float = true;
187  // static const bool is_genType = true;
188  //};
189 
190  //template <>
191  //struct traits<double>
192  //{
193  // static const bool is_float = true;
194  // static const bool is_genType = true;
195  //};
196 
197  //template <typename genType>
198  //struct desc
199  //{
200  // typedef genType type;
201  // typedef genType * pointer;
202  // typedef genType const* const_pointer;
203  // typedef genType const *const const_pointer_const;
204  // typedef genType *const pointer_const;
205  // typedef genType & reference;
206  // typedef genType const& const_reference;
207  // typedef genType const& param_type;
208 
209  // typedef typename genType::value_type value_type;
210  // typedef typename genType::size_type size_type;
211  // static const typename size_type value_size;
212  //};
213 
214  //template <typename genType>
215  //const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size();
216 
217 }//namespace detail
218 }//namespace glm
219 
220 //#include "type_gentype.inl"
glm::nice
@ nice
Definition: type_gentype.hpp:35
glm::sizeType
std::size_t sizeType
Definition: type_gentype.hpp:40
glm::detail::genType::reference
TYPE< VALTYPE > & reference
Definition: type_gentype.hpp:69
glm::detail::genType::const_pointer
const TYPE< VALTYPE > * const_pointer
Definition: type_gentype.hpp:66
glm::simd
@ simd
Definition: type_gentype.hpp:37
detail
glm::profile
profile
Definition: type_gentype.hpp:33
glm::detail::genType::const_pointer_const
const TYPE< VALTYPE > *const const_pointer_const
Definition: type_gentype.hpp:67
glm::detail::genType::pointer_const
TYPE< VALTYPE > *const pointer_const
Definition: type_gentype.hpp:68
glm::detail::genType::value_type
VALTYPE value_type
Definition: type_gentype.hpp:54
glm::detail::genType::const_reference
const TYPE< VALTYPE > & const_reference
Definition: type_gentype.hpp:70
glm::detail::genType::is_matrix
static bool is_matrix()
glm::detail::genType::pointer
TYPE< VALTYPE > * pointer
Definition: type_gentype.hpp:65
glm::detail::genType::value_pointer
VALTYPE * value_pointer
Definition: type_gentype.hpp:56
glm
Definition: _literals.hpp:31
glm::detail::genType::param_type
const TYPE< VALTYPE > & param_type
Definition: type_gentype.hpp:71
TYPE
#define TYPE
glm::detail::genType::bool_type
TYPE< bool > bool_type
Definition: type_gentype.hpp:58
glm::detail::genType::size_type
sizeType size_type
Definition: type_gentype.hpp:60
glm::detail::genType::type
TYPE< VALTYPE > type
Definition: type_gentype.hpp:64
glm::detail::genType::value_const_pointer
const VALTYPE * value_const_pointer
Definition: type_gentype.hpp:57
glm::detail::genType
Definition: type_gentype.hpp:49
glm::detail::genType::value_address
value_pointer value_address()
Definition: type_gentype.hpp:77
glm::detail::genType::value_address
value_const_pointer value_address() const
Definition: type_gentype.hpp:76
glm::detail::genType::value_reference
VALTYPE & value_reference
Definition: type_gentype.hpp:55
glm::detail::genType::ctor
ctor
Definition: type_gentype.hpp:52
glm::detail::genType::is_vector
static bool is_vector()
Definition: type_gentype.hpp:95
glm::fast
@ fast
Definition: type_gentype.hpp:36


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:22