From 3bf42ed8ccc93a3ff5fdabb9153b887018075acc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Jan 2010 11:44:48 +0200 Subject: Add support for selective polymorphic in C++/Tree New options: --polymorphic-type, --polymorphic-type-all. --- xsd/cxx/tree/parser-source.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'xsd/cxx/tree/parser-source.cxx') diff --git a/xsd/cxx/tree/parser-source.cxx b/xsd/cxx/tree/parser-source.cxx index 66abf96..94d0b91 100644 --- a/xsd/cxx/tree/parser-source.cxx +++ b/xsd/cxx/tree/parser-source.cxx @@ -295,18 +295,16 @@ namespace CXX // Boolean fund (false); - { IsFundamentalType test (fund); test.dispatch (t); } // Check if we need to handle xsi:type and substitution groups. - // If this element's type is anonymous or mapped to a fundamental - // C++ type then we don't need to do anything. + // If this element's type is anonymous then we don't need to do + // anything. // - Boolean poly (!fund && polymorphic && - !t.context ().count ("anonymous")); + Boolean poly (polymorphic && polymorphic_p (t) && !anonymous_p (t)); // const DOMDocument& // -- cgit v1.1