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/tree/elements.cxx | 10 +++++----- xsd/cxx/tree/elements.hxx | 4 ++-- xsd/cxx/tree/name-processor.cxx | 4 ++-- xsd/cxx/tree/serialization-source.cxx | 20 ++++++++++---------- xsd/cxx/tree/stream-extraction-source.cxx | 2 +- xsd/cxx/tree/stream-insertion-source.cxx | 2 +- xsd/cxx/tree/stream-source.cxx | 2 +- xsd/cxx/tree/tree-header.cxx | 12 ++++++------ xsd/cxx/tree/tree-inline.cxx | 6 +++--- xsd/cxx/tree/tree-source.cxx | 26 +++++++++++++------------- xsd/cxx/tree/validator.cxx | 10 +++++----- 11 files changed, 49 insertions(+), 49 deletions(-) (limited to 'xsd/cxx/tree') diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx index 76a7f9f..d5f03c0 100644 --- a/xsd/cxx/tree/elements.cxx +++ b/xsd/cxx/tree/elements.cxx @@ -661,7 +661,7 @@ namespace CXX Void GenerateDefaultCtor:: traverse (SemanticGraph::Attribute& a) { - if (min (a) == 1 && !a.fixed ()) + if (min (a) == 1 && !a.fixed_p ()) generate_ = true; } @@ -742,7 +742,7 @@ namespace CXX Void GenerateFromBaseCtor::Traverser:: traverse (SemanticGraph::Attribute& a) { - if (min (a) == 1 && !a.fixed ()) + if (min (a) == 1 && !a.fixed_p ()) generate_ = true; } @@ -880,7 +880,7 @@ namespace CXX // default or required fixed values here. Instead we are // going to default-initialize them. // - if (min (a) == 1 && !a.fixed ()) + if (min (a) == 1 && !a.fixed_p ()) { String const& name (ename (a)); @@ -1013,7 +1013,7 @@ namespace CXX // default or required fixed values here. Instead we are // going to default-initialize them. // - if (min (a) == 1 && !a.fixed ()) + if (min (a) == 1 && !a.fixed_p ()) { os << comma () << "const " << etype (a) << "&"; @@ -1102,7 +1102,7 @@ namespace CXX // default or required fixed values here. Instead we are // going to default-initialize them. // - if (min (a) == 1 && !a.fixed ()) + if (min (a) == 1 && !a.fixed_p ()) { os << comma () << "const " << etype (a) << "&"; diff --git a/xsd/cxx/tree/elements.hxx b/xsd/cxx/tree/elements.hxx index d72cfd1..afe3951 100644 --- a/xsd/cxx/tree/elements.hxx +++ b/xsd/cxx/tree/elements.hxx @@ -1037,7 +1037,7 @@ namespace CXX virtual Void traverse (SemanticGraph::Fundamental::IdRef& t) { - if (t.named ()) + if (t.named_p ()) { // IDREF // @@ -1057,7 +1057,7 @@ namespace CXX virtual Void traverse (SemanticGraph::Fundamental::IdRefs& t) { - if (t.named ()) + if (t.named_p ()) { // IDREFS // diff --git a/xsd/cxx/tree/name-processor.cxx b/xsd/cxx/tree/name-processor.cxx index a563849..4949bed 100644 --- a/xsd/cxx/tree/name-processor.cxx +++ b/xsd/cxx/tree/name-processor.cxx @@ -669,7 +669,7 @@ namespace CXX String const& s (m.context ().get ("stem")); String const& b (m.context ().get ("name")); - Boolean def_attr (m.default_ () && + Boolean def_attr (m.default_p () && m.is_a ()); // Accessors/modifiers. Note that we postpone inserting @@ -807,7 +807,7 @@ namespace CXX // Default value. // - if (m.default_ ()) + if (m.default_p ()) { Boolean simple (true); diff --git a/xsd/cxx/tree/serialization-source.cxx b/xsd/cxx/tree/serialization-source.cxx index bee3271..40ae031 100644 --- a/xsd/cxx/tree/serialization-source.cxx +++ b/xsd/cxx/tree/serialization-source.cxx @@ -291,7 +291,7 @@ namespace CXX return; String const& aname (eaname (e)); - String ns (e.qualified () ? e.namespace_ ().name () : ""); + String ns (e.qualified_p () ? e.namespace_ ().name () : ""); String type (scope + L"::" + etype (e)); // Check if we need to handle xsi:type and substitution groups. @@ -344,8 +344,8 @@ namespace CXX << "tsm.serialize (" << endl << strlit (e.name ()) << "," << endl << strlit (ns) << "," << endl - << (e.global () ? "true" : "false") << ", " << - (e.qualified () ? "true" : "false") << ", e, *b);"; + << (e.global_p () ? "true" : "false") << ", " << + (e.qualified_p () ? "true" : "false") << ", e, *b);"; } else { @@ -402,8 +402,8 @@ namespace CXX << "tsm.serialize (" << endl << strlit (e.name ()) << "," << endl << strlit (ns) << "," << endl - << (e.global () ? "true" : "false") << ", " << - (e.qualified () ? "true" : "false") << ", e, x);"; + << (e.global_p () ? "true" : "false") << ", " << + (e.qualified_p () ? "true" : "false") << ", e, x);"; } else { @@ -457,8 +457,8 @@ namespace CXX << "tsm.serialize (" << endl << strlit (e.name ()) << "," << endl << strlit (ns) << "," << endl - << (e.global () ? "true" : "false") << ", " << - (e.qualified () ? "true" : "false") << ", e, x);"; + << (e.global_p () ? "true" : "false") << ", " << + (e.qualified_p () ? "true" : "false") << ", e, x);"; } else { @@ -570,12 +570,12 @@ namespace CXX traverse (Type& a) { String const& aname (eaname (a)); - String ns (a.qualified () ? a.namespace_ ().name () : ""); + String ns (a.qualified_p () ? a.namespace_ ().name () : ""); os << "// " << comment (a.name ()) << endl << "//" << endl; - if (a.optional () && !a.default_ ()) + if (a.optional_p () && !a.default_p ()) { os << "if (i." << aname << " ())" << "{" @@ -611,7 +611,7 @@ namespace CXX { // Make sure we serialize required fixed attributes. // - if (a.optional () && + if (a.optional_p () && options.value ()) { os << "if (i." << aname << " () != " << scope << diff --git a/xsd/cxx/tree/stream-extraction-source.cxx b/xsd/cxx/tree/stream-extraction-source.cxx index 53f508e..1378bc6 100644 --- a/xsd/cxx/tree/stream-extraction-source.cxx +++ b/xsd/cxx/tree/stream-extraction-source.cxx @@ -476,7 +476,7 @@ namespace CXX traverser.dispatch (a.type ()); } - if (a.optional () && !a.default_ ()) + if (a.optional_p () && !a.default_p ()) { os << "{" << "bool p;" diff --git a/xsd/cxx/tree/stream-insertion-source.cxx b/xsd/cxx/tree/stream-insertion-source.cxx index d280e9a..09faf71 100644 --- a/xsd/cxx/tree/stream-insertion-source.cxx +++ b/xsd/cxx/tree/stream-insertion-source.cxx @@ -333,7 +333,7 @@ namespace CXX { String const& aname (eaname (a)); - if (a.optional () && !a.default_ ()) + if (a.optional_p () && !a.default_p ()) { os << "{" << "bool p (x." << aname << " ());" diff --git a/xsd/cxx/tree/stream-source.cxx b/xsd/cxx/tree/stream-source.cxx index 9b17522..e8a7fc4 100644 --- a/xsd/cxx/tree/stream-source.cxx +++ b/xsd/cxx/tree/stream-source.cxx @@ -309,7 +309,7 @@ namespace CXX { String const& aname (eaname (a)); - if (a.optional () && !a.default_ ()) + if (a.optional_p () && !a.default_p ()) { os << "if (i." << aname << " ())" << "{" diff --git a/xsd/cxx/tree/tree-header.cxx b/xsd/cxx/tree/tree-header.cxx index ed5f081..9b5acc6 100644 --- a/xsd/cxx/tree/tree-header.cxx +++ b/xsd/cxx/tree/tree-header.cxx @@ -1075,7 +1075,7 @@ namespace CXX t.dispatch (m.type ()); } - Boolean def_attr (m.default_ () && + Boolean def_attr (m.default_p () && m.is_a ()); if (max (m) != 1) @@ -1279,7 +1279,7 @@ namespace CXX // Do not generate modifiers for fixed attributes. // - if (!(def_attr && m.fixed ())) + if (!(def_attr && m.fixed_p ())) { // type& // name (); @@ -1371,7 +1371,7 @@ namespace CXX // default_value // - if (m.default_ ()) + if (m.default_p ()) { Boolean simple (true); @@ -1787,7 +1787,7 @@ namespace CXX String const& type (etype (m)); Boolean el (m.is_a ()); - Boolean def_attr (m.default_ () && !el); + Boolean def_attr (m.default_p () && !el); if (doxygen) { @@ -2159,7 +2159,7 @@ namespace CXX String const& member (emember (m)); - Boolean def_attr (m.default_ () && + Boolean def_attr (m.default_p () && m.is_a ()); if (max (m) != 1) @@ -2184,7 +2184,7 @@ namespace CXX // default_value // - if (m.default_ ()) + if (m.default_p ()) { Boolean simple (true); diff --git a/xsd/cxx/tree/tree-inline.cxx b/xsd/cxx/tree/tree-inline.cxx index 5c75ead..5bf309b 100644 --- a/xsd/cxx/tree/tree-inline.cxx +++ b/xsd/cxx/tree/tree-inline.cxx @@ -443,7 +443,7 @@ namespace CXX t.dispatch (m.type ()); } - Boolean def_attr (m.default_ () && + Boolean def_attr (m.default_p () && m.is_a ()); if (max (m) != 1) @@ -561,7 +561,7 @@ namespace CXX // Do not generate modifiers for fixed attributes. // - if (!(def_attr && m.fixed ())) + if (!(def_attr && m.fixed_p ())) { // type& // name (); @@ -611,7 +611,7 @@ namespace CXX // default_value // - if (m.default_ ()) + if (m.default_p ()) { Boolean simple (true); diff --git a/xsd/cxx/tree/tree-source.cxx b/xsd/cxx/tree/tree-source.cxx index fda9e63..4a17b00 100644 --- a/xsd/cxx/tree/tree-source.cxx +++ b/xsd/cxx/tree/tree-source.cxx @@ -557,7 +557,7 @@ namespace CXX // default_value // - if (m.default_ ()) + if (m.default_p ()) { SemanticGraph::Type& t (m.type ()); Boolean simple (true); @@ -704,12 +704,12 @@ namespace CXX << "::std::auto_ptr< ::xsd::cxx::tree::type > tmp (" << endl << "tfm.create (" << endl << strlit (e.name ()) << "," << endl - << (e.qualified () + << (e.qualified_p () ? strlit (e.namespace_ ().name ()) : L + String ("\"\"")) << "," << endl << "&::xsd::cxx::tree::factory_impl< " << type << " >," << endl - << (e.global () ? "true" : "false") << ", " << - (e.qualified () ? "true" : "false") << ", " << + << (e.global_p () ? "true" : "false") << ", " << + (e.qualified_p () ? "true" : "false") << ", " << "i, n, f, this));" << endl << "if (tmp.get () != 0)" @@ -717,7 +717,7 @@ namespace CXX } else { - if (e.qualified () && e.namespace_ ().name ()) + if (e.qualified_p () && e.namespace_ ().name ()) { os << "if (n.name () == " << strlit (e.name ()) << " && " << "n.namespace_ () == " << strlit (e.namespace_ ().name ()) << ")" @@ -878,7 +878,7 @@ namespace CXX << "throw ::xsd::cxx::tree::expected_element< " << char_type << " > (" << endl << strlit (e.name ()) << "," << endl - << (e.qualified () + << (e.qualified_p () ? strlit (e.namespace_ ().name ()) : L + String ("\"\"")) << ");" << "}"; @@ -1062,7 +1062,7 @@ namespace CXX String const& tr (etraits (a)); // traits type name - if (a.qualified () && a.namespace_ ().name ()) + if (a.qualified_p () && a.namespace_ ().name ()) { os << "if (n.name () == " << strlit (a.name ()) << " && " << "n.namespace_ () == " << strlit (a.namespace_ ().name ()) << ")" @@ -1207,12 +1207,12 @@ namespace CXX { String const& member (emember (a)); - if (!a.optional () || a.default_ ()) + if (!a.optional_p () || a.default_p ()) { os << "if (!" << member << ".present ())" << "{"; - if (a.default_ ()) + if (a.default_p ()) { os << "this->" << member << ".set (" << edefault_value (a) << " ());"; @@ -1221,7 +1221,7 @@ namespace CXX os << "throw ::xsd::cxx::tree::expected_attribute< " << char_type << " > (" << endl << strlit (a.name ()) << "," << endl - << (a.qualified () + << (a.qualified_p () ? strlit (a.namespace_ ().name ()) : L + String ("\"\"")) << ");"; @@ -1331,7 +1331,7 @@ namespace CXX // Note that we are not including attributes with default // or required fixed values here. // - if (min (a) == 1 && !a.fixed ()) + if (min (a) == 1 && !a.fixed_p ()) { // one // @@ -1408,7 +1408,7 @@ namespace CXX { String const& member (emember (a)); - Boolean def (a.default_ ()); + Boolean def (a.default_p ()); if (min (a) == 0 && !def) { @@ -1644,7 +1644,7 @@ namespace CXX { String const& member (emember (a)); - if (a.default_ ()) + if (a.default_p ()) { // This is an attribute with default or fixed value. We are // going to initialize it to its default value. diff --git a/xsd/cxx/tree/validator.cxx b/xsd/cxx/tree/validator.cxx index 32dee69..88451ba 100644 --- a/xsd/cxx/tree/validator.cxx +++ b/xsd/cxx/tree/validator.cxx @@ -67,7 +67,7 @@ namespace CXX if (n.is_a ()) return L""; // There is a bug if you see this. - if (n.named ()) + if (n.named_p ()) { SemanticGraph::Scope& scope (n.scope ()); @@ -130,7 +130,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 ()); @@ -306,7 +306,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 ()) { @@ -346,7 +346,7 @@ namespace CXX { // This is also used to traverse Complex. // - if (t.named ()) + if (t.named_p ()) { types_.insert (t.scope ().name () + L"#" + t.name ()); } @@ -437,7 +437,7 @@ namespace CXX { SemanticGraph::Type& t (m.type ()); - if (!t.named () + if (!t.named_p () && !t.is_a () && !t.is_a ()) { -- cgit v1.1