Revision 111, 1.0 kB
(checked in by mido, 17 years ago)
|
pridana knihovna XSD (a jeji chlebodarkyne XERCES), v ramci Win32 zprovoznen priklad tests/test_xsd_hello.cxx
|
Line | |
---|
1 | // file : xsd/cxx/tree/serialization/byte.hxx |
---|
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_SERIALIZATION_BYTE_HXX |
---|
7 | #define XSD_CXX_TREE_SERIALIZATION_BYTE_HXX |
---|
8 | |
---|
9 | #include <sstream> |
---|
10 | |
---|
11 | namespace XERCES_CPP_NAMESPACE |
---|
12 | { |
---|
13 | inline void |
---|
14 | operator<< (xercesc::DOMElement& e, signed char c) |
---|
15 | { |
---|
16 | std::basic_ostringstream<char> os; |
---|
17 | os << static_cast<short> (c); |
---|
18 | e << os.str (); |
---|
19 | } |
---|
20 | |
---|
21 | inline void |
---|
22 | operator<< (xercesc::DOMAttr& a, signed char c) |
---|
23 | { |
---|
24 | std::basic_ostringstream<char> os; |
---|
25 | os << static_cast<short> (c); |
---|
26 | a << os.str (); |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | namespace xsd |
---|
31 | { |
---|
32 | namespace cxx |
---|
33 | { |
---|
34 | namespace tree |
---|
35 | { |
---|
36 | template <typename C> |
---|
37 | inline void |
---|
38 | operator<< (list_stream<C>& ls, signed char c) |
---|
39 | { |
---|
40 | ls.os_ << static_cast<short> (c); |
---|
41 | } |
---|
42 | } |
---|
43 | } |
---|
44 | } |
---|
45 | |
---|
46 | #endif // XSD_CXX_TREE_SERIALIZATION_BYTE_HXX |
---|