diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-03-26 17:09:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-03-26 17:09:53 +0200 |
commit | e4c22d3686da0e973e21eae0561c1169c0eeff36 (patch) | |
tree | 0a49e9167edc88938b0287949080931314e8afea /libxsde/xsde/cxx/parser | |
parent | 0d62005a3ff3b62d02c2eb3fd8644e0e19b202e8 (diff) |
Implement support for XML Schema polymorphism in C++/Hybrid
examples/cxx/hybrid/polyroot/
examples/cxx/hybrid/polymorphism/: new examples
tests/cxx/hybrid/polymorphism/: new tests
Diffstat (limited to 'libxsde/xsde/cxx/parser')
-rw-r--r-- | libxsde/xsde/cxx/parser/map.cxx | 8 | ||||
-rw-r--r-- | libxsde/xsde/cxx/parser/map.hxx | 1 | ||||
-rw-r--r-- | libxsde/xsde/cxx/parser/map.ixx | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/libxsde/xsde/cxx/parser/map.cxx b/libxsde/xsde/cxx/parser/map.cxx index b21c41e..1382c8d 100644 --- a/libxsde/xsde/cxx/parser/map.cxx +++ b/libxsde/xsde/cxx/parser/map.cxx @@ -23,12 +23,20 @@ namespace xsde void parser_map_impl:: reset () const { + if (resetting_) + return; + + bool& r = const_cast<bool&> (resetting_); + r = true; + for (hashmap::const_iterator i (map_.begin ()), e (map_.end ()); i != e; ++i) { parser_base* p = *static_cast<parser_base* const*> (*i); p->_reset (); } + + r = false; } } } diff --git a/libxsde/xsde/cxx/parser/map.hxx b/libxsde/xsde/cxx/parser/map.hxx index 400de27..0a5c99c 100644 --- a/libxsde/xsde/cxx/parser/map.hxx +++ b/libxsde/xsde/cxx/parser/map.hxx @@ -77,6 +77,7 @@ namespace xsde private: hashmap map_; + bool resetting_; }; } } diff --git a/libxsde/xsde/cxx/parser/map.ixx b/libxsde/xsde/cxx/parser/map.ixx index 3a1f931..0f5e477 100644 --- a/libxsde/xsde/cxx/parser/map.ixx +++ b/libxsde/xsde/cxx/parser/map.ixx @@ -19,7 +19,7 @@ namespace xsde inline parser_map_impl:: parser_map_impl (size_t buckets) - : map_ (buckets, sizeof (parser_base*)) + : map_ (buckets, sizeof (parser_base*)), resetting_ (false) { } |