diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-07-03 09:57:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-07-03 09:57:09 +0200 |
commit | 1a4099b78717b16f632b0e7e0980a27811221e52 (patch) | |
tree | 87a63393fc207082b7418987309581a9a79e49a4 /libxsd/xsd/cxx/tree/stream-extraction.hxx | |
parent | 06258b8eae3d5af9a1af0206bb5a8e5c80dde455 (diff) |
Implement anyType and anySimpleType content representation
anyType as a DOM fragment, similar to wildcards. anySimpleType as
a text string.
Diffstat (limited to 'libxsd/xsd/cxx/tree/stream-extraction.hxx')
-rw-r--r-- | libxsd/xsd/cxx/tree/stream-extraction.hxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libxsd/xsd/cxx/tree/stream-extraction.hxx b/libxsd/xsd/cxx/tree/stream-extraction.hxx index b55afa0..ee39bcc 100644 --- a/libxsd/xsd/cxx/tree/stream-extraction.hxx +++ b/libxsd/xsd/cxx/tree/stream-extraction.hxx @@ -28,12 +28,18 @@ namespace xsd // simple_type // - template <typename B> + template <typename C, typename B> template <typename S> - inline simple_type<B>:: + inline simple_type<C, B>:: simple_type (istream<S>& s, flags f, container* c) - : type (s, f, c) + : type (s, f & ~flags::extract_content, c) { + if (f & flags::extract_content) + { + std::basic_string<C> t; + s >> t; + this->content_.reset (new text_content_type (t)); + } } // fundamental_base @@ -65,9 +71,7 @@ namespace xsd this->reserve (size); while (size--) - { - this->push_back (XSD_AUTO_PTR<T> (new T (s, f, c))); - } + this->push_back (traits<T, C, ST>::create (s, f, c)); } } |