Revision 111, 1.0 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
|
Rev | Line | |
---|
[111] | 1 | // file : xsd/cxx/tree/serialization/unsigned-short.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_UNSIGNED_SHORT_HXX |
---|
| 7 | #define XSD_CXX_TREE_SERIALIZATION_UNSIGNED_SHORT_HXX |
---|
| 8 | |
---|
| 9 | #include <sstream> |
---|
| 10 | |
---|
| 11 | namespace XERCES_CPP_NAMESPACE |
---|
| 12 | { |
---|
| 13 | inline void |
---|
| 14 | operator<< (xercesc::DOMElement& e, unsigned short s) |
---|
| 15 | { |
---|
| 16 | std::basic_ostringstream<char> os; |
---|
| 17 | os << s; |
---|
| 18 | e << os.str (); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | inline void |
---|
| 22 | operator<< (xercesc::DOMAttr& a, unsigned short s) |
---|
| 23 | { |
---|
| 24 | std::basic_ostringstream<char> os; |
---|
| 25 | os << s; |
---|
| 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, unsigned short s) |
---|
| 39 | { |
---|
| 40 | ls.os_ << s; |
---|
| 41 | } |
---|
| 42 | } |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | #endif // XSD_CXX_TREE_SERIALIZATION_UNSIGNED_SHORT_HXX |
---|