diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 10:20:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 10:20:42 +0200 |
commit | c34158508eafb020fbb7bbb7c0b2479982c426cd (patch) | |
tree | 49e7fcbde369f01ecc5524853dddbbf4a109c603 /xsde/cxx/serializer | |
parent | ef4efbab2664232aa35b0111a6d430d2c67ababd (diff) |
Completion of the CLI port
Diffstat (limited to 'xsde/cxx/serializer')
-rw-r--r-- | xsde/cxx/serializer/cli.hxx | 158 | ||||
-rw-r--r-- | xsde/cxx/serializer/driver-source.cxx | 44 | ||||
-rw-r--r-- | xsde/cxx/serializer/elements.cxx | 37 | ||||
-rw-r--r-- | xsde/cxx/serializer/elements.hxx | 19 | ||||
-rw-r--r-- | xsde/cxx/serializer/generator.cxx | 223 | ||||
-rw-r--r-- | xsde/cxx/serializer/generator.hxx | 14 | ||||
-rw-r--r-- | xsde/cxx/serializer/name-processor.cxx | 39 | ||||
-rw-r--r-- | xsde/cxx/serializer/name-processor.hxx | 4 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-header.cxx | 10 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-inline.cxx | 2 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-source.cxx | 2 | ||||
-rw-r--r-- | xsde/cxx/serializer/type-processor.cxx | 12 | ||||
-rw-r--r-- | xsde/cxx/serializer/type-processor.hxx | 4 | ||||
-rw-r--r-- | xsde/cxx/serializer/validator.cxx | 37 | ||||
-rw-r--r-- | xsde/cxx/serializer/validator.hxx | 4 |
15 files changed, 154 insertions, 455 deletions
diff --git a/xsde/cxx/serializer/cli.hxx b/xsde/cxx/serializer/cli.hxx deleted file mode 100644 index 888b273..0000000 --- a/xsde/cxx/serializer/cli.hxx +++ /dev/null @@ -1,158 +0,0 @@ -// file : xsde/cxx/serializer/cli.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef CXX_SERIALIZER_CLI_HXX -#define CXX_SERIALIZER_CLI_HXX - -#include <cult/types.hxx> - -#include <cult/containers/vector.hxx> - -#include <cult/cli/options.hxx> -#include <cult/cli/options-spec.hxx> - -namespace CXX -{ - namespace Serializer - { - namespace CLI - { - using namespace Cult::Types; - - typedef Char const Key[]; - - extern Key type_map; - extern Key char_encoding; - extern Key no_stl; - extern Key no_iostream; - extern Key no_exceptions; - extern Key no_long_long; - extern Key reuse_style_mixin; - extern Key reuse_style_none; - extern Key generate_inline; - extern Key suppress_validation; - extern Key generate_polymorphic; - extern Key runtime_polymorphic; - extern Key suppress_reset; - extern Key custom_allocator; - extern Key generate_empty_impl; - extern Key generate_test_driver; - extern Key force_overwrite; - extern Key root_element_first; - extern Key root_element_last; - extern Key root_element; - extern Key generate_xml_schema; - extern Key extern_xml_schema; - extern Key output_dir; - extern Key skel_type_suffix; - extern Key skel_file_suffix; - extern Key impl_type_suffix; - extern Key impl_file_suffix; - extern Key namespace_map; - extern Key namespace_regex; - extern Key namespace_regex_trace; - extern Key reserved_name; - extern Key include_with_brackets; - extern Key include_prefix; - extern Key include_regex; - extern Key include_regex_trace; - extern Key guard_prefix; - extern Key hxx_suffix; - extern Key ixx_suffix; - extern Key cxx_suffix; - extern Key hxx_regex; - extern Key ixx_regex; - extern Key cxx_regex; - extern Key hxx_prologue; - extern Key ixx_prologue; - extern Key cxx_prologue; - extern Key prologue; - extern Key hxx_epilogue; - extern Key ixx_epilogue; - extern Key cxx_epilogue; - extern Key epilogue; - extern Key hxx_prologue_file; - extern Key ixx_prologue_file; - extern Key cxx_prologue_file; - extern Key prologue_file; - extern Key hxx_epilogue_file; - extern Key ixx_epilogue_file; - extern Key cxx_epilogue_file; - extern Key epilogue_file; - extern Key show_anonymous; - extern Key show_sloc; - extern Key proprietary_license; - - typedef Cult::CLI::Options< - type_map, Cult::Containers::Vector<NarrowString>, - char_encoding, NarrowString, - no_stl, Boolean, - no_iostream, Boolean, - no_exceptions, Boolean, - no_long_long, Boolean, - reuse_style_mixin, Boolean, - reuse_style_none, Boolean, - generate_inline, Boolean, - suppress_validation, Boolean, - generate_polymorphic, Boolean, - runtime_polymorphic, Boolean, - suppress_reset, Boolean, - custom_allocator, Boolean, - generate_empty_impl, Boolean, - generate_test_driver, Boolean, - force_overwrite, Boolean, - root_element_first, Boolean, - root_element_last, Boolean, - root_element, NarrowString, - generate_xml_schema, Boolean, - extern_xml_schema, NarrowString, - output_dir, NarrowString, - skel_type_suffix, NarrowString, - skel_file_suffix, NarrowString, - impl_type_suffix, NarrowString, - impl_file_suffix, NarrowString, - namespace_map, Cult::Containers::Vector<NarrowString>, - namespace_regex, Cult::Containers::Vector<NarrowString>, - namespace_regex_trace, Boolean, - reserved_name, Cult::Containers::Vector<NarrowString>, - include_with_brackets, Boolean, - include_prefix, NarrowString, - include_regex, Cult::Containers::Vector<NarrowString>, - include_regex_trace, Boolean, - guard_prefix, NarrowString, - hxx_suffix, NarrowString, - ixx_suffix, NarrowString, - cxx_suffix, NarrowString, - hxx_regex, NarrowString, - ixx_regex, NarrowString, - cxx_regex, NarrowString, - hxx_prologue, Cult::Containers::Vector<NarrowString>, - ixx_prologue, Cult::Containers::Vector<NarrowString>, - cxx_prologue, Cult::Containers::Vector<NarrowString>, - prologue, Cult::Containers::Vector<NarrowString>, - hxx_epilogue, Cult::Containers::Vector<NarrowString>, - ixx_epilogue, Cult::Containers::Vector<NarrowString>, - cxx_epilogue, Cult::Containers::Vector<NarrowString>, - epilogue, Cult::Containers::Vector<NarrowString>, - hxx_prologue_file, NarrowString, - ixx_prologue_file, NarrowString, - cxx_prologue_file, NarrowString, - prologue_file, NarrowString, - hxx_epilogue_file, NarrowString, - ixx_epilogue_file, NarrowString, - cxx_epilogue_file, NarrowString, - epilogue_file, NarrowString, - show_anonymous, Boolean, - show_sloc, Boolean, - proprietary_license, Boolean - - > Options; - - struct OptionsSpec: Cult::CLI::OptionsSpec<Options> {}; - } - } -} - -#endif // CXX_SERIALIZER_CLI_HXX diff --git a/xsde/cxx/serializer/driver-source.cxx b/xsde/cxx/serializer/driver-source.cxx index 9a46364..3ec2207 100644 --- a/xsde/cxx/serializer/driver-source.cxx +++ b/xsde/cxx/serializer/driver-source.cxx @@ -764,12 +764,12 @@ namespace CXX virtual Void traverse (Type& e) { - if (options.value<CLI::root_element_first> ()) + if (options.root_element_first ()) { if (element_ == 0) element_ = &e; } - else if (String name = options.value<CLI::root_element> ()) + else if (String name = options.root_element ()) { if (e.name () == name) element_ = &e; @@ -815,16 +815,16 @@ namespace CXX set.insert ("doc_s"); - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "#include <stdio.h>" << endl << endl; else os << "#include <iostream>" << endl << endl; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) { - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) { os << "struct writer: " << xs << "::writer" << "{" @@ -868,7 +868,7 @@ namespace CXX << "main ()" << "{"; - if (!ctx.options.value<CLI::no_exceptions> ()) + if (!ctx.options.no_exceptions ()) os << "try" << "{"; @@ -897,10 +897,10 @@ namespace CXX os << "// Serialize the XML document." << endl << "//" << endl; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "writer w;"; - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) os << xs << "::serializer_error e;" << endl << "do" @@ -917,7 +917,7 @@ namespace CXX ctx.strlit (root->name ()) << ");" << endl; - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) os << "e = doc_s._error ();" << "if (e)" << endl << "break;" @@ -931,20 +931,20 @@ namespace CXX os << root_s << ".pre ();" << endl; - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) os << "e = " << root_s << "._error ();" << "if (e)" << endl << "break;" << endl; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "doc_s.serialize (w);" << endl; else os << "doc_s.serialize (std::cout);" << endl; - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) os << "e = doc_s._error ();" << "if (e)" << endl << "break;" @@ -952,11 +952,11 @@ namespace CXX os << root_s << ".post ();"; - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) os << endl << "e = " << root_s << "._error ();"; - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) os << "}" << "while (false);" << endl; @@ -964,7 +964,7 @@ namespace CXX // Error handling. // - if (ctx.options.value<CLI::no_exceptions> ()) + if (ctx.options.no_exceptions ()) { os << "// Handle errors." << endl << "//" << endl @@ -975,7 +975,7 @@ namespace CXX << "case " << xs << "::serializer_error::sys:" << "{"; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "fprintf (stderr, \"%s\\n\", e.sys_text ());"; else os << "std::cerr << e.sys_text () << std::endl;"; @@ -985,7 +985,7 @@ namespace CXX << "case " << xs << "::serializer_error::xml:" << "{"; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "fprintf (stderr, \"%s\\n\", e.xml_text ());"; else os << "std::cerr << e.xml_text () << std::endl;"; @@ -993,12 +993,12 @@ namespace CXX os << "break;" << "}"; - if (!ctx.options.value<CLI::suppress_validation> ()) + if (!ctx.options.suppress_validation ()) { os << "case " << xs << "::serializer_error::schema:" << "{"; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "fprintf (stderr, \"%s\\n\", e.schema_text ());"; else os << "std::cerr << e.schema_text () << std::endl;"; @@ -1010,7 +1010,7 @@ namespace CXX os << "case " << xs << "::serializer_error::app:" << "{"; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "fprintf (stderr, \"application error %d\\n\", e.app_code ());"; else os << "std::cerr << \"application error \" << e.app_code () " << @@ -1032,7 +1032,7 @@ namespace CXX << "catch (const " << xs << "::serializer_exception& e)" << "{"; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "fprintf (stderr, \"error: %s\\n\", e.text ());"; else os << "std::cerr << \"error: \" << e.text () << std::endl;"; @@ -1040,7 +1040,7 @@ namespace CXX os << "return 1;" << "}"; - if (ctx.options.value<CLI::no_iostream> ()) + if (ctx.options.no_iostream ()) os << "catch (const io_failure&)" << "{" << "fprintf (stderr, \"error: write failure\\n\");" diff --git a/xsde/cxx/serializer/elements.cxx b/xsde/cxx/serializer/elements.cxx index 7802e5d..7cbdbcf 100644 --- a/xsde/cxx/serializer/elements.cxx +++ b/xsde/cxx/serializer/elements.cxx @@ -13,42 +13,25 @@ namespace CXX Context (std::wostream& o, SemanticGraph::Schema& root, SemanticGraph::Path const& path, - CLI::Options const& ops, + options_type const& ops, Regex const* he, Regex const* ie, Regex const* hie) - : CXX::Context (o, - root, - path, - "s:name", - "char", - ops.value<CLI::char_encoding> (), - ops.value<CLI::include_with_brackets> (), - ops.value<CLI::include_prefix> (), - "", // export symbol - ops.value<CLI::namespace_map> (), - ops.value<CLI::namespace_regex> (), - ops.value<CLI::namespace_regex_trace> (), - ops.value<CLI::include_regex> (), - ops.value<CLI::include_regex_trace> (), - ops.value<CLI::generate_inline> (), - ops.value<CLI::custom_allocator> (), - !ops.value<CLI::no_long_long> (), - ops.value<CLI::reserved_name> ()), + : CXX::Context (o, root, path, ops, "s:name", "char"), options (ops), xml_serializer (xml_serializer_), serializer_base (serializer_base_), simple_base (simple_base_), complex_base (complex_base_), serializer_map (serializer_map_), - validation (!ops.value<CLI::suppress_validation> ()), - exceptions (!ops.value<CLI::no_exceptions> ()), - stl (!ops.value<CLI::no_stl> ()), - poly_code (ops.value<CLI::generate_polymorphic> ()), - poly_runtime (poly_code || ops.value<CLI::runtime_polymorphic> ()), - reset (!ops.value<CLI::suppress_reset> ()), - mixin (ops.value<CLI::reuse_style_mixin> ()), - tiein (!mixin && !ops.value<CLI::reuse_style_none> ()), + validation (!ops.suppress_validation ()), + exceptions (!ops.no_exceptions ()), + stl (!ops.no_stl ()), + poly_code (ops.generate_polymorphic ()), + poly_runtime (poly_code || ops.runtime_polymorphic ()), + reset (!ops.suppress_reset ()), + mixin (ops.reuse_style_mixin ()), + tiein (!mixin && !ops.reuse_style_none ()), hxx_expr (he), ixx_expr (ie), hxx_impl_expr (hie), diff --git a/xsde/cxx/serializer/elements.hxx b/xsde/cxx/serializer/elements.hxx index ada9371..694abd8 100644 --- a/xsde/cxx/serializer/elements.hxx +++ b/xsde/cxx/serializer/elements.hxx @@ -12,7 +12,7 @@ #include <cxx/elements.hxx> -#include <cxx/serializer/cli.hxx> +#include <cxx/serializer/options.hxx> namespace CXX { @@ -35,11 +35,13 @@ namespace CXX public: typedef cutl::re::regexsub Regex; + typedef Serializer::options options_type; + public: Context (std::wostream&, SemanticGraph::Schema&, SemanticGraph::Path const&, - CLI::Options const&, + options_type const&, Regex const* hxx_expr, Regex const* ixx_expr, Regex const* hxx_impl_expr); @@ -179,7 +181,7 @@ namespace CXX has_facets (SemanticGraph::Complex& c); public: - CLI::Options const& options; + options_type const& options; String& xml_serializer; String& serializer_base; String& simple_base; @@ -608,21 +610,20 @@ namespace CXX // struct RootElement: Traversal::Element { - RootElement (CLI::Options const& options, - SemanticGraph::Element*& element) - : options_ (options), element_ (element) + RootElement (options const& o, SemanticGraph::Element*& e) + : options_ (o), element_ (e) { } virtual Void traverse (Type& e) { - if (options_.value<CLI::root_element_first> ()) + if (options_.root_element_first ()) { if (element_ == 0) element_ = &e; } - else if (String name = options_.value<CLI::root_element> ()) + else if (String name = options_.root_element ()) { if (e.name () == name) element_ = &e; @@ -632,7 +633,7 @@ namespace CXX } private: - CLI::Options const& options_; + options const& options_; SemanticGraph::Element*& element_; }; } diff --git a/xsde/cxx/serializer/generator.cxx b/xsde/cxx/serializer/generator.cxx index 98e1cae..479293c 100644 --- a/xsde/cxx/serializer/generator.cxx +++ b/xsde/cxx/serializer/generator.cxx @@ -108,74 +108,6 @@ namespace CXX "//\n\n"; } - namespace Serializer - { - namespace CLI - { - extern Key type_map = "type-map"; - extern Key char_encoding = "char-encoding"; - extern Key no_stl = "no-stl"; - extern Key no_iostream = "no-iostream"; - extern Key no_exceptions = "no-exceptions"; - extern Key no_long_long = "no-long-long"; - extern Key reuse_style_mixin = "reuse-style-mixin"; - extern Key reuse_style_none = "reuse-style-none"; - extern Key generate_inline = "generate-inline"; - extern Key suppress_validation = "suppress-validation"; - extern Key generate_polymorphic = "generate-polymorphic"; - extern Key runtime_polymorphic = "runtime-polymorphic"; - extern Key suppress_reset = "suppress-reset"; - extern Key custom_allocator = "custom-allocator"; - extern Key generate_empty_impl = "generate-empty-impl"; - extern Key generate_test_driver = "generate-test-driver"; - extern Key force_overwrite = "force-overwrite"; - extern Key root_element_first = "root-element-first"; - extern Key root_element_last = "root-element-last"; - extern Key root_element = "root-element"; - extern Key generate_xml_schema = "generate-xml-schema"; - extern Key extern_xml_schema = "extern-xml-schema"; - extern Key output_dir = "output-dir"; - extern Key skel_type_suffix = "skel-type-suffix"; - extern Key skel_file_suffix = "skel-file-suffix"; - extern Key impl_type_suffix = "impl-type-suffix"; - extern Key impl_file_suffix = "impl-file-suffix"; - extern Key namespace_map = "namespace-map"; - extern Key namespace_regex = "namespace-regex"; - extern Key namespace_regex_trace = "namespace-regex-trace"; - extern Key reserved_name = "reserved-name"; - extern Key include_with_brackets = "include-with-brackets"; - extern Key include_prefix = "include-prefix"; - extern Key include_regex = "include-regex"; - extern Key include_regex_trace = "include-regex-trace"; - extern Key guard_prefix = "guard-prefix"; - extern Key hxx_suffix = "hxx-suffix"; - extern Key ixx_suffix = "ixx-suffix"; - extern Key cxx_suffix = "cxx-suffix"; - extern Key hxx_regex = "hxx-regex"; - extern Key ixx_regex = "ixx-regex"; - extern Key cxx_regex = "cxx-regex"; - extern Key hxx_prologue = "hxx-prologue"; - extern Key ixx_prologue = "ixx-prologue"; - extern Key cxx_prologue = "cxx-prologue"; - extern Key prologue = "prologue"; - extern Key hxx_epilogue = "hxx-epilogue"; - extern Key ixx_epilogue = "ixx-epilogue"; - extern Key cxx_epilogue = "cxx-epilogue"; - extern Key epilogue = "epilogue"; - extern Key hxx_prologue_file = "hxx-prologue-file"; - extern Key ixx_prologue_file = "ixx-prologue-file"; - extern Key cxx_prologue_file = "cxx-prologue-file"; - extern Key prologue_file = "prologue-file"; - extern Key hxx_epilogue_file = "hxx-epilogue-file"; - extern Key ixx_epilogue_file = "ixx-epilogue-file"; - extern Key cxx_epilogue_file = "cxx-epilogue-file"; - extern Key epilogue_file = "epilogue-file"; - extern Key show_anonymous = "show-anonymous"; - extern Key show_sloc = "show-sloc"; - extern Key proprietary_license = "proprietary-license"; - } - } - Void Serializer::Generator:: usage () { @@ -183,27 +115,8 @@ namespace CXX CXX::options::print_usage (wcout); } - Serializer::CLI::OptionsSpec Serializer::Generator:: - options_spec () - { - CLI::OptionsSpec spec; - - spec.option<CLI::char_encoding> ().default_value ("utf8"); - - spec.option<CLI::skel_file_suffix> ().default_value ("-sskel"); - spec.option<CLI::skel_type_suffix> ().default_value ("_sskel"); - spec.option<CLI::impl_file_suffix> ().default_value ("-simpl"); - spec.option<CLI::impl_type_suffix> ().default_value ("_simpl"); - - spec.option<CLI::hxx_suffix> ().default_value (".hxx"); - spec.option<CLI::ixx_suffix> ().default_value (".ixx"); - spec.option<CLI::cxx_suffix> ().default_value (".cxx"); - - return spec; - } - Void Serializer::Generator:: - process_names (CLI::Options const& ops, + process_names (options const& ops, XSDFrontend::SemanticGraph::Schema& schema, XSDFrontend::SemanticGraph::Path const& file) { @@ -261,14 +174,13 @@ namespace CXX Void append (WideOutputFileStream& os, - Cult::Containers::Vector<NarrowString> const& primary, - Cult::Containers::Vector<NarrowString> const& def) + NarrowStrings const& primary, + NarrowStrings const& def) { - Cult::Containers::Vector<NarrowString> const& v ( - primary.empty () ? def : primary); + NarrowStrings const& v (primary.empty () ? def : primary); - for (Containers::Vector<NarrowString>::ConstIterator - i (v.begin ()), e (v.end ()); i != e; ++i) + for (NarrowStrings::const_iterator i (v.begin ()), e (v.end ()); + i != e; ++i) { os << i->c_str () << endl; } @@ -277,7 +189,7 @@ namespace CXX UnsignedLong Serializer::Generator:: - generate (Serializer::CLI::Options const& ops, + generate (Serializer::options const& ops, Schema& schema, Path const& file_path, Boolean fpt, @@ -293,7 +205,7 @@ namespace CXX try { - Boolean generate_xml_schema (ops.value<CLI::generate_xml_schema> ()); + Boolean generate_xml_schema (ops.generate_xml_schema ()); // We could be compiling several schemas at once in which case // handling of the --generate-xml-schema option gets tricky: we @@ -302,18 +214,16 @@ namespace CXX // if (generate_xml_schema) { - if (NarrowString name = ops.value<CLI::extern_xml_schema> ()) + if (NarrowString name = ops.extern_xml_schema ()) { if (file_path.native_file_string () != name) generate_xml_schema = false; } } - Boolean impl (!generate_xml_schema && - ops.value<CLI::generate_empty_impl> ()); - + Boolean impl (!generate_xml_schema && ops.generate_empty_impl ()); Boolean driver (gen_driver && !generate_xml_schema && - ops.value<CLI::generate_test_driver> ()); + ops.generate_test_driver ()); // Evaluate the graph for possibility of generating something useful. // @@ -333,17 +243,17 @@ namespace CXX // // - Boolean validation (!ops.value<CLI::suppress_validation> ()); + Boolean validation (!ops.suppress_validation ()); // Read-in type maps. // { using namespace TypeMap; - typedef Containers::Vector<NarrowString> Files; - Files const& files (ops.value<CLI::type_map> ()); + NarrowStrings const& files (ops.type_map ()); - for (Files::ConstIterator f (files.begin ()); f != files.end (); ++f ) + for (NarrowStrings::const_iterator f (files.begin ()); + f != files.end (); ++f ) { NarrowInputFileStream ifs; open (ifs, *f); @@ -363,7 +273,7 @@ namespace CXX xns = ctx.xs_ns_name (); } - if (ops.value<CLI::no_stl> ()) + if (ops.no_stl ()) { TypeMap::Namespace xsd_std ("http://www\\.w3\\.org/2001/XMLSchema"); @@ -433,7 +343,7 @@ namespace CXX xsd.types_push_back ("int", "int", "int"); xsd.types_push_back ("unsignedInt", "unsigned int", "unsigned int"); - if (ops.value<CLI::no_long_long> ()) + if (ops.no_long_long ()) { xsd.types_push_back ("long", "long", "long"); xsd.types_push_back ("unsignedLong", "unsigned long", "unsigned long"); @@ -487,34 +397,32 @@ namespace CXX // Generate code. // - Boolean inline_ (ops.value<CLI::generate_inline> () && - !generate_xml_schema); - + Boolean inline_ (ops.generate_inline () && !generate_xml_schema); Boolean source (!generate_xml_schema); NarrowString name (file_path.leaf ()); - NarrowString skel_suffix (ops.value <CLI::skel_file_suffix> ()); - NarrowString impl_suffix (ops.value <CLI::impl_file_suffix> ()); + NarrowString skel_suffix (ops.skel_file_suffix ()); + NarrowString impl_suffix (ops.impl_file_suffix ()); - NarrowString hxx_suffix (ops.value <CLI::hxx_suffix> ()); - NarrowString ixx_suffix (ops.value <CLI::ixx_suffix> ()); - NarrowString cxx_suffix (ops.value <CLI::cxx_suffix> ()); + NarrowString hxx_suffix (ops.hxx_suffix ()); + NarrowString ixx_suffix (ops.ixx_suffix ()); + NarrowString cxx_suffix (ops.cxx_suffix ()); Regex hxx_expr ( - ops.value <CLI::hxx_regex> ().empty () + ops.hxx_regex ().empty () ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + hxx_suffix + "#" - : ops.value <CLI::hxx_regex> ()); + : ops.hxx_regex ()); Regex ixx_expr ( - ops.value <CLI::ixx_regex> ().empty () + ops.ixx_regex ().empty () ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + ixx_suffix + "#" - : ops.value <CLI::ixx_regex> ()); + : ops.ixx_regex ()); Regex cxx_expr ( - ops.value <CLI::cxx_regex> ().empty () + ops.cxx_regex ().empty () ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + cxx_suffix + "#" - : ops.value <CLI::cxx_regex> ()); + : ops.cxx_regex ()); Regex hxx_impl_expr; Regex cxx_impl_expr; @@ -615,7 +523,7 @@ namespace CXX Path out_dir; - if (NarrowString dir = ops.value<CLI::output_dir> ()) + if (NarrowString dir = ops.output_dir ()) { try { @@ -663,7 +571,7 @@ namespace CXX if (impl) { - if (!ops.value<CLI::force_overwrite> ()) + if (!ops.force_overwrite ()) { WideInputFileStream tmp (hxx_impl_path, ios_base::in); @@ -689,7 +597,7 @@ namespace CXX unlinks.add (hxx_impl_path); file_list.push_back (hxx_impl_path.native_file_string ()); - if (!ops.value<CLI::force_overwrite> ()) + if (!ops.force_overwrite ()) { WideInputFileStream tmp (cxx_impl_path, ios_base::in); @@ -718,7 +626,7 @@ namespace CXX if (driver) { - if (!ops.value<CLI::force_overwrite> ()) + if (!ops.force_overwrite ()) { WideInputFileStream tmp (cxx_driver_path, ios_base::in); @@ -791,9 +699,7 @@ namespace CXX // Print copyright and license. // Char const* copyright ( - ops.value<CLI::proprietary_license> () - ? copyright_proprietary - : copyright_gpl); + ops.proprietary_license () ? copyright_proprietary : copyright_gpl); hxx << copyright; @@ -816,7 +722,7 @@ namespace CXX // WideInputFileStream prologue; { - NarrowString name (ops.value<CLI::prologue_file> ()); + NarrowString name (ops.prologue_file ()); if (name) open (prologue, name); @@ -826,7 +732,7 @@ namespace CXX // WideInputFileStream epilogue; { - NarrowString name (ops.value<CLI::epilogue_file> ()); + NarrowString name (ops.epilogue_file ()); if (name) open (epilogue, name); @@ -834,8 +740,8 @@ namespace CXX // SLOC counter. // - UnsignedLong sloc_total (0); - Boolean show_sloc (ops.value<CLI::show_sloc> ()); + size_t sloc_total (0); + Boolean show_sloc (ops.show_sloc ()); typedef compiler::ostream_filter<compiler::cxx_indenter, wchar_t> @@ -849,7 +755,7 @@ namespace CXX // Regex guard_expr ("/([a-z])([A-Z])/$1_$2/"); // Split words. - NarrowString guard_prefix (ops.value<CLI::guard_prefix> ()); + NarrowString guard_prefix (ops.guard_prefix ()); if (!guard_prefix) guard_prefix = file_path.branch_path ().native_directory_string (); @@ -889,7 +795,7 @@ namespace CXX hxx << "#include <xsde/cxx/config.hxx>" << endl << endl; - if (ops.value<CLI::char_encoding> () == "iso8859-1") + if (ops.char_encoding () == "iso8859-1") { hxx << "#ifndef XSDE_ENCODING_ISO8859_1" << endl << "#error the generated code uses the ISO-8859-1 encoding" << @@ -908,7 +814,7 @@ namespace CXX << endl; } - if (ops.value<CLI::no_stl> ()) + if (ops.no_stl ()) { hxx << "#ifdef XSDE_STL" << endl << "#error the XSD/e runtime uses STL while the " << @@ -927,7 +833,7 @@ namespace CXX << endl; } - if (ops.value<CLI::no_iostream> ()) + if (ops.no_iostream ()) { hxx << "#ifdef XSDE_IOSTREAM" << endl << "#error the XSD/e runtime uses iostream while the " << @@ -946,7 +852,7 @@ namespace CXX << endl; } - if (ops.value<CLI::no_exceptions> ()) + if (ops.no_exceptions ()) { hxx << "#ifdef XSDE_EXCEPTIONS" << endl << "#error the XSD/e runtime uses exceptions while the " << @@ -965,7 +871,7 @@ namespace CXX << endl; } - if (ops.value<CLI::no_long_long> ()) + if (ops.no_long_long ()) { hxx << "#ifdef XSDE_LONGLONG" << endl << "#error the XSD/e runtime uses long long while the " << @@ -984,7 +890,7 @@ namespace CXX << endl; } - if (ops.value<CLI::suppress_validation> ()) + if (ops.suppress_validation ()) { hxx << "#ifdef XSDE_SERIALIZER_VALIDATION" << endl << "#error the XSD/e runtime uses validation while the " << @@ -1003,8 +909,7 @@ namespace CXX << endl; } - if (ops.value<CLI::generate_polymorphic> () || - ops.value<CLI::runtime_polymorphic> ()) + if (ops.generate_polymorphic () || ops.runtime_polymorphic ()) { hxx << "#ifndef XSDE_POLYMORPHIC" << endl << "#error the generated code expects XSD/e runtime with " << @@ -1023,7 +928,7 @@ namespace CXX << endl; } - if (ops.value<CLI::reuse_style_mixin> ()) + if (ops.reuse_style_mixin ()) { hxx << "#ifndef XSDE_REUSE_STYLE_MIXIN" << endl << "#error the generated code uses the mixin reuse style " << @@ -1032,7 +937,7 @@ namespace CXX << "#endif" << endl << endl; } - else if (ops.value<CLI::reuse_style_none> ()) + else if (ops.reuse_style_none ()) { hxx << "#ifndef XSDE_REUSE_STYLE_NONE" << endl << "#error the generated code does not provide support " << @@ -1051,7 +956,7 @@ namespace CXX << endl; } - if (ops.value<CLI::custom_allocator> ()) + if (ops.custom_allocator ()) { hxx << "#ifndef XSDE_CUSTOM_ALLOCATOR" << endl << "#error the generated code uses custom allocator while " << @@ -1081,9 +986,8 @@ namespace CXX hxx << "// Begin prologue." << endl << "//" << endl; - append ( - hxx, ops.value<CLI::hxx_prologue> (), ops.value<CLI::prologue> ()); - append (hxx, ops.value<CLI::hxx_prologue_file> (), prologue); + append (hxx, ops.hxx_prologue (), ops.prologue ()); + append (hxx, ops.hxx_prologue_file (), prologue); hxx << "//" << endl << "// End prologue." << endl @@ -1109,9 +1013,8 @@ namespace CXX hxx << "// Begin epilogue." << endl << "//" << endl; - append (hxx, ops.value<CLI::hxx_epilogue_file> (), epilogue); - append ( - hxx, ops.value<CLI::hxx_epilogue> (), ops.value<CLI::epilogue> ()); + append (hxx, ops.hxx_epilogue_file (), epilogue); + append (hxx, ops.hxx_epilogue (), ops.epilogue ()); hxx << "//" << endl << "// End epilogue." << endl @@ -1143,9 +1046,8 @@ namespace CXX ixx << "// Begin prologue." << endl << "//" << endl; - append ( - ixx, ops.value<CLI::ixx_prologue> (), ops.value<CLI::prologue> ()); - append (ixx, ops.value<CLI::ixx_prologue_file> (), prologue); + append (ixx, ops.ixx_prologue (), ops.prologue ()); + append (ixx, ops.ixx_prologue_file (), prologue); ixx << "//" << endl << "// End prologue." << endl @@ -1163,9 +1065,8 @@ namespace CXX ixx << "// Begin epilogue." << endl << "//" << endl; - append (ixx, ops.value<CLI::ixx_epilogue_file> (), epilogue); - append ( - ixx, ops.value<CLI::ixx_epilogue> (), ops.value<CLI::epilogue> ()); + append (ixx, ops.ixx_epilogue_file (), epilogue); + append (ixx, ops.ixx_epilogue (), ops.epilogue ()); ixx << "//" << endl << "// End epilogue." << endl @@ -1192,9 +1093,8 @@ namespace CXX cxx << "// Begin prologue." << endl << "//" << endl; - append ( - cxx, ops.value<CLI::cxx_prologue> (), ops.value<CLI::prologue> ()); - append (cxx, ops.value<CLI::cxx_prologue_file> (), prologue); + append (cxx, ops.cxx_prologue (), ops.prologue ()); + append (cxx, ops.cxx_prologue_file (), prologue); cxx << "//" << endl << "// End prologue." << endl @@ -1225,9 +1125,8 @@ namespace CXX cxx << "// Begin epilogue." << endl << "//" << endl; - append (cxx, ops.value<CLI::cxx_epilogue_file> (), epilogue); - append ( - cxx, ops.value<CLI::cxx_epilogue> (), ops.value<CLI::epilogue> ()); + append (cxx, ops.cxx_epilogue_file (), epilogue); + append (cxx, ops.cxx_epilogue (), ops.epilogue ()); cxx << "//" << endl << "// End epilogue." << endl diff --git a/xsde/cxx/serializer/generator.hxx b/xsde/cxx/serializer/generator.hxx index 353fef0..e9601be 100644 --- a/xsde/cxx/serializer/generator.hxx +++ b/xsde/cxx/serializer/generator.hxx @@ -10,15 +10,14 @@ #include <cult/containers/vector.hxx> -#include <cult/cli/options.hxx> -#include <cult/cli/options-spec.hxx> - #include <xsd-frontend/semantic-graph/elements.hxx> // Path #include <xsd-frontend/semantic-graph/schema.hxx> #include <xsde.hxx> + #include <type-map/type-map.hxx> -#include <cxx/serializer/cli.hxx> + +#include <cxx/serializer/options.hxx> namespace CXX { @@ -32,13 +31,10 @@ namespace CXX static Void usage (); - static CLI::OptionsSpec - options_spec (); - // Assign names to global declarations. // static Void - process_names (CLI::Options const&, + process_names (options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&); @@ -47,7 +43,7 @@ namespace CXX struct Failed {}; static UnsignedLong - generate (CLI::Options const&, + generate (options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&, Boolean file_per_type, diff --git a/xsde/cxx/serializer/name-processor.cxx b/xsde/cxx/serializer/name-processor.cxx index cfe7a16..6d60c37 100644 --- a/xsde/cxx/serializer/name-processor.cxx +++ b/xsde/cxx/serializer/name-processor.cxx @@ -27,38 +27,19 @@ namespace CXX class Context: public CXX::Context { public: - Context (CLI::Options const& ops, + Context (Serializer::options const& ops, SemanticGraph::Schema& root, SemanticGraph::Path const& path) - : CXX::Context (std::wcerr, - root, - path, - "s:name", - "char", - ops.value<CLI::char_encoding> (), - ops.value<CLI::include_with_brackets> (), - ops.value<CLI::include_prefix> (), - "", // export symbol - ops.value<CLI::namespace_map> (), - ops.value<CLI::namespace_regex> (), - ops.value<CLI::namespace_regex_trace> (), - ops.value<CLI::include_regex> (), - ops.value<CLI::include_regex_trace> (), - ops.value<CLI::generate_inline> (), - ops.value<CLI::custom_allocator> (), - !ops.value<CLI::no_long_long> (), - ops.value<CLI::reserved_name> ()), - skel_suffix_ (ops.value<CLI::skel_type_suffix> ()), - impl_suffix_ (ops.value<CLI::impl_type_suffix> ()), - impl (ops.value<CLI::generate_empty_impl> () || - ops.value<CLI::generate_test_driver> ()), - tiein (!ops.value<CLI::reuse_style_mixin> () && - !ops.value<CLI::reuse_style_none> ()), + : CXX::Context (std::wcerr, root, path, ops, "s:name", "char"), + skel_suffix_ (ops.skel_type_suffix ()), + impl_suffix_ (ops.impl_type_suffix ()), + impl (ops.generate_empty_impl () || ops.generate_test_driver ()), + tiein (!ops.reuse_style_mixin () && !ops.reuse_style_none ()), skel_suffix (skel_suffix_), impl_suffix (impl_suffix_), global_type_names (global_type_names_), - validation (!ops.value<CLI::suppress_validation> ()), - polymorphic (ops.value<CLI::generate_polymorphic> ()) + validation (!ops.suppress_validation ()), + polymorphic (ops.generate_polymorphic ()) { } @@ -1301,7 +1282,7 @@ namespace CXX }; Void - process_impl (CLI::Options const& ops, + process_impl (options const& ops, SemanticGraph::Schema& tu, SemanticGraph::Path const& file, Boolean deep) @@ -1399,7 +1380,7 @@ namespace CXX } Void NameProcessor:: - process (CLI::Options const& ops, + process (options const& ops, SemanticGraph::Schema& tu, SemanticGraph::Path const& file, Boolean deep) diff --git a/xsde/cxx/serializer/name-processor.hxx b/xsde/cxx/serializer/name-processor.hxx index 26a9dd2..b170705 100644 --- a/xsde/cxx/serializer/name-processor.hxx +++ b/xsde/cxx/serializer/name-processor.hxx @@ -10,7 +10,7 @@ #include <xsd-frontend/semantic-graph.hxx> -#include <cxx/serializer/cli.hxx> +#include <cxx/serializer/options.hxx> namespace CXX { @@ -22,7 +22,7 @@ namespace CXX { public: Void - process (CLI::Options const&, + process (options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&, Boolean deep); diff --git a/xsde/cxx/serializer/serializer-header.cxx b/xsde/cxx/serializer/serializer-header.cxx index 939a052..930ce72 100644 --- a/xsde/cxx/serializer/serializer-header.cxx +++ b/xsde/cxx/serializer/serializer-header.cxx @@ -1380,7 +1380,7 @@ namespace CXX impl_ns_ = "::xsde::cxx::serializer::"; impl_ns_ += (validation ? L"validating" : L"non_validating"); - if (options.value<CLI::no_stl> ()) + if (options.no_stl ()) { qname_type_ = L"const " + xs_ns_ + L"::qname*"; string_type_ = L"const char*"; @@ -1394,7 +1394,7 @@ namespace CXX string_seq_type_ = L"const " + xs_ns_ + L"::string_sequence*"; buffer_type_ = L"const " + xs_ns_ + L"::buffer*"; - if (options.value<CLI::no_long_long> ()) + if (options.no_long_long ()) { long_type_ = L"long"; unsigned_long_type_ = L"unsigned long"; @@ -1722,12 +1722,12 @@ namespace CXX String const& real_impl (c.get<String> ("s:real-impl")); String const& impl (c.get<String> ("s:impl")); - if (options.value<CLI::skel_type_suffix> () == "_sskel") + if (options.skel_type_suffix () == "_sskel") os << "using " << real_name << ";"; else os << "typedef " << real_name << " " << name << ";"; - if (options.value<CLI::impl_type_suffix> () == "_simpl") + if (options.impl_type_suffix () == "_simpl") os << "using " << real_impl << ";"; else os << "typedef " << real_impl << " " << impl << ";"; @@ -1902,7 +1902,7 @@ namespace CXX NarrowString extern_xml_schema; if (!generate_xml_schema) - extern_xml_schema = ctx.options.value<CLI::extern_xml_schema> (); + extern_xml_schema = ctx.options.extern_xml_schema (); if (extern_xml_schema) { diff --git a/xsde/cxx/serializer/serializer-inline.cxx b/xsde/cxx/serializer/serializer-inline.cxx index ed3ec93..9ef7fc0 100644 --- a/xsde/cxx/serializer/serializer-inline.cxx +++ b/xsde/cxx/serializer/serializer-inline.cxx @@ -800,7 +800,7 @@ namespace CXX // Emit "weak" header includes that are used in the file-per-type // compilation model. // - if (!ctx.options.value<CLI::generate_inline> ()) + if (!ctx.options.generate_inline ()) { Traversal::Schema schema; Includes includes (ctx, Includes::source); diff --git a/xsde/cxx/serializer/serializer-source.cxx b/xsde/cxx/serializer/serializer-source.cxx index 39c4677..227005d 100644 --- a/xsde/cxx/serializer/serializer-source.cxx +++ b/xsde/cxx/serializer/serializer-source.cxx @@ -2716,7 +2716,7 @@ namespace CXX // Emit "weak" header includes that are used in the file-per-type // compilation model. // - if (ctx.options.value<CLI::generate_inline> ()) + if (ctx.options.generate_inline ()) { Traversal::Schema schema; Includes includes (ctx, Includes::source); diff --git a/xsde/cxx/serializer/type-processor.cxx b/xsde/cxx/serializer/type-processor.cxx index 3c3a025..c331309 100644 --- a/xsde/cxx/serializer/type-processor.cxx +++ b/xsde/cxx/serializer/type-processor.cxx @@ -302,12 +302,11 @@ namespace CXX }; Void - process_impl (CLI::Options const& options, + process_impl (options const& ops, XSDFrontend::SemanticGraph::Schema& tu, TypeMap::Namespaces& type_map) { - Boolean tiein (!options.value<CLI::reuse_style_mixin> () && - !options.value<CLI::reuse_style_none> ()); + Boolean tiein (!ops.reuse_style_mixin () && !ops.reuse_style_none ()); if (tu.names_begin ()->named ().name () == L"http://www.w3.org/2001/XMLSchema") @@ -330,8 +329,7 @@ namespace CXX // If --extern-xml-schema is specified, then we don't want // includes from the XML Schema type map. // - Boolean extern_xml_schema ( - options.value<CLI::extern_xml_schema> ()); + Boolean extern_xml_schema (ops.extern_xml_schema ()); // Besides types defined in this schema, also process those // referenced by global elements in case we are generating @@ -373,11 +371,11 @@ namespace CXX } Void TypeProcessor:: - process (CLI::Options const& options, + process (options const& ops, XSDFrontend::SemanticGraph::Schema& s, TypeMap::Namespaces& tm) { - process_impl (options, s, tm); + process_impl (ops, s, tm); } } } diff --git a/xsde/cxx/serializer/type-processor.hxx b/xsde/cxx/serializer/type-processor.hxx index c3355b1..f0fceed 100644 --- a/xsde/cxx/serializer/type-processor.hxx +++ b/xsde/cxx/serializer/type-processor.hxx @@ -12,7 +12,7 @@ #include <type-map/type-map.hxx> -#include <cxx/serializer/cli.hxx> +#include <cxx/serializer/options.hxx> namespace CXX { @@ -24,7 +24,7 @@ namespace CXX { public: Void - process (CLI::Options const& options, + process (options const&, XSDFrontend::SemanticGraph::Schema&, TypeMap::Namespaces&); }; diff --git a/xsde/cxx/serializer/validator.cxx b/xsde/cxx/serializer/validator.cxx index 9403437..af4dfd1 100644 --- a/xsde/cxx/serializer/validator.cxx +++ b/xsde/cxx/serializer/validator.cxx @@ -25,10 +25,10 @@ namespace CXX public: ValidationContext (SemanticGraph::Schema& root, SemanticGraph::Path const& path, - CLI::Options const& options, + Serializer::options const& ops, const WarningSet& disabled_warnings, Boolean& valid_) - : Context (std::wcerr, root, path, options, 0, 0, 0), + : Context (std::wcerr, root, path, ops, 0, 0, 0), disabled_warnings_ (disabled_warnings), disabled_warnings_all_ (false), valid (valid_), @@ -157,7 +157,7 @@ namespace CXX return; if (e.substitutes_p () && - !options.value<CLI::generate_polymorphic> () && + !options.generate_polymorphic () && !subst_group_warning_issued) { subst_group_warning_issued = true; @@ -242,7 +242,7 @@ namespace CXX << "automatically name them" << endl; - if (!options.value<CLI::show_anonymous> ()) + if (!options.show_anonymous ()) wcerr << t.file () << ": info: use --show-anonymous option to see these " << "types" << endl; @@ -271,7 +271,7 @@ namespace CXX { if (traverse_common (e)) { - if (options.value<CLI::show_anonymous> ()) + if (options.show_anonymous ()) { wcerr << e.file () << ":" << e.line () << ":" << e.column () << ": error: element '" << xpath (e) << "' " @@ -296,7 +296,7 @@ namespace CXX { if (traverse_common (a)) { - if (options.value<CLI::show_anonymous> ()) + if (options.show_anonymous ()) { wcerr << a.file () << ":" << a.line () << ":" << a.column () << ": error: attribute '" << xpath (a) << "' " @@ -362,16 +362,16 @@ namespace CXX if (!valid) return; - if (options.value<CLI::root_element_first> ()) + if (options.root_element_first ()) { if (element_ == 0) element_ = &e; } - else if (options.value<CLI::root_element_last> ()) + else if (options.root_element_last ()) { element_ = &e; } - else if (String name = options.value<CLI::root_element> ()) + else if (String name = options.root_element ()) { if (e.name () == name) element_ = &e; @@ -400,18 +400,18 @@ namespace CXX } Boolean Validator:: - validate (CLI::Options const& options, + validate (options const& ops, SemanticGraph::Schema& root, SemanticGraph::Path const& path, Boolean gen_driver, const WarningSet& disabled_warnings) { Boolean valid (true); - ValidationContext ctx (root, path, options, disabled_warnings, valid); + ValidationContext ctx (root, path, ops, disabled_warnings, valid); // // - NarrowString enc (options.value<CLI::char_encoding> ()); + NarrowString enc (ops.char_encoding ()); if (enc != "utf8" && enc != "iso8859-1") { @@ -422,9 +422,9 @@ namespace CXX // // { - Boolean ref (options.value<CLI::root_element_first> ()); - Boolean rel (options.value<CLI::root_element_last> ()); - Boolean re (options.value<CLI::root_element> ()); + Boolean ref (ops.root_element_first ()); + Boolean rel (ops.root_element_last ()); + Boolean re (ops.root_element ()); if ((ref && rel) || (ref && re) || (rel && re)) { @@ -439,8 +439,7 @@ namespace CXX // // - if (options.value<CLI::reuse_style_mixin> () && - options.value<CLI::reuse_style_none> ()) + if (ops.reuse_style_mixin () && ops.reuse_style_none ()) { wcerr << "error: mutually exclusive options specified: " << "--reuse-style-mixin and --reuse-style-none" @@ -451,8 +450,8 @@ namespace CXX // // - if (options.value<CLI::reuse_style_none> () && - options.value<CLI::generate_empty_impl> () && + if (ops.reuse_style_none () && + ops.generate_empty_impl () && !ctx.is_disabled ("S002")) { wcerr << "warning S002: generating sample implementation without " diff --git a/xsde/cxx/serializer/validator.hxx b/xsde/cxx/serializer/validator.hxx index f275cf4..601ada3 100644 --- a/xsde/cxx/serializer/validator.hxx +++ b/xsde/cxx/serializer/validator.hxx @@ -10,7 +10,7 @@ #include <xsd-frontend/semantic-graph/schema.hxx> -#include <cxx/serializer/cli.hxx> +#include <cxx/serializer/options.hxx> #include <xsde.hxx> @@ -24,7 +24,7 @@ namespace CXX { public: Boolean - validate (CLI::Options const& options, + validate (options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const& tu, Boolean gen_driver, |