root/win32/xsd-3.1.0-i686/libxsd/xsd/cxx/tree/bits/literals.ixx @ 111

Revision 111, 10.3 kB (checked in by mido, 16 years ago)

pridana knihovna XSD (a jeji chlebodarkyne XERCES), v ramci Win32 zprovoznen priklad tests/test_xsd_hello.cxx

RevLine 
[111]1// file      : xsd/cxx/tree/bits/literals.ixx
2// author    : Boris Kolpackov <boris@codesynthesis.com>
3// copyright : Copyright (c) 2005-2008 Code Synthesis Tools CC
4// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file
5
6#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX
7#define XSD_CXX_TREE_BITS_LITERALS_IXX
8
9#endif // XSD_CXX_TREE_BITS_LITERALS_IXX
10
11
12#if defined(XSD_CXX_TREE_USE_CHAR) || !defined(XSD_CXX_TREE_USE_WCHAR)
13
14#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR
15#define XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR
16
17namespace xsd
18{
19  namespace cxx
20  {
21    namespace tree
22    {
23      namespace bits
24      {
25        //
26        //
27        template<>
28        inline const char*
29        true_<char> ()
30        {
31          return "true";
32        }
33
34        template<>
35        inline const char*
36        one<char> ()
37        {
38          return "1";
39        }
40
41        //
42        //
43        template<>
44        inline const char*
45        positive_inf<char> ()
46        {
47          return "INF";
48        }
49
50        template<>
51        inline const char*
52        negative_inf<char> ()
53        {
54          return "-INF";
55        }
56
57        template<>
58        inline const char*
59        nan<char> ()
60        {
61          return "NaN";
62        }
63
64        //
65        //
66        template<>
67        inline const char*
68        not_present<char> ()
69        {
70          return "<not present>";
71        }
72
73        //
74        //
75        template <>
76        inline const char*
77        xml_schema<char> ()
78        {
79          return "http://www.w3.org/2001/XMLSchema";
80        }
81
82        //
83        //
84        template <>
85        inline const char*
86        any_type<char> ()
87        {
88          return "anyType";
89        }
90
91        template <>
92        inline const char*
93        any_simple_type<char> ()
94        {
95          return "anySimpleType";
96        }
97
98        template <>
99        inline const char*
100        string<char> ()
101        {
102          return "string";
103        }
104
105        template <>
106        inline const char*
107        normalized_string<char> ()
108        {
109          return "normalizedString";
110        }
111
112        template <>
113        inline const char*
114        token<char> ()
115        {
116          return "token";
117        }
118
119        template <>
120        inline const char*
121        name<char> ()
122        {
123          return "Name";
124        }
125
126        template <>
127        inline const char*
128        nmtoken<char> ()
129        {
130          return "NMTOKEN";
131        }
132
133        template <>
134        inline const char*
135        nmtokens<char> ()
136        {
137          return "NMTOKENS";
138        }
139
140        template <>
141        inline const char*
142        ncname<char> ()
143        {
144          return "NCName";
145        }
146
147        template <>
148        inline const char*
149        language<char> ()
150        {
151          return "language";
152        }
153
154
155        template <>
156        inline const char*
157        id<char> ()
158        {
159          return "ID";
160        }
161
162        template <>
163        inline const char*
164        idref<char> ()
165        {
166          return "IDREF";
167        }
168
169        template <>
170        inline const char*
171        idrefs<char> ()
172        {
173          return "IDREFS";
174        }
175
176        template <>
177        inline const char*
178        any_uri<char> ()
179        {
180          return "anyURI";
181        }
182
183        template <>
184        inline const char*
185        qname<char> ()
186        {
187          return "QName";
188        }
189
190        template <>
191        inline const char*
192        base64_binary<char> ()
193        {
194          return "base64Binary";
195        }
196
197        template <>
198        inline const char*
199        hex_binary<char> ()
200        {
201          return "hexBinary";
202        }
203
204        template <>
205        inline const char*
206        date<char> ()
207        {
208          return "date";
209        }
210
211        template <>
212        inline const char*
213        date_time<char> ()
214        {
215          return "dateTime";
216        }
217
218        template <>
219        inline const char*
220        duration<char> ()
221        {
222          return "duration";
223        }
224
225        template <>
226        inline const char*
227        gday<char> ()
228        {
229          return "gDay";
230        }
231
232        template <>
233        inline const char*
234        gmonth<char> ()
235        {
236          return "gMonth";
237        }
238
239        template <>
240        inline const char*
241        gmonth_day<char> ()
242        {
243          return "gMonthDay";
244        }
245
246        template <>
247        inline const char*
248        gyear<char> ()
249        {
250          return "gYear";
251        }
252
253        template <>
254        inline const char*
255        gyear_month<char> ()
256        {
257          return "gYearMonth";
258        }
259
260        template <>
261        inline const char*
262        time<char> ()
263        {
264          return "time";
265        }
266
267        template <>
268        inline const char*
269        entity<char> ()
270        {
271          return "ENTITY";
272        }
273
274        template <>
275        inline const char*
276        entities<char> ()
277        {
278          return "ENTITIES";
279        }
280
281        template <>
282        inline const char*
283        gday_prefix<char> ()
284        {
285          return "---";
286        }
287
288        template <>
289        inline const char*
290        gmonth_prefix<char> ()
291        {
292          return "--";
293        }
294      }
295    }
296  }
297}
298
299#endif // XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR
300#endif // XSD_CXX_TREE_USE_CHAR
301
302
303#if defined(XSD_CXX_TREE_USE_WCHAR) || !defined(XSD_CXX_TREE_USE_CHAR)
304
305#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR
306#define XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR
307
308namespace xsd
309{
310  namespace cxx
311  {
312    namespace tree
313    {
314      namespace bits
315      {
316        //
317        //
318        template<>
319        inline const wchar_t*
320        true_<wchar_t> ()
321        {
322          return L"true";
323        }
324
325        template<>
326        inline const wchar_t*
327        one<wchar_t> ()
328        {
329          return L"1";
330        }
331
332        //
333        //
334        template<>
335        inline const wchar_t*
336        positive_inf<wchar_t> ()
337        {
338          return L"INF";
339        }
340
341        template<>
342        inline const wchar_t*
343        negative_inf<wchar_t> ()
344        {
345          return L"-INF";
346        }
347
348        template<>
349        inline const wchar_t*
350        nan<wchar_t> ()
351        {
352          return L"NaN";
353        }
354
355        //
356        //
357        template<>
358        inline const wchar_t*
359        not_present<wchar_t> ()
360        {
361          return L"<not present>";
362        }
363
364        //
365        //
366        template <>
367        inline const wchar_t*
368        xml_schema<wchar_t> ()
369        {
370          return L"http://www.w3.org/2001/XMLSchema";
371        }
372
373        //
374        //
375        template <>
376        inline const wchar_t*
377        any_type<wchar_t> ()
378        {
379          return L"anyType";
380        }
381
382        template <>
383        inline const wchar_t*
384        any_simple_type<wchar_t> ()
385        {
386          return L"anySimpleType";
387        }
388
389        template <>
390        inline const wchar_t*
391        string<wchar_t> ()
392        {
393          return L"string";
394        }
395
396        template <>
397        inline const wchar_t*
398        normalized_string<wchar_t> ()
399        {
400          return L"normalizedString";
401        }
402
403        template <>
404        inline const wchar_t*
405        token<wchar_t> ()
406        {
407          return L"token";
408        }
409
410        template <>
411        inline const wchar_t*
412        name<wchar_t> ()
413        {
414          return L"Name";
415        }
416
417        template <>
418        inline const wchar_t*
419        nmtoken<wchar_t> ()
420        {
421          return L"NMTOKEN";
422        }
423
424        template <>
425        inline const wchar_t*
426        nmtokens<wchar_t> ()
427        {
428          return L"NMTOKENS";
429        }
430
431        template <>
432        inline const wchar_t*
433        ncname<wchar_t> ()
434        {
435          return L"NCName";
436        }
437
438        template <>
439        inline const wchar_t*
440        language<wchar_t> ()
441        {
442          return L"language";
443        }
444
445
446        template <>
447        inline const wchar_t*
448        id<wchar_t> ()
449        {
450          return L"ID";
451        }
452
453        template <>
454        inline const wchar_t*
455        idref<wchar_t> ()
456        {
457          return L"IDREF";
458        }
459
460        template <>
461        inline const wchar_t*
462        idrefs<wchar_t> ()
463        {
464          return L"IDREFS";
465        }
466
467        template <>
468        inline const wchar_t*
469        any_uri<wchar_t> ()
470        {
471          return L"anyURI";
472        }
473
474        template <>
475        inline const wchar_t*
476        qname<wchar_t> ()
477        {
478          return L"QName";
479        }
480
481        template <>
482        inline const wchar_t*
483        base64_binary<wchar_t> ()
484        {
485          return L"base64Binary";
486        }
487
488        template <>
489        inline const wchar_t*
490        hex_binary<wchar_t> ()
491        {
492          return L"hexBinary";
493        }
494
495        template <>
496        inline const wchar_t*
497        date<wchar_t> ()
498        {
499          return L"date";
500        }
501
502        template <>
503        inline const wchar_t*
504        date_time<wchar_t> ()
505        {
506          return L"dateTime";
507        }
508
509        template <>
510        inline const wchar_t*
511        duration<wchar_t> ()
512        {
513          return L"duration";
514        }
515
516        template <>
517        inline const wchar_t*
518        gday<wchar_t> ()
519        {
520          return L"gDay";
521        }
522
523        template <>
524        inline const wchar_t*
525        gmonth<wchar_t> ()
526        {
527          return L"gMonth";
528        }
529
530        template <>
531        inline const wchar_t*
532        gmonth_day<wchar_t> ()
533        {
534          return L"gMonthDay";
535        }
536
537        template <>
538        inline const wchar_t*
539        gyear<wchar_t> ()
540        {
541          return L"gYear";
542        }
543
544        template <>
545        inline const wchar_t*
546        gyear_month<wchar_t> ()
547        {
548          return L"gYearMonth";
549        }
550
551        template <>
552        inline const wchar_t*
553        time<wchar_t> ()
554        {
555          return L"time";
556        }
557
558        template <>
559        inline const wchar_t*
560        entity<wchar_t> ()
561        {
562          return L"ENTITY";
563        }
564
565        template <>
566        inline const wchar_t*
567        entities<wchar_t> ()
568        {
569          return L"ENTITIES";
570        }
571
572        template <>
573        inline const wchar_t*
574        gday_prefix<wchar_t> ()
575        {
576          return L"---";
577        }
578
579        template <>
580        inline const wchar_t*
581        gmonth_prefix<wchar_t> ()
582        {
583          return L"--";
584        }
585      }
586    }
587  }
588}
589
590#endif // XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR
591#endif // XSD_CXX_TREE_USE_WCHAR
Note: See TracBrowser for help on using the browser.