diff options
Diffstat (limited to 'xsd/cxx/parser/elements.cxx')
-rw-r--r-- | xsd/cxx/parser/elements.cxx | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/xsd/cxx/parser/elements.cxx b/xsd/cxx/parser/elements.cxx index bd610a3..af68568 100644 --- a/xsd/cxx/parser/elements.cxx +++ b/xsd/cxx/parser/elements.cxx @@ -9,35 +9,6 @@ namespace CXX { namespace Parser { - // Keep this symbol first to help HP-UX linker (long symbols?). - // - Content::Value Context:: - content (SemanticGraph::Complex& c) - { - using namespace SemanticGraph; - - if (c.mixed_p ()) - return Content::mixed; - - if (c.inherits_p ()) - { - Type& base (c.inherits ().base ()); - - if (Complex* cb = dynamic_cast<Complex*> (&base)) - return content (*cb); - - if (base.is_a<AnyType> ()) - return Content::complex; - - // Everyhting else (built-in type and AnySimpleType) is simple - // content. - // - return Content::simple; - } - else - return Content::complex; - } - Context:: Context (std::wostream& o, SemanticGraph::Schema& root, @@ -129,6 +100,33 @@ namespace CXX { } + Content::Value Context:: + content (SemanticGraph::Complex& c) + { + using namespace SemanticGraph; + + if (c.mixed_p ()) + return Content::mixed; + + if (c.inherits_p ()) + { + Type& base (c.inherits ().base ()); + + if (Complex* cb = dynamic_cast<Complex*> (&base)) + return content (*cb); + + if (base.is_a<AnyType> ()) + return Content::complex; + + // Everyhting else (built-in type and AnySimpleType) is simple + // content. + // + return Content::simple; + } + else + return Content::complex; + } + bool Context:: anonymous (SemanticGraph::Type& t) { |