From c04f7d6ed04d62efafa79a87bcde6c5f62e95327 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Jun 2012 11:54:24 +0200 Subject: Completion of the CLI port --- xsd/cxx/tree/serialization-source.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'xsd/cxx/tree/serialization-source.cxx') diff --git a/xsd/cxx/tree/serialization-source.cxx b/xsd/cxx/tree/serialization-source.cxx index 05588bd..411a5ef 100644 --- a/xsd/cxx/tree/serialization-source.cxx +++ b/xsd/cxx/tree/serialization-source.cxx @@ -617,8 +617,7 @@ namespace CXX { // Make sure we serialize required fixed attributes. // - if (a.optional_p () && - options.value ()) + if (a.optional_p () && options.omit_default_attributes ()) { os << "if (i." << aname << " () != " << scope << "::" << edefault_value (a) << " ())"; @@ -735,7 +734,7 @@ namespace CXX // Serialize anyAttribute content first so that is gets // overriden by schema-defined attributes. // - if (options.value ()) + if (options.generate_wildcard ()) { AnyAttribute any_attribute (*this, name); Traversal::Names names (any_attribute); @@ -752,7 +751,7 @@ namespace CXX names >> element; names >> attribute; - if (options.value ()) + if (options.generate_wildcard ()) names >> any; Complex::names (c, names); @@ -889,7 +888,7 @@ namespace CXX ElementType (Context& c) : GlobalElementBase (c), Context (c), - element_map_ (c.options.value ()) + element_map_ (c.options.generate_element_map ()) { } @@ -1246,7 +1245,7 @@ namespace CXX UnsignedLong first, UnsignedLong last) { - Boolean elemen_type (ctx.options.value ()); + Boolean elemen_type (ctx.options.generate_element_type ()); if (!elemen_type) ctx.os << "#include " << endl @@ -1260,8 +1259,8 @@ namespace CXX ctx.os << "#include " << endl << endl; - Boolean import_maps (ctx.options.value ()); - Boolean export_maps (ctx.options.value ()); + Boolean import_maps (ctx.options.import_maps ()); + Boolean export_maps (ctx.options.export_maps ()); if (import_maps || export_maps) { -- cgit v1.1