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/short.hxx | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 libxsd/xsd/cxx/tree/serialization/short.hxx (limited to 'libxsd/xsd/cxx/tree/serialization/short.hxx') diff --git a/libxsd/xsd/cxx/tree/serialization/short.hxx b/libxsd/xsd/cxx/tree/serialization/short.hxx new file mode 100644 index 0000000..a935b7c --- /dev/null +++ b/libxsd/xsd/cxx/tree/serialization/short.hxx @@ -0,0 +1,46 @@ +// file : xsd/cxx/tree/serialization/short.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_SHORT_HXX +#define XSD_CXX_TREE_SERIALIZATION_SHORT_HXX + +#include + +namespace XERCES_CPP_NAMESPACE +{ + inline void + operator<< (xercesc::DOMElement& e, short s) + { + std::basic_ostringstream os; + os << s; + e << os.str (); + } + + inline void + operator<< (xercesc::DOMAttr& a, short s) + { + std::basic_ostringstream os; + os << s; + a << os.str (); + } +} + +namespace xsd +{ + namespace cxx + { + namespace tree + { + template + inline void + operator<< (list_stream& ls, short s) + { + ls.os_ << s; + } + } + } +} + +#endif // XSD_CXX_TREE_SERIALIZATION_SHORT_HXX -- cgit v1.1