From 9e21f520fb19163eeac2a9b80a4568dabfc29268 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Apr 2010 14:30:56 +0200 Subject: Adjust to changed predicate names --- xsd/cxx/parser/attribute-validation-source.cxx | 10 +++++----- xsd/cxx/parser/characters-validation-source.cxx | 3 +-- xsd/cxx/parser/element-validation-source.cxx | 10 +++++----- xsd/cxx/parser/elements.cxx | 2 +- xsd/cxx/parser/elements.hxx | 2 +- xsd/cxx/parser/name-processor.cxx | 6 +++--- xsd/cxx/parser/parser-header.cxx | 4 ++-- xsd/cxx/parser/parser-source.cxx | 14 +++++++------- xsd/cxx/parser/validator.cxx | 10 +++++----- 9 files changed, 30 insertions(+), 31 deletions(-) (limited to 'xsd/cxx/parser') diff --git a/xsd/cxx/parser/attribute-validation-source.cxx b/xsd/cxx/parser/attribute-validation-source.cxx index 2c57f2a..536e2da 100644 --- a/xsd/cxx/parser/attribute-validation-source.cxx +++ b/xsd/cxx/parser/attribute-validation-source.cxx @@ -28,7 +28,7 @@ namespace CXX { String const& name (a.name ()); - if (a.qualified () && a.namespace_ ().name ()) + if (a.qualified_p () && a.namespace_ ().name ()) { String const& ns (a.namespace_ ().name ()); @@ -127,7 +127,7 @@ namespace CXX os << "}"; - if (!a.optional ()) + if (!a.optional_p ()) os << "static_cast< v_state_attr_* > (" << "this->v_state_attr_stack_.top ())->" << name << " = true;"; @@ -180,7 +180,7 @@ namespace CXX virtual Void traverse (Type& a) { - if (!a.optional ()) + if (!a.optional_p ()) os << "as." << ename (a) << " = false;"; } }; @@ -198,9 +198,9 @@ namespace CXX virtual Void traverse (Type& a) { - if (!a.optional ()) + if (!a.optional_p ()) { - String ns (a.qualified () ? a.namespace_ ().name () : String ()); + String ns (a.qualified_p () ? a.namespace_ ().name () : String ()); os << "if (!as." << ename (a) << ")" << endl << "this->_expected_attribute (" << endl diff --git a/xsd/cxx/parser/characters-validation-source.cxx b/xsd/cxx/parser/characters-validation-source.cxx index da6b85b..236f2f5 100644 --- a/xsd/cxx/parser/characters-validation-source.cxx +++ b/xsd/cxx/parser/characters-validation-source.cxx @@ -26,7 +26,7 @@ namespace CXX virtual Void traverse (Type& c) { - if (!c.mixed ()) + if (!c.mixed_p ()) return; String const& name (ename (c)); @@ -73,4 +73,3 @@ namespace CXX } } } - diff --git a/xsd/cxx/parser/element-validation-source.cxx b/xsd/cxx/parser/element-validation-source.cxx index df701e9..211a0d3 100644 --- a/xsd/cxx/parser/element-validation-source.cxx +++ b/xsd/cxx/parser/element-validation-source.cxx @@ -36,10 +36,10 @@ namespace CXX { String const& name (e.name ()); - if (polymorphic && e.global ()) + if (polymorphic && e.global_p ()) os << "("; - if (e.qualified () && e.namespace_ ().name ()) + if (e.qualified_p () && e.namespace_ ().name ()) { String const& ns (e.namespace_ ().name ()); @@ -52,7 +52,7 @@ namespace CXX // Only a globally-defined element can be a subst-group root. // - if (polymorphic && e.global ()) + if (polymorphic && e.global_p ()) { os << ") ||" << endl << "::xsd::cxx::parser::substitution_map_instance< " << @@ -153,7 +153,7 @@ namespace CXX virtual Void traverse (SemanticGraph::Element& e) { - String ns (e.qualified () ? e.namespace_ ().name () : String ()); + String ns (e.qualified_p () ? e.namespace_ ().name () : String ()); os << strlit (ns) << ", " << strlit (e.name ()); } @@ -877,7 +877,7 @@ namespace CXX continue; Element& e (dynamic_cast (ci->particle ())); - String ns (e.qualified () ? e.namespace_ ().name () : String ()); + String ns (e.qualified_p () ? e.namespace_ ().name () : String ()); UnsignedLong state (e.context ().get ("state")); os << "if (count[" << state << "UL] == 0)" << endl diff --git a/xsd/cxx/parser/elements.cxx b/xsd/cxx/parser/elements.cxx index 140f041..9c2dac3 100644 --- a/xsd/cxx/parser/elements.cxx +++ b/xsd/cxx/parser/elements.cxx @@ -16,7 +16,7 @@ namespace CXX { using namespace SemanticGraph; - if (c.mixed ()) + if (c.mixed_p ()) return Content::mixed; if (c.inherits_p ()) diff --git a/xsd/cxx/parser/elements.hxx b/xsd/cxx/parser/elements.hxx index ca766f6..ee5ca86 100644 --- a/xsd/cxx/parser/elements.hxx +++ b/xsd/cxx/parser/elements.hxx @@ -141,7 +141,7 @@ namespace CXX virtual Void traverse (Type& a) { - if (!result_ && !a.optional ()) + if (!result_ && !a.optional_p ()) result_ = true; } diff --git a/xsd/cxx/parser/name-processor.cxx b/xsd/cxx/parser/name-processor.cxx index 3bc616e..d323187 100644 --- a/xsd/cxx/parser/name-processor.cxx +++ b/xsd/cxx/parser/name-processor.cxx @@ -200,16 +200,16 @@ namespace CXX if (typeid (bm) != typeid (m)) continue; - if (m.qualified ()) + if (m.qualified_p ()) { - if (bm.qualified () && + if (bm.qualified_p () && m.name () == bm.name () && m.namespace_ ().name () == bm.namespace_ ().name ()) return bm; } else { - if (!bm.qualified () && m.name () == bm.name ()) + if (!bm.qualified_p () && m.name () == bm.name ()) return bm; } } diff --git a/xsd/cxx/parser/parser-header.cxx b/xsd/cxx/parser/parser-header.cxx index 6a4ac25..aade743 100644 --- a/xsd/cxx/parser/parser-header.cxx +++ b/xsd/cxx/parser/parser-header.cxx @@ -395,7 +395,7 @@ namespace CXX virtual Void traverse (Type& a) { - if (!a.optional ()) + if (!a.optional_p ()) { os << "bool " << ename (a) << ";"; } @@ -590,7 +590,7 @@ namespace CXX // characters // - if (validation && c.mixed ()) + if (validation && c.mixed_p ()) { os << "virtual bool" << endl << "_characters_impl (const " << string_type << "&);" diff --git a/xsd/cxx/parser/parser-source.cxx b/xsd/cxx/parser/parser-source.cxx index 339bb6f..99bc566 100644 --- a/xsd/cxx/parser/parser-source.cxx +++ b/xsd/cxx/parser/parser-source.cxx @@ -289,10 +289,10 @@ namespace CXX os << "if ("; - if (poly && e.global ()) + if (poly && e.global_p ()) os << "("; - if (e.qualified () && e.namespace_ ().name ()) + if (e.qualified_p () && e.namespace_ ().name ()) { os << "n == " << strlit (e.name ()) << " && " << "ns == " << strlit (e.namespace_ ().name ()); @@ -304,7 +304,7 @@ namespace CXX // Only a globally-defined element can be a subst-group root. // - if (poly && e.global ()) + if (poly && e.global_p ()) { os << ") ||" << endl << "::xsd::cxx::parser::substitution_map_instance< " << @@ -389,10 +389,10 @@ namespace CXX os << "if ("; - if (poly && e.global ()) + if (poly && e.global_p ()) os << "("; - if (e.qualified () && e.namespace_ ().name ()) + if (e.qualified_p () && e.namespace_ ().name ()) { os << "n == " << strlit (e.name ()) << " && " << "ns == " << strlit (e.namespace_ ().name ()); @@ -404,7 +404,7 @@ namespace CXX // Only a globally-defined element can be a subst-group root. // - if (poly && e.global ()) + if (poly && e.global_p ()) { os << ") ||" << endl << "::xsd::cxx::parser::substitution_map_instance< " << @@ -455,7 +455,7 @@ namespace CXX String const& name (ename (a)); String const& inst (emember (a)); - if (a.qualified () && a.namespace_ ().name ()) + if (a.qualified_p () && a.namespace_ ().name ()) { os << "if (n == " << strlit (a.name ()) << " && " << "ns == " << strlit (a.namespace_ ().name ()) << ")" diff --git a/xsd/cxx/parser/validator.cxx b/xsd/cxx/parser/validator.cxx index d70e333..19b15c6 100644 --- a/xsd/cxx/parser/validator.cxx +++ b/xsd/cxx/parser/validator.cxx @@ -52,7 +52,7 @@ namespace CXX if (n.is_a ()) return L""; // There is a bug if you see this. - assert (n.named ()); + assert (n.named_p ()); SemanticGraph::Scope& scope (n.scope ()); @@ -105,7 +105,7 @@ namespace CXX using SemanticGraph::Any; - Boolean q (e.qualified ()); + Boolean q (e.qualified_p ()); String ns (q ? e.namespace_ ().name () : ""); for (Any::NamespaceIterator i (any_.namespace_begin ()); @@ -284,7 +284,7 @@ namespace CXX { SemanticGraph::Type& t (c.inherits ().base ()); - if (t.named () && + if (t.named_p () && types_.find ( t.scope ().name () + L"#" + t.name ()) == types_.end ()) { @@ -322,7 +322,7 @@ namespace CXX virtual Void traverse (SemanticGraph::Type& t) { - if (t.named ()) + if (t.named_p ()) { types_.insert (t.scope ().name () + L"#" + t.name ()); } @@ -410,7 +410,7 @@ namespace CXX { SemanticGraph::Type& t (m.type ()); - if (!t.named () + if (!t.named_p () && !t.is_a () && !t.is_a ()) { -- cgit v1.1