From 2615896faa646e5830abf2c269150e1165c66515 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx | 78 --------------------------- 1 file changed, 78 deletions(-) delete mode 100644 libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx (limited to 'libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx') diff --git a/libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx b/libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx deleted file mode 100644 index 6a8b606..0000000 --- a/libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx +++ /dev/null @@ -1,78 +0,0 @@ -// file : xsd/cxx/tree/parsing/unsigned-byte.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_PARSING_UNSIGNED_BYTE_HXX -#define XSD_CXX_TREE_PARSING_UNSIGNED_BYTE_HXX - -#include -#include - -#include // xml::transcode - -#include // text_content - -namespace xsd -{ - namespace cxx - { - namespace tree - { - template - struct traits - { - typedef unsigned char type; - - static type - create (const xercesc::DOMElement& e, flags f, container* c); - - static type - create (const xercesc::DOMAttr& a, flags f, container* c); - - static type - create (const std::basic_string& s, - const xercesc::DOMElement*, - flags, - container*); - }; - - template - unsigned char traits:: - create (const xercesc::DOMElement& e, flags f, container* c) - { - return create (tree::text_content (e), 0, f, c); - } - - template - unsigned char traits:: - create (const xercesc::DOMAttr& a, flags f, container* c) - { - return create (xml::transcode (a.getValue ()), 0, f, c); - } - - template - unsigned char traits:: - create (const std::basic_string& s, - const xercesc::DOMElement*, - flags, - container*) - { - // This type cannot have whitespaces in its values. As result we - // don't need to waste time collapsing whitespaces. All we need to - // do is trim the string representation which can be done without - // copying. - // - ro_string tmp (s); - trim (tmp); - - zc_istream is (tmp); - - unsigned short t; - is >> t; - - return static_cast (t); - } - } - } -} - -#endif // XSD_CXX_TREE_PARSING_UNSIGNED_BYTE_HXX -- cgit v1.1