From f0510d2f90467de8e8f260b47d79a9baaf9bef17 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 Sep 2009 07:15:29 +0200 Subject: Start tracking XSD with git --- libxsd/xsd/cxx/tree/serialization/byte.hxx | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 libxsd/xsd/cxx/tree/serialization/byte.hxx (limited to 'libxsd/xsd/cxx/tree/serialization/byte.hxx') diff --git a/libxsd/xsd/cxx/tree/serialization/byte.hxx b/libxsd/xsd/cxx/tree/serialization/byte.hxx new file mode 100644 index 0000000..60a117f --- /dev/null +++ b/libxsd/xsd/cxx/tree/serialization/byte.hxx @@ -0,0 +1,46 @@ +// file : xsd/cxx/tree/serialization/byte.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_CXX_TREE_SERIALIZATION_BYTE_HXX +#define XSD_CXX_TREE_SERIALIZATION_BYTE_HXX + +#include + +namespace XERCES_CPP_NAMESPACE +{ + inline void + operator<< (xercesc::DOMElement& e, signed char c) + { + std::basic_ostringstream os; + os << static_cast (c); + e << os.str (); + } + + inline void + operator<< (xercesc::DOMAttr& a, signed char c) + { + std::basic_ostringstream os; + os << static_cast (c); + a << os.str (); + } +} + +namespace xsd +{ + namespace cxx + { + namespace tree + { + template + inline void + operator<< (list_stream& ls, signed char c) + { + ls.os_ << static_cast (c); + } + } + } +} + +#endif // XSD_CXX_TREE_SERIALIZATION_BYTE_HXX -- cgit v1.1