All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsCharacter.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_TYPETRAITS_ISCHARACTER_H_
23 #define _BLAZE_UTIL_TYPETRAITS_ISCHARACTER_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <blaze/util/FalseType.h>
31 #include <blaze/util/TrueType.h>
32 
33 
34 namespace blaze {
35 
36 //=================================================================================================
37 //
38 // CLASS DEFINITION
39 //
40 //=================================================================================================
41 
42 //*************************************************************************************************
62 template< typename T >
63 struct IsCharacter : public FalseType
64 {
65  public:
66  //**********************************************************************************************
68  enum { value = 0 };
69  typedef FalseType Type;
71  //**********************************************************************************************
72 };
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
78 
79 template<>
80 struct IsCharacter<char> : public TrueType
81 {
82  public:
83  //**********************************************************************************************
84  enum { value = 1 };
85  typedef TrueType Type;
86  //**********************************************************************************************
87 };
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
94 
95 template<>
96 struct IsCharacter<const char> : public TrueType
97 {
98  public:
99  //**********************************************************************************************
100  enum { value = 1 };
101  typedef TrueType Type;
102  //**********************************************************************************************
103 };
105 //*************************************************************************************************
106 
107 
108 //*************************************************************************************************
110 
111 template<>
112 struct IsCharacter<volatile char> : public TrueType
113 {
114  public:
115  //**********************************************************************************************
116  enum { value = 1 };
117  typedef TrueType Type;
118  //**********************************************************************************************
119 };
121 //*************************************************************************************************
122 
123 
124 //*************************************************************************************************
126 
127 template<>
128 struct IsCharacter<const volatile char> : public TrueType
129 {
130  public:
131  //**********************************************************************************************
132  enum { value = 1 };
133  typedef TrueType Type;
134  //**********************************************************************************************
135 };
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
142 
143 template<>
144 struct IsCharacter<signed char> : public TrueType
145 {
146  public:
147  //**********************************************************************************************
148  enum { value = 1 };
149  typedef TrueType Type;
150  //**********************************************************************************************
151 };
153 //*************************************************************************************************
154 
155 
156 //*************************************************************************************************
158 
159 template<>
160 struct IsCharacter<const signed char> : public TrueType
161 {
162  public:
163  //**********************************************************************************************
164  enum { value = 1 };
165  typedef TrueType Type;
166  //**********************************************************************************************
167 };
169 //*************************************************************************************************
170 
171 
172 //*************************************************************************************************
174 
175 template<>
176 struct IsCharacter<volatile signed char> : public TrueType
177 {
178  public:
179  //**********************************************************************************************
180  enum { value = 1 };
181  typedef TrueType Type;
182  //**********************************************************************************************
183 };
185 //*************************************************************************************************
186 
187 
188 //*************************************************************************************************
190 
191 template<>
192 struct IsCharacter<const volatile signed char> : public TrueType
193 {
194  public:
195  //**********************************************************************************************
196  enum { value = 1 };
197  typedef TrueType Type;
198  //**********************************************************************************************
199 };
201 //*************************************************************************************************
202 
203 
204 //*************************************************************************************************
206 
207 template<>
208 struct IsCharacter<unsigned char> : public TrueType
209 {
210  public:
211  //**********************************************************************************************
212  enum { value = 1 };
213  typedef TrueType Type;
214  //**********************************************************************************************
215 };
217 //*************************************************************************************************
218 
219 
220 //*************************************************************************************************
222 
223 template<>
224 struct IsCharacter<const unsigned char> : public TrueType
225 {
226  public:
227  //**********************************************************************************************
228  enum { value = 1 };
229  typedef TrueType Type;
230  //**********************************************************************************************
231 };
233 //*************************************************************************************************
234 
235 
236 //*************************************************************************************************
238 
239 template<>
240 struct IsCharacter<volatile unsigned char> : public TrueType
241 {
242  public:
243  //**********************************************************************************************
244  enum { value = 1 };
245  typedef TrueType Type;
246  //**********************************************************************************************
247 };
249 //*************************************************************************************************
250 
251 
252 //*************************************************************************************************
254 
255 template<>
256 struct IsCharacter<const volatile unsigned char> : public TrueType
257 {
258  public:
259  //**********************************************************************************************
260  enum { value = 1 };
261  typedef TrueType Type;
262  //**********************************************************************************************
263 };
265 //*************************************************************************************************
266 
267 
268 //*************************************************************************************************
270 
271 template<>
272 struct IsCharacter<wchar_t> : public TrueType
273 {
274  public:
275  //**********************************************************************************************
276  enum { value = 1 };
277  typedef TrueType Type;
278  //**********************************************************************************************
279 };
281 //*************************************************************************************************
282 
283 
284 //*************************************************************************************************
286 
287 template<>
288 struct IsCharacter<const wchar_t> : public TrueType
289 {
290  public:
291  //**********************************************************************************************
292  enum { value = 1 };
293  typedef TrueType Type;
294  //**********************************************************************************************
295 };
297 //*************************************************************************************************
298 
299 
300 //*************************************************************************************************
302 
303 template<>
304 struct IsCharacter<volatile wchar_t> : public TrueType
305 {
306  public:
307  //**********************************************************************************************
308  enum { value = 1 };
309  typedef TrueType Type;
310  //**********************************************************************************************
311 };
313 //*************************************************************************************************
314 
315 
316 //*************************************************************************************************
318 
319 template<>
320 struct IsCharacter<const volatile wchar_t> : public TrueType
321 {
322  public:
323  //**********************************************************************************************
324  enum { value = 1 };
325  typedef TrueType Type;
326  //**********************************************************************************************
327 };
329 //*************************************************************************************************
330 
331 } // namespace blaze
332 
333 #endif