From 018e1ba581ec6f01f069a45ec4cf89f152b44d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 19 Mar 2025 15:41:36 +0100 Subject: remerge --- xsd/pregenerated/xsd/cxx/options.cxx | 739 --------------- xsd/pregenerated/xsd/cxx/options.hxx | 451 --------- xsd/pregenerated/xsd/cxx/options.ixx | 615 ------------ xsd/pregenerated/xsd/cxx/parser/options.cxx | 776 ---------------- xsd/pregenerated/xsd/cxx/parser/options.hxx | 186 ---- xsd/pregenerated/xsd/cxx/parser/options.ixx | 162 ---- xsd/pregenerated/xsd/cxx/tree/options.cxx | 1343 --------------------------- xsd/pregenerated/xsd/cxx/tree/options.hxx | 414 --------- xsd/pregenerated/xsd/cxx/tree/options.ixx | 504 ---------- xsd/pregenerated/xsd/options.cxx | 1297 -------------------------- xsd/pregenerated/xsd/options.hxx | 702 -------------- xsd/pregenerated/xsd/options.ixx | 555 ----------- 12 files changed, 7744 deletions(-) delete mode 100644 xsd/pregenerated/xsd/cxx/options.cxx delete mode 100644 xsd/pregenerated/xsd/cxx/options.hxx delete mode 100644 xsd/pregenerated/xsd/cxx/options.ixx delete mode 100644 xsd/pregenerated/xsd/cxx/parser/options.cxx delete mode 100644 xsd/pregenerated/xsd/cxx/parser/options.hxx delete mode 100644 xsd/pregenerated/xsd/cxx/parser/options.ixx delete mode 100644 xsd/pregenerated/xsd/cxx/tree/options.cxx delete mode 100644 xsd/pregenerated/xsd/cxx/tree/options.hxx delete mode 100644 xsd/pregenerated/xsd/cxx/tree/options.ixx delete mode 100644 xsd/pregenerated/xsd/options.cxx delete mode 100644 xsd/pregenerated/xsd/options.hxx delete mode 100644 xsd/pregenerated/xsd/options.ixx (limited to 'xsd/pregenerated') diff --git a/xsd/pregenerated/xsd/cxx/options.cxx b/xsd/pregenerated/xsd/cxx/options.cxx deleted file mode 100644 index 9eea3a9..0000000 --- a/xsd/pregenerated/xsd/cxx/options.cxx +++ /dev/null @@ -1,739 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -#include -// -// End prologue. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace cli -{ - template - struct parser - { - static void - parse (X& x, bool& xs, scanner& s) - { - using namespace std; - - const char* o (s.next ()); - if (s.more ()) - { - string v (s.next ()); - istringstream is (v); - if (!(is >> x && is.peek () == istringstream::traits_type::eof ())) - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (bool& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - const char* v (s.next ()); - - if (std::strcmp (v, "1") == 0 || - std::strcmp (v, "true") == 0 || - std::strcmp (v, "TRUE") == 0 || - std::strcmp (v, "True") == 0) - x = true; - else if (std::strcmp (v, "0") == 0 || - std::strcmp (v, "false") == 0 || - std::strcmp (v, "FALSE") == 0 || - std::strcmp (v, "False") == 0) - x = false; - else - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (std::string& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - x = s.next (); - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::pair& x, bool& xs, scanner& s) - { - x.second = s.position (); - parser::parse (x.first, xs, s); - } - }; - - template - struct parser > - { - static void - parse (std::vector& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.push_back (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::set& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.insert (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::map& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::size_t pos (s.position ()); - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (v, dummy, s); - } - - m[k] = v; - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::multimap& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::size_t pos (s.position ()); - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (v, dummy, s); - } - - m.insert (typename std::multimap::value_type (k, v)); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, s); - } - - template - void - thunk (X& x, scanner& s) - { - s.next (); - x.*M = true; - } - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, x.*S, s); - } -} - -#include - -namespace CXX -{ - // options - // - - options:: - options () - : std_ (cxx_version::cxx11), - std_specified_ (false), - char_type_ ("char"), - char_type_specified_ (false), - char_encoding_ (), - char_encoding_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - generate_inline_ (), - generate_xml_schema_ (), - extern_xml_schema_ (), - extern_xml_schema_specified_ (false), - namespace_map_ (), - namespace_map_specified_ (false), - namespace_regex_ (), - namespace_regex_specified_ (false), - namespace_regex_trace_ (), - reserved_name_ (), - reserved_name_specified_ (false), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - include_regex_ (), - include_regex_specified_ (false), - include_regex_trace_ (), - guard_prefix_ (), - guard_prefix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - fwd_suffix_ ("-fwd.hxx"), - fwd_suffix_specified_ (false), - hxx_regex_ (), - hxx_regex_specified_ (false), - ixx_regex_ (), - ixx_regex_specified_ (false), - cxx_regex_ (), - cxx_regex_specified_ (false), - fwd_regex_ (), - fwd_regex_specified_ (false), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - fwd_prologue_ (), - fwd_prologue_specified_ (false), - prologue_ (), - prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - fwd_epilogue_ (), - fwd_epilogue_specified_ (false), - epilogue_ (), - epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - fwd_prologue_file_ (), - fwd_prologue_file_specified_ (false), - prologue_file_ (), - prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - fwd_epilogue_file_ (), - fwd_epilogue_file_specified_ (false), - epilogue_file_ (), - epilogue_file_specified_ (false), - export_symbol_ (), - export_symbol_specified_ (false), - export_xml_schema_ (), - export_maps_ (), - import_maps_ (), - generate_dep_ (), - generate_dep_only_ (), - dep_phony_ (), - dep_target_ (), - dep_target_specified_ (false), - dep_suffix_ (".d"), - dep_suffix_specified_ (false), - dep_file_ (), - dep_file_specified_ (false), - dep_regex_ (), - dep_regex_specified_ (false) - { - } - - ::cli::usage_para options:: - print_usage (::std::wostream& os, ::cli::usage_para p) - { - CLI_POTENTIALLY_UNUSED (os); - - if (p == ::cli::usage_para::text) - os << ::std::endl; - - os << "--std Specify the C++ standard that the generated code" << ::std::endl - << " should conform to." << ::std::endl; - - os << "--char-type Generate code using the provided character " << ::std::endl - << " instead of the default char." << ::std::endl; - - os << "--char-encoding Specify the character encoding that should be used" << ::std::endl - << " in the generated code." << ::std::endl; - - os << "--output-dir Write generated files to instead of the" << ::std::endl - << " current directory." << ::std::endl; - - os << "--generate-inline Generate simple functions inline." << ::std::endl; - - os << "--generate-xml-schema Generate a C++ header file as if the schema being" << ::std::endl - << " compiled defines the XML Schema namespace." << ::std::endl; - - os << "--extern-xml-schema Include a header file derived from instead" << ::std::endl - << " of generating the XML Schema namespace mapping" << ::std::endl - << " inline." << ::std::endl; - - os << "--namespace-map = Map XML Schema namespace to C++ namespace" << ::std::endl - << " ." << ::std::endl; - - os << "--namespace-regex Add to the list of regular expressions" << ::std::endl - << " used to translate XML Schema namespace names to" << ::std::endl - << " C++ namespace names." << ::std::endl; - - os << "--namespace-regex-trace Trace the process of applying regular expressions" << ::std::endl - << " specified with the --namespace-regex option." << ::std::endl; - - os << "--reserved-name [=] Add name to the list of names that should not" << ::std::endl - << " be used as identifiers." << ::std::endl; - - os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in" << ::std::endl - << " generated #include directives." << ::std::endl; - - os << "--include-prefix Add to generated #include directive" << ::std::endl - << " paths." << ::std::endl; - - os << "--include-regex Add to the list of regular expressions" << ::std::endl - << " used to transform #include directive paths." << ::std::endl; - - os << "--include-regex-trace Trace the process of applying regular expressions" << ::std::endl - << " specified with the --include-regex option." << ::std::endl; - - os << "--guard-prefix Add to generated header inclusion guards." << ::std::endl; - - os << "--hxx-suffix Use the provided instead of the default" << ::std::endl - << " .hxx to construct the name of the header file." << ::std::endl; - - os << "--ixx-suffix Use the provided instead of the default" << ::std::endl - << " .ixx to construct the name of the inline file." << ::std::endl; - - os << "--cxx-suffix Use the provided instead of the default" << ::std::endl - << " .cxx to construct the name of the source file." << ::std::endl; - - os << "--fwd-suffix Use the provided instead of the default" << ::std::endl - << " -fwd.hxx to construct the name of the forward" << ::std::endl - << " declaration file." << ::std::endl; - - os << "--hxx-regex Use the provided expression to construct the name" << ::std::endl - << " of the header file." << ::std::endl; - - os << "--ixx-regex Use the provided expression to construct the name" << ::std::endl - << " of the inline file." << ::std::endl; - - os << "--cxx-regex Use the provided expression to construct the name" << ::std::endl - << " of the source file." << ::std::endl; - - os << "--fwd-regex Use the provided expression to construct the name" << ::std::endl - << " of the forward declaration file." << ::std::endl; - - os << "--hxx-prologue Insert at the beginning of the header file." << ::std::endl; - - os << "--ixx-prologue Insert at the beginning of the inline file." << ::std::endl; - - os << "--cxx-prologue Insert at the beginning of the source file." << ::std::endl; - - os << "--fwd-prologue Insert at the beginning of the forward" << ::std::endl - << " declaration file." << ::std::endl; - - os << "--prologue Insert at the beginning of each generated" << ::std::endl - << " file for which there is no file-specific prologue." << ::std::endl; - - os << "--hxx-epilogue Insert at the end of the header file." << ::std::endl; - - os << "--ixx-epilogue Insert at the end of the inline file." << ::std::endl; - - os << "--cxx-epilogue Insert at the end of the source file." << ::std::endl; - - os << "--fwd-epilogue Insert at the end of the forward" << ::std::endl - << " declaration file." << ::std::endl; - - os << "--epilogue Insert at the end of each generated file" << ::std::endl - << " for which there is no file-specific epilogue." << ::std::endl; - - os << "--hxx-prologue-file Insert the content of the at the beginning" << ::std::endl - << " of the header file." << ::std::endl; - - os << "--ixx-prologue-file Insert the content of the at the beginning" << ::std::endl - << " of the inline file." << ::std::endl; - - os << "--cxx-prologue-file Insert the content of the at the beginning" << ::std::endl - << " of the source file." << ::std::endl; - - os << "--fwd-prologue-file Insert the content of the at the beginning" << ::std::endl - << " of the forward declaration file." << ::std::endl; - - os << "--prologue-file Insert the content of the at the beginning" << ::std::endl - << " of each generated file for which there is no" << ::std::endl - << " file-specific prologue file." << ::std::endl; - - os << "--hxx-epilogue-file Insert the content of the at the end of the" << ::std::endl - << " header file." << ::std::endl; - - os << "--ixx-epilogue-file Insert the content of the at the end of the" << ::std::endl - << " inline file." << ::std::endl; - - os << "--cxx-epilogue-file Insert the content of the at the end of the" << ::std::endl - << " source file." << ::std::endl; - - os << "--fwd-epilogue-file Insert the content of the at the end of the" << ::std::endl - << " forward declaration file." << ::std::endl; - - os << "--epilogue-file Insert the content of the at the end of" << ::std::endl - << " each generated file for which there is no" << ::std::endl - << " file-specific epilogue file." << ::std::endl; - - os << "--export-symbol Insert in places where DLL export/import" << ::std::endl - << " control statements" << ::std::endl - << " (__declspec(dllexport/dllimport)) are necessary." << ::std::endl; - - os << "--export-xml-schema Export/import types in the XML Schema namespace" << ::std::endl - << " using the export symbol provided with the" << ::std::endl - << " --export-symbol option." << ::std::endl; - - os << "--export-maps Export polymorphism support maps from a Win32 DLL" << ::std::endl - << " into which this generated code is placed." << ::std::endl; - - os << "--import-maps Import polymorphism support maps to a Win32 DLL or" << ::std::endl - << " executable into which this generated code is" << ::std::endl - << " linked." << ::std::endl; - - os << "--generate-dep Generate make dependency information." << ::std::endl; - - os << "--generate-dep-only Generate make dependency information only." << ::std::endl; - - os << "--dep-phony Generate phony targets for included/imported" << ::std::endl - << " schema files, causing each to depend on nothing." << ::std::endl; - - os << "--dep-target Change the target of the dependency rule." << ::std::endl; - - os << "--dep-suffix Use instead of the default .d to" << ::std::endl - << " construct the name of the dependency file." << ::std::endl; - - os << "--dep-file Use as the generated dependency file path" << ::std::endl - << " instead of deriving it from the input file name." << ::std::endl; - - os << "--dep-regex Use the provided expression to construct the name" << ::std::endl - << " of the dependency file." << ::std::endl; - - p = ::cli::usage_para::option; - - return p; - } - - typedef - std::map - _cli_options_map; - - static _cli_options_map _cli_options_map_; - - struct _cli_options_map_init - { - _cli_options_map_init () - { - _cli_options_map_["--std"] = - &::cli::thunk< options, cxx_version, &options::std_, - &options::std_specified_ >; - _cli_options_map_["--char-type"] = - &::cli::thunk< options, NarrowString, &options::char_type_, - &options::char_type_specified_ >; - _cli_options_map_["--char-encoding"] = - &::cli::thunk< options, NarrowString, &options::char_encoding_, - &options::char_encoding_specified_ >; - _cli_options_map_["--output-dir"] = - &::cli::thunk< options, NarrowString, &options::output_dir_, - &options::output_dir_specified_ >; - _cli_options_map_["--generate-inline"] = - &::cli::thunk< options, &options::generate_inline_ >; - _cli_options_map_["--generate-xml-schema"] = - &::cli::thunk< options, &options::generate_xml_schema_ >; - _cli_options_map_["--extern-xml-schema"] = - &::cli::thunk< options, NarrowString, &options::extern_xml_schema_, - &options::extern_xml_schema_specified_ >; - _cli_options_map_["--namespace-map"] = - &::cli::thunk< options, NarrowStrings, &options::namespace_map_, - &options::namespace_map_specified_ >; - _cli_options_map_["--namespace-regex"] = - &::cli::thunk< options, NarrowStrings, &options::namespace_regex_, - &options::namespace_regex_specified_ >; - _cli_options_map_["--namespace-regex-trace"] = - &::cli::thunk< options, &options::namespace_regex_trace_ >; - _cli_options_map_["--reserved-name"] = - &::cli::thunk< options, NarrowStrings, &options::reserved_name_, - &options::reserved_name_specified_ >; - _cli_options_map_["--include-with-brackets"] = - &::cli::thunk< options, &options::include_with_brackets_ >; - _cli_options_map_["--include-prefix"] = - &::cli::thunk< options, NarrowString, &options::include_prefix_, - &options::include_prefix_specified_ >; - _cli_options_map_["--include-regex"] = - &::cli::thunk< options, NarrowStrings, &options::include_regex_, - &options::include_regex_specified_ >; - _cli_options_map_["--include-regex-trace"] = - &::cli::thunk< options, &options::include_regex_trace_ >; - _cli_options_map_["--guard-prefix"] = - &::cli::thunk< options, NarrowString, &options::guard_prefix_, - &options::guard_prefix_specified_ >; - _cli_options_map_["--hxx-suffix"] = - &::cli::thunk< options, NarrowString, &options::hxx_suffix_, - &options::hxx_suffix_specified_ >; - _cli_options_map_["--ixx-suffix"] = - &::cli::thunk< options, NarrowString, &options::ixx_suffix_, - &options::ixx_suffix_specified_ >; - _cli_options_map_["--cxx-suffix"] = - &::cli::thunk< options, NarrowString, &options::cxx_suffix_, - &options::cxx_suffix_specified_ >; - _cli_options_map_["--fwd-suffix"] = - &::cli::thunk< options, NarrowString, &options::fwd_suffix_, - &options::fwd_suffix_specified_ >; - _cli_options_map_["--hxx-regex"] = - &::cli::thunk< options, NarrowString, &options::hxx_regex_, - &options::hxx_regex_specified_ >; - _cli_options_map_["--ixx-regex"] = - &::cli::thunk< options, NarrowString, &options::ixx_regex_, - &options::ixx_regex_specified_ >; - _cli_options_map_["--cxx-regex"] = - &::cli::thunk< options, NarrowString, &options::cxx_regex_, - &options::cxx_regex_specified_ >; - _cli_options_map_["--fwd-regex"] = - &::cli::thunk< options, NarrowString, &options::fwd_regex_, - &options::fwd_regex_specified_ >; - _cli_options_map_["--hxx-prologue"] = - &::cli::thunk< options, NarrowStrings, &options::hxx_prologue_, - &options::hxx_prologue_specified_ >; - _cli_options_map_["--ixx-prologue"] = - &::cli::thunk< options, NarrowStrings, &options::ixx_prologue_, - &options::ixx_prologue_specified_ >; - _cli_options_map_["--cxx-prologue"] = - &::cli::thunk< options, NarrowStrings, &options::cxx_prologue_, - &options::cxx_prologue_specified_ >; - _cli_options_map_["--fwd-prologue"] = - &::cli::thunk< options, NarrowStrings, &options::fwd_prologue_, - &options::fwd_prologue_specified_ >; - _cli_options_map_["--prologue"] = - &::cli::thunk< options, NarrowStrings, &options::prologue_, - &options::prologue_specified_ >; - _cli_options_map_["--hxx-epilogue"] = - &::cli::thunk< options, NarrowStrings, &options::hxx_epilogue_, - &options::hxx_epilogue_specified_ >; - _cli_options_map_["--ixx-epilogue"] = - &::cli::thunk< options, NarrowStrings, &options::ixx_epilogue_, - &options::ixx_epilogue_specified_ >; - _cli_options_map_["--cxx-epilogue"] = - &::cli::thunk< options, NarrowStrings, &options::cxx_epilogue_, - &options::cxx_epilogue_specified_ >; - _cli_options_map_["--fwd-epilogue"] = - &::cli::thunk< options, NarrowStrings, &options::fwd_epilogue_, - &options::fwd_epilogue_specified_ >; - _cli_options_map_["--epilogue"] = - &::cli::thunk< options, NarrowStrings, &options::epilogue_, - &options::epilogue_specified_ >; - _cli_options_map_["--hxx-prologue-file"] = - &::cli::thunk< options, NarrowString, &options::hxx_prologue_file_, - &options::hxx_prologue_file_specified_ >; - _cli_options_map_["--ixx-prologue-file"] = - &::cli::thunk< options, NarrowString, &options::ixx_prologue_file_, - &options::ixx_prologue_file_specified_ >; - _cli_options_map_["--cxx-prologue-file"] = - &::cli::thunk< options, NarrowString, &options::cxx_prologue_file_, - &options::cxx_prologue_file_specified_ >; - _cli_options_map_["--fwd-prologue-file"] = - &::cli::thunk< options, NarrowString, &options::fwd_prologue_file_, - &options::fwd_prologue_file_specified_ >; - _cli_options_map_["--prologue-file"] = - &::cli::thunk< options, NarrowString, &options::prologue_file_, - &options::prologue_file_specified_ >; - _cli_options_map_["--hxx-epilogue-file"] = - &::cli::thunk< options, NarrowString, &options::hxx_epilogue_file_, - &options::hxx_epilogue_file_specified_ >; - _cli_options_map_["--ixx-epilogue-file"] = - &::cli::thunk< options, NarrowString, &options::ixx_epilogue_file_, - &options::ixx_epilogue_file_specified_ >; - _cli_options_map_["--cxx-epilogue-file"] = - &::cli::thunk< options, NarrowString, &options::cxx_epilogue_file_, - &options::cxx_epilogue_file_specified_ >; - _cli_options_map_["--fwd-epilogue-file"] = - &::cli::thunk< options, NarrowString, &options::fwd_epilogue_file_, - &options::fwd_epilogue_file_specified_ >; - _cli_options_map_["--epilogue-file"] = - &::cli::thunk< options, NarrowString, &options::epilogue_file_, - &options::epilogue_file_specified_ >; - _cli_options_map_["--export-symbol"] = - &::cli::thunk< options, NarrowString, &options::export_symbol_, - &options::export_symbol_specified_ >; - _cli_options_map_["--export-xml-schema"] = - &::cli::thunk< options, &options::export_xml_schema_ >; - _cli_options_map_["--export-maps"] = - &::cli::thunk< options, &options::export_maps_ >; - _cli_options_map_["--import-maps"] = - &::cli::thunk< options, &options::import_maps_ >; - _cli_options_map_["--generate-dep"] = - &::cli::thunk< options, &options::generate_dep_ >; - _cli_options_map_["--generate-dep-only"] = - &::cli::thunk< options, &options::generate_dep_only_ >; - _cli_options_map_["--dep-phony"] = - &::cli::thunk< options, &options::dep_phony_ >; - _cli_options_map_["--dep-target"] = - &::cli::thunk< options, NarrowStrings, &options::dep_target_, - &options::dep_target_specified_ >; - _cli_options_map_["--dep-suffix"] = - &::cli::thunk< options, NarrowString, &options::dep_suffix_, - &options::dep_suffix_specified_ >; - _cli_options_map_["--dep-file"] = - &::cli::thunk< options, NarrowString, &options::dep_file_, - &options::dep_file_specified_ >; - _cli_options_map_["--dep-regex"] = - &::cli::thunk< options, NarrowString, &options::dep_regex_, - &options::dep_regex_specified_ >; - } - }; - - static _cli_options_map_init _cli_options_map_init_; - - bool options:: - _parse (const char* o, ::cli::scanner& s) - { - _cli_options_map::const_iterator i (_cli_options_map_.find (o)); - - if (i != _cli_options_map_.end ()) - { - (*(i->second)) (*this, s); - return true; - } - - // options base - // - if (::options::_parse (o, s)) - return true; - - return false; - } -} - -// Begin epilogue. -// -// -// End epilogue. - diff --git a/xsd/pregenerated/xsd/cxx/options.hxx b/xsd/pregenerated/xsd/cxx/options.hxx deleted file mode 100644 index 085aa4c..0000000 --- a/xsd/pregenerated/xsd/cxx/options.hxx +++ /dev/null @@ -1,451 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -#ifndef XSD_CXX_OPTIONS_HXX -#define XSD_CXX_OPTIONS_HXX - -// Begin prologue. -// -// -// End prologue. - -#include - -#include - -#include - -#include - -namespace CXX -{ - class options: public ::options - { - public: - // Option accessors. - // - const cxx_version& - std () const; - - bool - std_specified () const; - - const NarrowString& - char_type () const; - - bool - char_type_specified () const; - - const NarrowString& - char_encoding () const; - - bool - char_encoding_specified () const; - - const NarrowString& - output_dir () const; - - bool - output_dir_specified () const; - - const bool& - generate_inline () const; - - const bool& - generate_xml_schema () const; - - const NarrowString& - extern_xml_schema () const; - - bool - extern_xml_schema_specified () const; - - const NarrowStrings& - namespace_map () const; - - bool - namespace_map_specified () const; - - const NarrowStrings& - namespace_regex () const; - - bool - namespace_regex_specified () const; - - const bool& - namespace_regex_trace () const; - - const NarrowStrings& - reserved_name () const; - - bool - reserved_name_specified () const; - - const bool& - include_with_brackets () const; - - const NarrowString& - include_prefix () const; - - bool - include_prefix_specified () const; - - const NarrowStrings& - include_regex () const; - - bool - include_regex_specified () const; - - const bool& - include_regex_trace () const; - - const NarrowString& - guard_prefix () const; - - bool - guard_prefix_specified () const; - - const NarrowString& - hxx_suffix () const; - - bool - hxx_suffix_specified () const; - - const NarrowString& - ixx_suffix () const; - - bool - ixx_suffix_specified () const; - - const NarrowString& - cxx_suffix () const; - - bool - cxx_suffix_specified () const; - - const NarrowString& - fwd_suffix () const; - - bool - fwd_suffix_specified () const; - - const NarrowString& - hxx_regex () const; - - bool - hxx_regex_specified () const; - - const NarrowString& - ixx_regex () const; - - bool - ixx_regex_specified () const; - - const NarrowString& - cxx_regex () const; - - bool - cxx_regex_specified () const; - - const NarrowString& - fwd_regex () const; - - bool - fwd_regex_specified () const; - - const NarrowStrings& - hxx_prologue () const; - - bool - hxx_prologue_specified () const; - - const NarrowStrings& - ixx_prologue () const; - - bool - ixx_prologue_specified () const; - - const NarrowStrings& - cxx_prologue () const; - - bool - cxx_prologue_specified () const; - - const NarrowStrings& - fwd_prologue () const; - - bool - fwd_prologue_specified () const; - - const NarrowStrings& - prologue () const; - - bool - prologue_specified () const; - - const NarrowStrings& - hxx_epilogue () const; - - bool - hxx_epilogue_specified () const; - - const NarrowStrings& - ixx_epilogue () const; - - bool - ixx_epilogue_specified () const; - - const NarrowStrings& - cxx_epilogue () const; - - bool - cxx_epilogue_specified () const; - - const NarrowStrings& - fwd_epilogue () const; - - bool - fwd_epilogue_specified () const; - - const NarrowStrings& - epilogue () const; - - bool - epilogue_specified () const; - - const NarrowString& - hxx_prologue_file () const; - - bool - hxx_prologue_file_specified () const; - - const NarrowString& - ixx_prologue_file () const; - - bool - ixx_prologue_file_specified () const; - - const NarrowString& - cxx_prologue_file () const; - - bool - cxx_prologue_file_specified () const; - - const NarrowString& - fwd_prologue_file () const; - - bool - fwd_prologue_file_specified () const; - - const NarrowString& - prologue_file () const; - - bool - prologue_file_specified () const; - - const NarrowString& - hxx_epilogue_file () const; - - bool - hxx_epilogue_file_specified () const; - - const NarrowString& - ixx_epilogue_file () const; - - bool - ixx_epilogue_file_specified () const; - - const NarrowString& - cxx_epilogue_file () const; - - bool - cxx_epilogue_file_specified () const; - - const NarrowString& - fwd_epilogue_file () const; - - bool - fwd_epilogue_file_specified () const; - - const NarrowString& - epilogue_file () const; - - bool - epilogue_file_specified () const; - - const NarrowString& - export_symbol () const; - - bool - export_symbol_specified () const; - - const bool& - export_xml_schema () const; - - const bool& - export_maps () const; - - const bool& - import_maps () const; - - const bool& - generate_dep () const; - - const bool& - generate_dep_only () const; - - const bool& - dep_phony () const; - - const NarrowStrings& - dep_target () const; - - bool - dep_target_specified () const; - - const NarrowString& - dep_suffix () const; - - bool - dep_suffix_specified () const; - - const NarrowString& - dep_file () const; - - bool - dep_file_specified () const; - - const NarrowString& - dep_regex () const; - - bool - dep_regex_specified () const; - - // Print usage information. - // - static ::cli::usage_para - print_usage (::std::wostream&, - ::cli::usage_para = ::cli::usage_para::none); - - // Implementation details. - // - protected: - options (); - - bool - _parse (const char*, ::cli::scanner&); - - public: - cxx_version std_; - bool std_specified_; - NarrowString char_type_; - bool char_type_specified_; - NarrowString char_encoding_; - bool char_encoding_specified_; - NarrowString output_dir_; - bool output_dir_specified_; - bool generate_inline_; - bool generate_xml_schema_; - NarrowString extern_xml_schema_; - bool extern_xml_schema_specified_; - NarrowStrings namespace_map_; - bool namespace_map_specified_; - NarrowStrings namespace_regex_; - bool namespace_regex_specified_; - bool namespace_regex_trace_; - NarrowStrings reserved_name_; - bool reserved_name_specified_; - bool include_with_brackets_; - NarrowString include_prefix_; - bool include_prefix_specified_; - NarrowStrings include_regex_; - bool include_regex_specified_; - bool include_regex_trace_; - NarrowString guard_prefix_; - bool guard_prefix_specified_; - NarrowString hxx_suffix_; - bool hxx_suffix_specified_; - NarrowString ixx_suffix_; - bool ixx_suffix_specified_; - NarrowString cxx_suffix_; - bool cxx_suffix_specified_; - NarrowString fwd_suffix_; - bool fwd_suffix_specified_; - NarrowString hxx_regex_; - bool hxx_regex_specified_; - NarrowString ixx_regex_; - bool ixx_regex_specified_; - NarrowString cxx_regex_; - bool cxx_regex_specified_; - NarrowString fwd_regex_; - bool fwd_regex_specified_; - NarrowStrings hxx_prologue_; - bool hxx_prologue_specified_; - NarrowStrings ixx_prologue_; - bool ixx_prologue_specified_; - NarrowStrings cxx_prologue_; - bool cxx_prologue_specified_; - NarrowStrings fwd_prologue_; - bool fwd_prologue_specified_; - NarrowStrings prologue_; - bool prologue_specified_; - NarrowStrings hxx_epilogue_; - bool hxx_epilogue_specified_; - NarrowStrings ixx_epilogue_; - bool ixx_epilogue_specified_; - NarrowStrings cxx_epilogue_; - bool cxx_epilogue_specified_; - NarrowStrings fwd_epilogue_; - bool fwd_epilogue_specified_; - NarrowStrings epilogue_; - bool epilogue_specified_; - NarrowString hxx_prologue_file_; - bool hxx_prologue_file_specified_; - NarrowString ixx_prologue_file_; - bool ixx_prologue_file_specified_; - NarrowString cxx_prologue_file_; - bool cxx_prologue_file_specified_; - NarrowString fwd_prologue_file_; - bool fwd_prologue_file_specified_; - NarrowString prologue_file_; - bool prologue_file_specified_; - NarrowString hxx_epilogue_file_; - bool hxx_epilogue_file_specified_; - NarrowString ixx_epilogue_file_; - bool ixx_epilogue_file_specified_; - NarrowString cxx_epilogue_file_; - bool cxx_epilogue_file_specified_; - NarrowString fwd_epilogue_file_; - bool fwd_epilogue_file_specified_; - NarrowString epilogue_file_; - bool epilogue_file_specified_; - NarrowString export_symbol_; - bool export_symbol_specified_; - bool export_xml_schema_; - bool export_maps_; - bool import_maps_; - bool generate_dep_; - bool generate_dep_only_; - bool dep_phony_; - NarrowStrings dep_target_; - bool dep_target_specified_; - NarrowString dep_suffix_; - bool dep_suffix_specified_; - NarrowString dep_file_; - bool dep_file_specified_; - NarrowString dep_regex_; - bool dep_regex_specified_; - }; -} - -#include - -// Begin epilogue. -// -// -// End epilogue. - -#endif // XSD_CXX_OPTIONS_HXX diff --git a/xsd/pregenerated/xsd/cxx/options.ixx b/xsd/pregenerated/xsd/cxx/options.ixx deleted file mode 100644 index 8266e31..0000000 --- a/xsd/pregenerated/xsd/cxx/options.ixx +++ /dev/null @@ -1,615 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -// -// End prologue. - -namespace CXX -{ - // options - // - - inline const cxx_version& options:: - std () const - { - return this->std_; - } - - inline bool options:: - std_specified () const - { - return this->std_specified_; - } - - inline const NarrowString& options:: - char_type () const - { - return this->char_type_; - } - - inline bool options:: - char_type_specified () const - { - return this->char_type_specified_; - } - - inline const NarrowString& options:: - char_encoding () const - { - return this->char_encoding_; - } - - inline bool options:: - char_encoding_specified () const - { - return this->char_encoding_specified_; - } - - inline const NarrowString& options:: - output_dir () const - { - return this->output_dir_; - } - - inline bool options:: - output_dir_specified () const - { - return this->output_dir_specified_; - } - - inline const bool& options:: - generate_inline () const - { - return this->generate_inline_; - } - - inline const bool& options:: - generate_xml_schema () const - { - return this->generate_xml_schema_; - } - - inline const NarrowString& options:: - extern_xml_schema () const - { - return this->extern_xml_schema_; - } - - inline bool options:: - extern_xml_schema_specified () const - { - return this->extern_xml_schema_specified_; - } - - inline const NarrowStrings& options:: - namespace_map () const - { - return this->namespace_map_; - } - - inline bool options:: - namespace_map_specified () const - { - return this->namespace_map_specified_; - } - - inline const NarrowStrings& options:: - namespace_regex () const - { - return this->namespace_regex_; - } - - inline bool options:: - namespace_regex_specified () const - { - return this->namespace_regex_specified_; - } - - inline const bool& options:: - namespace_regex_trace () const - { - return this->namespace_regex_trace_; - } - - inline const NarrowStrings& options:: - reserved_name () const - { - return this->reserved_name_; - } - - inline bool options:: - reserved_name_specified () const - { - return this->reserved_name_specified_; - } - - inline const bool& options:: - include_with_brackets () const - { - return this->include_with_brackets_; - } - - inline const NarrowString& options:: - include_prefix () const - { - return this->include_prefix_; - } - - inline bool options:: - include_prefix_specified () const - { - return this->include_prefix_specified_; - } - - inline const NarrowStrings& options:: - include_regex () const - { - return this->include_regex_; - } - - inline bool options:: - include_regex_specified () const - { - return this->include_regex_specified_; - } - - inline const bool& options:: - include_regex_trace () const - { - return this->include_regex_trace_; - } - - inline const NarrowString& options:: - guard_prefix () const - { - return this->guard_prefix_; - } - - inline bool options:: - guard_prefix_specified () const - { - return this->guard_prefix_specified_; - } - - inline const NarrowString& options:: - hxx_suffix () const - { - return this->hxx_suffix_; - } - - inline bool options:: - hxx_suffix_specified () const - { - return this->hxx_suffix_specified_; - } - - inline const NarrowString& options:: - ixx_suffix () const - { - return this->ixx_suffix_; - } - - inline bool options:: - ixx_suffix_specified () const - { - return this->ixx_suffix_specified_; - } - - inline const NarrowString& options:: - cxx_suffix () const - { - return this->cxx_suffix_; - } - - inline bool options:: - cxx_suffix_specified () const - { - return this->cxx_suffix_specified_; - } - - inline const NarrowString& options:: - fwd_suffix () const - { - return this->fwd_suffix_; - } - - inline bool options:: - fwd_suffix_specified () const - { - return this->fwd_suffix_specified_; - } - - inline const NarrowString& options:: - hxx_regex () const - { - return this->hxx_regex_; - } - - inline bool options:: - hxx_regex_specified () const - { - return this->hxx_regex_specified_; - } - - inline const NarrowString& options:: - ixx_regex () const - { - return this->ixx_regex_; - } - - inline bool options:: - ixx_regex_specified () const - { - return this->ixx_regex_specified_; - } - - inline const NarrowString& options:: - cxx_regex () const - { - return this->cxx_regex_; - } - - inline bool options:: - cxx_regex_specified () const - { - return this->cxx_regex_specified_; - } - - inline const NarrowString& options:: - fwd_regex () const - { - return this->fwd_regex_; - } - - inline bool options:: - fwd_regex_specified () const - { - return this->fwd_regex_specified_; - } - - inline const NarrowStrings& options:: - hxx_prologue () const - { - return this->hxx_prologue_; - } - - inline bool options:: - hxx_prologue_specified () const - { - return this->hxx_prologue_specified_; - } - - inline const NarrowStrings& options:: - ixx_prologue () const - { - return this->ixx_prologue_; - } - - inline bool options:: - ixx_prologue_specified () const - { - return this->ixx_prologue_specified_; - } - - inline const NarrowStrings& options:: - cxx_prologue () const - { - return this->cxx_prologue_; - } - - inline bool options:: - cxx_prologue_specified () const - { - return this->cxx_prologue_specified_; - } - - inline const NarrowStrings& options:: - fwd_prologue () const - { - return this->fwd_prologue_; - } - - inline bool options:: - fwd_prologue_specified () const - { - return this->fwd_prologue_specified_; - } - - inline const NarrowStrings& options:: - prologue () const - { - return this->prologue_; - } - - inline bool options:: - prologue_specified () const - { - return this->prologue_specified_; - } - - inline const NarrowStrings& options:: - hxx_epilogue () const - { - return this->hxx_epilogue_; - } - - inline bool options:: - hxx_epilogue_specified () const - { - return this->hxx_epilogue_specified_; - } - - inline const NarrowStrings& options:: - ixx_epilogue () const - { - return this->ixx_epilogue_; - } - - inline bool options:: - ixx_epilogue_specified () const - { - return this->ixx_epilogue_specified_; - } - - inline const NarrowStrings& options:: - cxx_epilogue () const - { - return this->cxx_epilogue_; - } - - inline bool options:: - cxx_epilogue_specified () const - { - return this->cxx_epilogue_specified_; - } - - inline const NarrowStrings& options:: - fwd_epilogue () const - { - return this->fwd_epilogue_; - } - - inline bool options:: - fwd_epilogue_specified () const - { - return this->fwd_epilogue_specified_; - } - - inline const NarrowStrings& options:: - epilogue () const - { - return this->epilogue_; - } - - inline bool options:: - epilogue_specified () const - { - return this->epilogue_specified_; - } - - inline const NarrowString& options:: - hxx_prologue_file () const - { - return this->hxx_prologue_file_; - } - - inline bool options:: - hxx_prologue_file_specified () const - { - return this->hxx_prologue_file_specified_; - } - - inline const NarrowString& options:: - ixx_prologue_file () const - { - return this->ixx_prologue_file_; - } - - inline bool options:: - ixx_prologue_file_specified () const - { - return this->ixx_prologue_file_specified_; - } - - inline const NarrowString& options:: - cxx_prologue_file () const - { - return this->cxx_prologue_file_; - } - - inline bool options:: - cxx_prologue_file_specified () const - { - return this->cxx_prologue_file_specified_; - } - - inline const NarrowString& options:: - fwd_prologue_file () const - { - return this->fwd_prologue_file_; - } - - inline bool options:: - fwd_prologue_file_specified () const - { - return this->fwd_prologue_file_specified_; - } - - inline const NarrowString& options:: - prologue_file () const - { - return this->prologue_file_; - } - - inline bool options:: - prologue_file_specified () const - { - return this->prologue_file_specified_; - } - - inline const NarrowString& options:: - hxx_epilogue_file () const - { - return this->hxx_epilogue_file_; - } - - inline bool options:: - hxx_epilogue_file_specified () const - { - return this->hxx_epilogue_file_specified_; - } - - inline const NarrowString& options:: - ixx_epilogue_file () const - { - return this->ixx_epilogue_file_; - } - - inline bool options:: - ixx_epilogue_file_specified () const - { - return this->ixx_epilogue_file_specified_; - } - - inline const NarrowString& options:: - cxx_epilogue_file () const - { - return this->cxx_epilogue_file_; - } - - inline bool options:: - cxx_epilogue_file_specified () const - { - return this->cxx_epilogue_file_specified_; - } - - inline const NarrowString& options:: - fwd_epilogue_file () const - { - return this->fwd_epilogue_file_; - } - - inline bool options:: - fwd_epilogue_file_specified () const - { - return this->fwd_epilogue_file_specified_; - } - - inline const NarrowString& options:: - epilogue_file () const - { - return this->epilogue_file_; - } - - inline bool options:: - epilogue_file_specified () const - { - return this->epilogue_file_specified_; - } - - inline const NarrowString& options:: - export_symbol () const - { - return this->export_symbol_; - } - - inline bool options:: - export_symbol_specified () const - { - return this->export_symbol_specified_; - } - - inline const bool& options:: - export_xml_schema () const - { - return this->export_xml_schema_; - } - - inline const bool& options:: - export_maps () const - { - return this->export_maps_; - } - - inline const bool& options:: - import_maps () const - { - return this->import_maps_; - } - - inline const bool& options:: - generate_dep () const - { - return this->generate_dep_; - } - - inline const bool& options:: - generate_dep_only () const - { - return this->generate_dep_only_; - } - - inline const bool& options:: - dep_phony () const - { - return this->dep_phony_; - } - - inline const NarrowStrings& options:: - dep_target () const - { - return this->dep_target_; - } - - inline bool options:: - dep_target_specified () const - { - return this->dep_target_specified_; - } - - inline const NarrowString& options:: - dep_suffix () const - { - return this->dep_suffix_; - } - - inline bool options:: - dep_suffix_specified () const - { - return this->dep_suffix_specified_; - } - - inline const NarrowString& options:: - dep_file () const - { - return this->dep_file_; - } - - inline bool options:: - dep_file_specified () const - { - return this->dep_file_specified_; - } - - inline const NarrowString& options:: - dep_regex () const - { - return this->dep_regex_; - } - - inline bool options:: - dep_regex_specified () const - { - return this->dep_regex_specified_; - } -} - -// Begin epilogue. -// -// -// End epilogue. diff --git a/xsd/pregenerated/xsd/cxx/parser/options.cxx b/xsd/pregenerated/xsd/cxx/parser/options.cxx deleted file mode 100644 index 60667ac..0000000 --- a/xsd/pregenerated/xsd/cxx/parser/options.cxx +++ /dev/null @@ -1,776 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -#include -// -// End prologue. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace cli -{ - template - struct parser - { - static void - parse (X& x, bool& xs, scanner& s) - { - using namespace std; - - const char* o (s.next ()); - if (s.more ()) - { - string v (s.next ()); - istringstream is (v); - if (!(is >> x && is.peek () == istringstream::traits_type::eof ())) - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (bool& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - const char* v (s.next ()); - - if (std::strcmp (v, "1") == 0 || - std::strcmp (v, "true") == 0 || - std::strcmp (v, "TRUE") == 0 || - std::strcmp (v, "True") == 0) - x = true; - else if (std::strcmp (v, "0") == 0 || - std::strcmp (v, "false") == 0 || - std::strcmp (v, "FALSE") == 0 || - std::strcmp (v, "False") == 0) - x = false; - else - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (std::string& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - x = s.next (); - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::pair& x, bool& xs, scanner& s) - { - x.second = s.position (); - parser::parse (x.first, xs, s); - } - }; - - template - struct parser > - { - static void - parse (std::vector& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.push_back (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::set& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.insert (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::map& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::size_t pos (s.position ()); - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (v, dummy, s); - } - - m[k] = v; - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::multimap& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::size_t pos (s.position ()); - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (v, dummy, s); - } - - m.insert (typename std::multimap::value_type (k, v)); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, s); - } - - template - void - thunk (X& x, scanner& s) - { - s.next (); - x.*M = true; - } - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, x.*S, s); - } -} - -#include - -namespace CXX -{ - namespace Parser - { - // options - // - - options:: - options () - : type_map_ (), - type_map_specified_ (false), - xml_parser_ ("xerces"), - xml_parser_specified_ (false), - generate_validation_ (), - suppress_validation_ (), - generate_polymorphic_ (), - generate_noop_impl_ (), - generate_print_impl_ (), - generate_test_driver_ (), - force_overwrite_ (), - root_element_first_ (), - root_element_last_ (), - root_element_ (), - root_element_specified_ (false), - skel_type_suffix_ ("_pskel"), - skel_type_suffix_specified_ (false), - skel_file_suffix_ ("-pskel"), - skel_file_suffix_specified_ (false), - impl_type_suffix_ ("_pimpl"), - impl_type_suffix_specified_ (false), - impl_file_suffix_ ("-pimpl"), - impl_file_suffix_specified_ (false) - { - } - - options:: - options (int& argc, - char** argv, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : type_map_ (), - type_map_specified_ (false), - xml_parser_ ("xerces"), - xml_parser_specified_ (false), - generate_validation_ (), - suppress_validation_ (), - generate_polymorphic_ (), - generate_noop_impl_ (), - generate_print_impl_ (), - generate_test_driver_ (), - force_overwrite_ (), - root_element_first_ (), - root_element_last_ (), - root_element_ (), - root_element_specified_ (false), - skel_type_suffix_ ("_pskel"), - skel_type_suffix_specified_ (false), - skel_file_suffix_ ("-pskel"), - skel_file_suffix_specified_ (false), - impl_type_suffix_ ("_pimpl"), - impl_type_suffix_specified_ (false), - impl_file_suffix_ ("-pimpl"), - impl_file_suffix_specified_ (false) - { - ::cli::argv_scanner s (argc, argv, erase); - _parse (s, opt, arg); - } - - options:: - options (int start, - int& argc, - char** argv, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : type_map_ (), - type_map_specified_ (false), - xml_parser_ ("xerces"), - xml_parser_specified_ (false), - generate_validation_ (), - suppress_validation_ (), - generate_polymorphic_ (), - generate_noop_impl_ (), - generate_print_impl_ (), - generate_test_driver_ (), - force_overwrite_ (), - root_element_first_ (), - root_element_last_ (), - root_element_ (), - root_element_specified_ (false), - skel_type_suffix_ ("_pskel"), - skel_type_suffix_specified_ (false), - skel_file_suffix_ ("-pskel"), - skel_file_suffix_specified_ (false), - impl_type_suffix_ ("_pimpl"), - impl_type_suffix_specified_ (false), - impl_file_suffix_ ("-pimpl"), - impl_file_suffix_specified_ (false) - { - ::cli::argv_scanner s (start, argc, argv, erase); - _parse (s, opt, arg); - } - - options:: - options (int& argc, - char** argv, - int& end, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : type_map_ (), - type_map_specified_ (false), - xml_parser_ ("xerces"), - xml_parser_specified_ (false), - generate_validation_ (), - suppress_validation_ (), - generate_polymorphic_ (), - generate_noop_impl_ (), - generate_print_impl_ (), - generate_test_driver_ (), - force_overwrite_ (), - root_element_first_ (), - root_element_last_ (), - root_element_ (), - root_element_specified_ (false), - skel_type_suffix_ ("_pskel"), - skel_type_suffix_specified_ (false), - skel_file_suffix_ ("-pskel"), - skel_file_suffix_specified_ (false), - impl_type_suffix_ ("_pimpl"), - impl_type_suffix_specified_ (false), - impl_file_suffix_ ("-pimpl"), - impl_file_suffix_specified_ (false) - { - ::cli::argv_scanner s (argc, argv, erase); - _parse (s, opt, arg); - end = s.end (); - } - - options:: - options (int start, - int& argc, - char** argv, - int& end, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : type_map_ (), - type_map_specified_ (false), - xml_parser_ ("xerces"), - xml_parser_specified_ (false), - generate_validation_ (), - suppress_validation_ (), - generate_polymorphic_ (), - generate_noop_impl_ (), - generate_print_impl_ (), - generate_test_driver_ (), - force_overwrite_ (), - root_element_first_ (), - root_element_last_ (), - root_element_ (), - root_element_specified_ (false), - skel_type_suffix_ ("_pskel"), - skel_type_suffix_specified_ (false), - skel_file_suffix_ ("-pskel"), - skel_file_suffix_specified_ (false), - impl_type_suffix_ ("_pimpl"), - impl_type_suffix_specified_ (false), - impl_file_suffix_ ("-pimpl"), - impl_file_suffix_specified_ (false) - { - ::cli::argv_scanner s (start, argc, argv, erase); - _parse (s, opt, arg); - end = s.end (); - } - - options:: - options (::cli::scanner& s, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : type_map_ (), - type_map_specified_ (false), - xml_parser_ ("xerces"), - xml_parser_specified_ (false), - generate_validation_ (), - suppress_validation_ (), - generate_polymorphic_ (), - generate_noop_impl_ (), - generate_print_impl_ (), - generate_test_driver_ (), - force_overwrite_ (), - root_element_first_ (), - root_element_last_ (), - root_element_ (), - root_element_specified_ (false), - skel_type_suffix_ ("_pskel"), - skel_type_suffix_specified_ (false), - skel_file_suffix_ ("-pskel"), - skel_file_suffix_specified_ (false), - impl_type_suffix_ ("_pimpl"), - impl_type_suffix_specified_ (false), - impl_file_suffix_ ("-pimpl"), - impl_file_suffix_specified_ (false) - { - _parse (s, opt, arg); - } - - ::cli::usage_para options:: - print_usage (::std::wostream& os, ::cli::usage_para p) - { - CLI_POTENTIALLY_UNUSED (os); - - if (p == ::cli::usage_para::text) - os << ::std::endl; - - os << "--type-map Read XML Schema to C++ type mapping information" << ::std::endl - << " from ." << ::std::endl; - - os << "--xml-parser Use as the underlying XML parser." << ::std::endl; - - os << "--generate-validation Generate validation code." << ::std::endl; - - os << "--suppress-validation Suppress the generation of validation code." << ::std::endl; - - os << "--generate-polymorphic Generate polymorphism-aware code." << ::std::endl; - - os << "--generate-noop-impl Generate a sample parser implementation that does" << ::std::endl - << " nothing (no operation)." << ::std::endl; - - os << "--generate-print-impl Generate a sample parser implementation that" << ::std::endl - << " prints the XML data to STDOUT." << ::std::endl; - - os << "--generate-test-driver Generate a test driver for the sample parser" << ::std::endl - << " implementation." << ::std::endl; - - os << "--force-overwrite Force overwriting of the existing implementation" << ::std::endl - << " and test driver files." << ::std::endl; - - os << "--root-element-first Indicate that the first global element is the" << ::std::endl - << " document root." << ::std::endl; - - os << "--root-element-last Indicate that the last global element is the" << ::std::endl - << " document root." << ::std::endl; - - os << "--root-element Indicate that is the document root." << ::std::endl; - - os << "--skel-type-suffix Use the provided instead of the default" << ::std::endl - << " _pskel to construct the names of the generated" << ::std::endl - << " parser skeletons." << ::std::endl; - - os << "--skel-file-suffix Use the provided instead of the default" << ::std::endl - << " -pskel to construct the names of the generated" << ::std::endl - << " parser skeleton files." << ::std::endl; - - os << "--impl-type-suffix Use the provided instead of the default" << ::std::endl - << " _pimpl to construct the names of the parser" << ::std::endl - << " implementations for the built-in XML Schema types" << ::std::endl - << " as well as sample parser implementations." << ::std::endl; - - os << "--impl-file-suffix Use the provided instead of the default" << ::std::endl - << " -pimpl to construct the names of the generated" << ::std::endl - << " sample parser implementation files." << ::std::endl; - - p = ::cli::usage_para::option; - - return p; - } - - typedef - std::map - _cli_options_map; - - static _cli_options_map _cli_options_map_; - - struct _cli_options_map_init - { - _cli_options_map_init () - { - _cli_options_map_["--type-map"] = - &::cli::thunk< options, NarrowStrings, &options::type_map_, - &options::type_map_specified_ >; - _cli_options_map_["--xml-parser"] = - &::cli::thunk< options, NarrowString, &options::xml_parser_, - &options::xml_parser_specified_ >; - _cli_options_map_["--generate-validation"] = - &::cli::thunk< options, &options::generate_validation_ >; - _cli_options_map_["--suppress-validation"] = - &::cli::thunk< options, &options::suppress_validation_ >; - _cli_options_map_["--generate-polymorphic"] = - &::cli::thunk< options, &options::generate_polymorphic_ >; - _cli_options_map_["--generate-noop-impl"] = - &::cli::thunk< options, &options::generate_noop_impl_ >; - _cli_options_map_["--generate-print-impl"] = - &::cli::thunk< options, &options::generate_print_impl_ >; - _cli_options_map_["--generate-test-driver"] = - &::cli::thunk< options, &options::generate_test_driver_ >; - _cli_options_map_["--force-overwrite"] = - &::cli::thunk< options, &options::force_overwrite_ >; - _cli_options_map_["--root-element-first"] = - &::cli::thunk< options, &options::root_element_first_ >; - _cli_options_map_["--root-element-last"] = - &::cli::thunk< options, &options::root_element_last_ >; - _cli_options_map_["--root-element"] = - &::cli::thunk< options, NarrowString, &options::root_element_, - &options::root_element_specified_ >; - _cli_options_map_["--skel-type-suffix"] = - &::cli::thunk< options, NarrowString, &options::skel_type_suffix_, - &options::skel_type_suffix_specified_ >; - _cli_options_map_["--skel-file-suffix"] = - &::cli::thunk< options, NarrowString, &options::skel_file_suffix_, - &options::skel_file_suffix_specified_ >; - _cli_options_map_["--impl-type-suffix"] = - &::cli::thunk< options, NarrowString, &options::impl_type_suffix_, - &options::impl_type_suffix_specified_ >; - _cli_options_map_["--impl-file-suffix"] = - &::cli::thunk< options, NarrowString, &options::impl_file_suffix_, - &options::impl_file_suffix_specified_ >; - } - }; - - static _cli_options_map_init _cli_options_map_init_; - - bool options:: - _parse (const char* o, ::cli::scanner& s) - { - _cli_options_map::const_iterator i (_cli_options_map_.find (o)); - - if (i != _cli_options_map_.end ()) - { - (*(i->second)) (*this, s); - return true; - } - - // options base - // - if (::CXX::options::_parse (o, s)) - return true; - - return false; - } - - bool options:: - _parse (::cli::scanner& s, - ::cli::unknown_mode opt_mode, - ::cli::unknown_mode arg_mode) - { - // Can't skip combined flags (--no-combined-flags). - // - assert (opt_mode != ::cli::unknown_mode::skip); - - bool r = false; - bool opt = true; - - while (s.more ()) - { - const char* o = s.peek (); - - if (std::strcmp (o, "--") == 0) - { - opt = false; - s.skip (); - r = true; - continue; - } - - if (opt) - { - if (_parse (o, s)) - { - r = true; - continue; - } - - if (std::strncmp (o, "-", 1) == 0 && o[1] != '\0') - { - // Handle combined option values. - // - std::string co; - if (const char* v = std::strchr (o, '=')) - { - co.assign (o, 0, v - o); - ++v; - - int ac (2); - char* av[] = - { - const_cast (co.c_str ()), - const_cast (v) - }; - - ::cli::argv_scanner ns (0, ac, av); - - if (_parse (co.c_str (), ns)) - { - // Parsed the option but not its value? - // - if (ns.end () != 2) - throw ::cli::invalid_value (co, v); - - s.next (); - r = true; - continue; - } - else - { - // Set the unknown option and fall through. - // - o = co.c_str (); - } - } - - // Handle combined flags. - // - char cf[3]; - { - const char* p = o + 1; - for (; *p != '\0'; ++p) - { - if (!((*p >= 'a' && *p <= 'z') || - (*p >= 'A' && *p <= 'Z') || - (*p >= '0' && *p <= '9'))) - break; - } - - if (*p == '\0') - { - for (p = o + 1; *p != '\0'; ++p) - { - std::strcpy (cf, "-"); - cf[1] = *p; - cf[2] = '\0'; - - int ac (1); - char* av[] = - { - cf - }; - - ::cli::argv_scanner ns (0, ac, av); - - if (!_parse (cf, ns)) - break; - } - - if (*p == '\0') - { - // All handled. - // - s.next (); - r = true; - continue; - } - else - { - // Set the unknown option and fall through. - // - o = cf; - } - } - } - - switch (opt_mode) - { - case ::cli::unknown_mode::skip: - { - s.skip (); - r = true; - continue; - } - case ::cli::unknown_mode::stop: - { - break; - } - case ::cli::unknown_mode::fail: - { - throw ::cli::unknown_option (o); - } - } - - break; - } - } - - switch (arg_mode) - { - case ::cli::unknown_mode::skip: - { - s.skip (); - r = true; - continue; - } - case ::cli::unknown_mode::stop: - { - break; - } - case ::cli::unknown_mode::fail: - { - throw ::cli::unknown_argument (o); - } - } - - break; - } - - return r; - } - } -} - -// Begin epilogue. -// -// -// End epilogue. - diff --git a/xsd/pregenerated/xsd/cxx/parser/options.hxx b/xsd/pregenerated/xsd/cxx/parser/options.hxx deleted file mode 100644 index 03b67fd..0000000 --- a/xsd/pregenerated/xsd/cxx/parser/options.hxx +++ /dev/null @@ -1,186 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -#ifndef XSD_CXX_PARSER_OPTIONS_HXX -#define XSD_CXX_PARSER_OPTIONS_HXX - -// Begin prologue. -// -// -// End prologue. - -#include - -#include - -#include - -namespace CXX -{ - namespace Parser - { - class options: public ::CXX::options - { - public: - options (); - - options (int& argc, - char** argv, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (int start, - int& argc, - char** argv, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (int& argc, - char** argv, - int& end, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (int start, - int& argc, - char** argv, - int& end, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (::cli::scanner&, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - // Option accessors. - // - const NarrowStrings& - type_map () const; - - bool - type_map_specified () const; - - const NarrowString& - xml_parser () const; - - bool - xml_parser_specified () const; - - const bool& - generate_validation () const; - - const bool& - suppress_validation () const; - - const bool& - generate_polymorphic () const; - - const bool& - generate_noop_impl () const; - - const bool& - generate_print_impl () const; - - const bool& - generate_test_driver () const; - - const bool& - force_overwrite () const; - - const bool& - root_element_first () const; - - const bool& - root_element_last () const; - - const NarrowString& - root_element () const; - - bool - root_element_specified () const; - - const NarrowString& - skel_type_suffix () const; - - bool - skel_type_suffix_specified () const; - - const NarrowString& - skel_file_suffix () const; - - bool - skel_file_suffix_specified () const; - - const NarrowString& - impl_type_suffix () const; - - bool - impl_type_suffix_specified () const; - - const NarrowString& - impl_file_suffix () const; - - bool - impl_file_suffix_specified () const; - - // Print usage information. - // - static ::cli::usage_para - print_usage (::std::wostream&, - ::cli::usage_para = ::cli::usage_para::none); - - // Implementation details. - // - protected: - bool - _parse (const char*, ::cli::scanner&); - - private: - bool - _parse (::cli::scanner&, - ::cli::unknown_mode option, - ::cli::unknown_mode argument); - - public: - NarrowStrings type_map_; - bool type_map_specified_; - NarrowString xml_parser_; - bool xml_parser_specified_; - bool generate_validation_; - bool suppress_validation_; - bool generate_polymorphic_; - bool generate_noop_impl_; - bool generate_print_impl_; - bool generate_test_driver_; - bool force_overwrite_; - bool root_element_first_; - bool root_element_last_; - NarrowString root_element_; - bool root_element_specified_; - NarrowString skel_type_suffix_; - bool skel_type_suffix_specified_; - NarrowString skel_file_suffix_; - bool skel_file_suffix_specified_; - NarrowString impl_type_suffix_; - bool impl_type_suffix_specified_; - NarrowString impl_file_suffix_; - bool impl_file_suffix_specified_; - }; - } -} - -#include - -// Begin epilogue. -// -// -// End epilogue. - -#endif // XSD_CXX_PARSER_OPTIONS_HXX diff --git a/xsd/pregenerated/xsd/cxx/parser/options.ixx b/xsd/pregenerated/xsd/cxx/parser/options.ixx deleted file mode 100644 index 64c00c5..0000000 --- a/xsd/pregenerated/xsd/cxx/parser/options.ixx +++ /dev/null @@ -1,162 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -// -// End prologue. - -namespace CXX -{ - namespace Parser - { - // options - // - - inline const NarrowStrings& options:: - type_map () const - { - return this->type_map_; - } - - inline bool options:: - type_map_specified () const - { - return this->type_map_specified_; - } - - inline const NarrowString& options:: - xml_parser () const - { - return this->xml_parser_; - } - - inline bool options:: - xml_parser_specified () const - { - return this->xml_parser_specified_; - } - - inline const bool& options:: - generate_validation () const - { - return this->generate_validation_; - } - - inline const bool& options:: - suppress_validation () const - { - return this->suppress_validation_; - } - - inline const bool& options:: - generate_polymorphic () const - { - return this->generate_polymorphic_; - } - - inline const bool& options:: - generate_noop_impl () const - { - return this->generate_noop_impl_; - } - - inline const bool& options:: - generate_print_impl () const - { - return this->generate_print_impl_; - } - - inline const bool& options:: - generate_test_driver () const - { - return this->generate_test_driver_; - } - - inline const bool& options:: - force_overwrite () const - { - return this->force_overwrite_; - } - - inline const bool& options:: - root_element_first () const - { - return this->root_element_first_; - } - - inline const bool& options:: - root_element_last () const - { - return this->root_element_last_; - } - - inline const NarrowString& options:: - root_element () const - { - return this->root_element_; - } - - inline bool options:: - root_element_specified () const - { - return this->root_element_specified_; - } - - inline const NarrowString& options:: - skel_type_suffix () const - { - return this->skel_type_suffix_; - } - - inline bool options:: - skel_type_suffix_specified () const - { - return this->skel_type_suffix_specified_; - } - - inline const NarrowString& options:: - skel_file_suffix () const - { - return this->skel_file_suffix_; - } - - inline bool options:: - skel_file_suffix_specified () const - { - return this->skel_file_suffix_specified_; - } - - inline const NarrowString& options:: - impl_type_suffix () const - { - return this->impl_type_suffix_; - } - - inline bool options:: - impl_type_suffix_specified () const - { - return this->impl_type_suffix_specified_; - } - - inline const NarrowString& options:: - impl_file_suffix () const - { - return this->impl_file_suffix_; - } - - inline bool options:: - impl_file_suffix_specified () const - { - return this->impl_file_suffix_specified_; - } - } -} - -// Begin epilogue. -// -// -// End epilogue. diff --git a/xsd/pregenerated/xsd/cxx/tree/options.cxx b/xsd/pregenerated/xsd/cxx/tree/options.cxx deleted file mode 100644 index 17214c1..0000000 --- a/xsd/pregenerated/xsd/cxx/tree/options.cxx +++ /dev/null @@ -1,1343 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -#include -// -// End prologue. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace cli -{ - template - struct parser - { - static void - parse (X& x, bool& xs, scanner& s) - { - using namespace std; - - const char* o (s.next ()); - if (s.more ()) - { - string v (s.next ()); - istringstream is (v); - if (!(is >> x && is.peek () == istringstream::traits_type::eof ())) - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (bool& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - const char* v (s.next ()); - - if (std::strcmp (v, "1") == 0 || - std::strcmp (v, "true") == 0 || - std::strcmp (v, "TRUE") == 0 || - std::strcmp (v, "True") == 0) - x = true; - else if (std::strcmp (v, "0") == 0 || - std::strcmp (v, "false") == 0 || - std::strcmp (v, "FALSE") == 0 || - std::strcmp (v, "False") == 0) - x = false; - else - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (std::string& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - x = s.next (); - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::pair& x, bool& xs, scanner& s) - { - x.second = s.position (); - parser::parse (x.first, xs, s); - } - }; - - template - struct parser > - { - static void - parse (std::vector& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.push_back (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::set& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.insert (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::map& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::size_t pos (s.position ()); - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (v, dummy, s); - } - - m[k] = v; - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::multimap& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::size_t pos (s.position ()); - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av, false, pos); - parser::parse (v, dummy, s); - } - - m.insert (typename std::multimap::value_type (k, v)); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, s); - } - - template - void - thunk (X& x, scanner& s) - { - s.next (); - x.*M = true; - } - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, x.*S, s); - } -} - -#include - -namespace CXX -{ - namespace Tree - { - // options - // - - options:: - options () - : generate_polymorphic_ (), - polymorphic_type_ (), - polymorphic_type_specified_ (false), - polymorphic_type_all_ (), - polymorphic_plate_ (0), - polymorphic_plate_specified_ (false), - ordered_type_ (), - ordered_type_specified_ (false), - ordered_type_derived_ (), - ordered_type_mixed_ (), - ordered_type_all_ (), - order_container_ (), - order_container_specified_ (false), - generate_serialization_ (), - generate_ostream_ (), - generate_doxygen_ (), - generate_comparison_ (), - generate_default_ctor_ (), - generate_from_base_ctor_ (), - suppress_assignment_ (), - generate_detach_ (), - generate_wildcard_ (), - generate_any_type_ (), - generate_insertion_ (), - generate_insertion_specified_ (false), - generate_extraction_ (), - generate_extraction_specified_ (false), - generate_forward_ (), - suppress_parsing_ (), - generate_element_type_ (), - generate_element_map_ (), - generate_intellisense_ (), - omit_default_attributes_ (), - type_naming_ ("knr"), - type_naming_specified_ (false), - function_naming_ ("knr"), - function_naming_specified_ (false), - type_regex_ (), - type_regex_specified_ (false), - accessor_regex_ (), - accessor_regex_specified_ (false), - one_accessor_regex_ (), - one_accessor_regex_specified_ (false), - opt_accessor_regex_ (), - opt_accessor_regex_specified_ (false), - seq_accessor_regex_ (), - seq_accessor_regex_specified_ (false), - modifier_regex_ (), - modifier_regex_specified_ (false), - one_modifier_regex_ (), - one_modifier_regex_specified_ (false), - opt_modifier_regex_ (), - opt_modifier_regex_specified_ (false), - seq_modifier_regex_ (), - seq_modifier_regex_specified_ (false), - parser_regex_ (), - parser_regex_specified_ (false), - serializer_regex_ (), - serializer_regex_specified_ (false), - const_regex_ (), - const_regex_specified_ (false), - enumerator_regex_ (), - enumerator_regex_specified_ (false), - element_type_regex_ (), - element_type_regex_specified_ (false), - name_regex_trace_ (), - root_element_first_ (), - root_element_last_ (), - root_element_all_ (), - root_element_none_ (), - root_element_ (), - root_element_specified_ (false), - custom_type_ (), - custom_type_specified_ (false), - custom_type_regex_ (), - custom_type_regex_specified_ (false), - parts_ (1), - parts_specified_ (false), - parts_suffix_ ("-"), - parts_suffix_specified_ (false) - { - } - - options:: - options (int& argc, - char** argv, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : generate_polymorphic_ (), - polymorphic_type_ (), - polymorphic_type_specified_ (false), - polymorphic_type_all_ (), - polymorphic_plate_ (0), - polymorphic_plate_specified_ (false), - ordered_type_ (), - ordered_type_specified_ (false), - ordered_type_derived_ (), - ordered_type_mixed_ (), - ordered_type_all_ (), - order_container_ (), - order_container_specified_ (false), - generate_serialization_ (), - generate_ostream_ (), - generate_doxygen_ (), - generate_comparison_ (), - generate_default_ctor_ (), - generate_from_base_ctor_ (), - suppress_assignment_ (), - generate_detach_ (), - generate_wildcard_ (), - generate_any_type_ (), - generate_insertion_ (), - generate_insertion_specified_ (false), - generate_extraction_ (), - generate_extraction_specified_ (false), - generate_forward_ (), - suppress_parsing_ (), - generate_element_type_ (), - generate_element_map_ (), - generate_intellisense_ (), - omit_default_attributes_ (), - type_naming_ ("knr"), - type_naming_specified_ (false), - function_naming_ ("knr"), - function_naming_specified_ (false), - type_regex_ (), - type_regex_specified_ (false), - accessor_regex_ (), - accessor_regex_specified_ (false), - one_accessor_regex_ (), - one_accessor_regex_specified_ (false), - opt_accessor_regex_ (), - opt_accessor_regex_specified_ (false), - seq_accessor_regex_ (), - seq_accessor_regex_specified_ (false), - modifier_regex_ (), - modifier_regex_specified_ (false), - one_modifier_regex_ (), - one_modifier_regex_specified_ (false), - opt_modifier_regex_ (), - opt_modifier_regex_specified_ (false), - seq_modifier_regex_ (), - seq_modifier_regex_specified_ (false), - parser_regex_ (), - parser_regex_specified_ (false), - serializer_regex_ (), - serializer_regex_specified_ (false), - const_regex_ (), - const_regex_specified_ (false), - enumerator_regex_ (), - enumerator_regex_specified_ (false), - element_type_regex_ (), - element_type_regex_specified_ (false), - name_regex_trace_ (), - root_element_first_ (), - root_element_last_ (), - root_element_all_ (), - root_element_none_ (), - root_element_ (), - root_element_specified_ (false), - custom_type_ (), - custom_type_specified_ (false), - custom_type_regex_ (), - custom_type_regex_specified_ (false), - parts_ (1), - parts_specified_ (false), - parts_suffix_ ("-"), - parts_suffix_specified_ (false) - { - ::cli::argv_scanner s (argc, argv, erase); - _parse (s, opt, arg); - } - - options:: - options (int start, - int& argc, - char** argv, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : generate_polymorphic_ (), - polymorphic_type_ (), - polymorphic_type_specified_ (false), - polymorphic_type_all_ (), - polymorphic_plate_ (0), - polymorphic_plate_specified_ (false), - ordered_type_ (), - ordered_type_specified_ (false), - ordered_type_derived_ (), - ordered_type_mixed_ (), - ordered_type_all_ (), - order_container_ (), - order_container_specified_ (false), - generate_serialization_ (), - generate_ostream_ (), - generate_doxygen_ (), - generate_comparison_ (), - generate_default_ctor_ (), - generate_from_base_ctor_ (), - suppress_assignment_ (), - generate_detach_ (), - generate_wildcard_ (), - generate_any_type_ (), - generate_insertion_ (), - generate_insertion_specified_ (false), - generate_extraction_ (), - generate_extraction_specified_ (false), - generate_forward_ (), - suppress_parsing_ (), - generate_element_type_ (), - generate_element_map_ (), - generate_intellisense_ (), - omit_default_attributes_ (), - type_naming_ ("knr"), - type_naming_specified_ (false), - function_naming_ ("knr"), - function_naming_specified_ (false), - type_regex_ (), - type_regex_specified_ (false), - accessor_regex_ (), - accessor_regex_specified_ (false), - one_accessor_regex_ (), - one_accessor_regex_specified_ (false), - opt_accessor_regex_ (), - opt_accessor_regex_specified_ (false), - seq_accessor_regex_ (), - seq_accessor_regex_specified_ (false), - modifier_regex_ (), - modifier_regex_specified_ (false), - one_modifier_regex_ (), - one_modifier_regex_specified_ (false), - opt_modifier_regex_ (), - opt_modifier_regex_specified_ (false), - seq_modifier_regex_ (), - seq_modifier_regex_specified_ (false), - parser_regex_ (), - parser_regex_specified_ (false), - serializer_regex_ (), - serializer_regex_specified_ (false), - const_regex_ (), - const_regex_specified_ (false), - enumerator_regex_ (), - enumerator_regex_specified_ (false), - element_type_regex_ (), - element_type_regex_specified_ (false), - name_regex_trace_ (), - root_element_first_ (), - root_element_last_ (), - root_element_all_ (), - root_element_none_ (), - root_element_ (), - root_element_specified_ (false), - custom_type_ (), - custom_type_specified_ (false), - custom_type_regex_ (), - custom_type_regex_specified_ (false), - parts_ (1), - parts_specified_ (false), - parts_suffix_ ("-"), - parts_suffix_specified_ (false) - { - ::cli::argv_scanner s (start, argc, argv, erase); - _parse (s, opt, arg); - } - - options:: - options (int& argc, - char** argv, - int& end, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : generate_polymorphic_ (), - polymorphic_type_ (), - polymorphic_type_specified_ (false), - polymorphic_type_all_ (), - polymorphic_plate_ (0), - polymorphic_plate_specified_ (false), - ordered_type_ (), - ordered_type_specified_ (false), - ordered_type_derived_ (), - ordered_type_mixed_ (), - ordered_type_all_ (), - order_container_ (), - order_container_specified_ (false), - generate_serialization_ (), - generate_ostream_ (), - generate_doxygen_ (), - generate_comparison_ (), - generate_default_ctor_ (), - generate_from_base_ctor_ (), - suppress_assignment_ (), - generate_detach_ (), - generate_wildcard_ (), - generate_any_type_ (), - generate_insertion_ (), - generate_insertion_specified_ (false), - generate_extraction_ (), - generate_extraction_specified_ (false), - generate_forward_ (), - suppress_parsing_ (), - generate_element_type_ (), - generate_element_map_ (), - generate_intellisense_ (), - omit_default_attributes_ (), - type_naming_ ("knr"), - type_naming_specified_ (false), - function_naming_ ("knr"), - function_naming_specified_ (false), - type_regex_ (), - type_regex_specified_ (false), - accessor_regex_ (), - accessor_regex_specified_ (false), - one_accessor_regex_ (), - one_accessor_regex_specified_ (false), - opt_accessor_regex_ (), - opt_accessor_regex_specified_ (false), - seq_accessor_regex_ (), - seq_accessor_regex_specified_ (false), - modifier_regex_ (), - modifier_regex_specified_ (false), - one_modifier_regex_ (), - one_modifier_regex_specified_ (false), - opt_modifier_regex_ (), - opt_modifier_regex_specified_ (false), - seq_modifier_regex_ (), - seq_modifier_regex_specified_ (false), - parser_regex_ (), - parser_regex_specified_ (false), - serializer_regex_ (), - serializer_regex_specified_ (false), - const_regex_ (), - const_regex_specified_ (false), - enumerator_regex_ (), - enumerator_regex_specified_ (false), - element_type_regex_ (), - element_type_regex_specified_ (false), - name_regex_trace_ (), - root_element_first_ (), - root_element_last_ (), - root_element_all_ (), - root_element_none_ (), - root_element_ (), - root_element_specified_ (false), - custom_type_ (), - custom_type_specified_ (false), - custom_type_regex_ (), - custom_type_regex_specified_ (false), - parts_ (1), - parts_specified_ (false), - parts_suffix_ ("-"), - parts_suffix_specified_ (false) - { - ::cli::argv_scanner s (argc, argv, erase); - _parse (s, opt, arg); - end = s.end (); - } - - options:: - options (int start, - int& argc, - char** argv, - int& end, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : generate_polymorphic_ (), - polymorphic_type_ (), - polymorphic_type_specified_ (false), - polymorphic_type_all_ (), - polymorphic_plate_ (0), - polymorphic_plate_specified_ (false), - ordered_type_ (), - ordered_type_specified_ (false), - ordered_type_derived_ (), - ordered_type_mixed_ (), - ordered_type_all_ (), - order_container_ (), - order_container_specified_ (false), - generate_serialization_ (), - generate_ostream_ (), - generate_doxygen_ (), - generate_comparison_ (), - generate_default_ctor_ (), - generate_from_base_ctor_ (), - suppress_assignment_ (), - generate_detach_ (), - generate_wildcard_ (), - generate_any_type_ (), - generate_insertion_ (), - generate_insertion_specified_ (false), - generate_extraction_ (), - generate_extraction_specified_ (false), - generate_forward_ (), - suppress_parsing_ (), - generate_element_type_ (), - generate_element_map_ (), - generate_intellisense_ (), - omit_default_attributes_ (), - type_naming_ ("knr"), - type_naming_specified_ (false), - function_naming_ ("knr"), - function_naming_specified_ (false), - type_regex_ (), - type_regex_specified_ (false), - accessor_regex_ (), - accessor_regex_specified_ (false), - one_accessor_regex_ (), - one_accessor_regex_specified_ (false), - opt_accessor_regex_ (), - opt_accessor_regex_specified_ (false), - seq_accessor_regex_ (), - seq_accessor_regex_specified_ (false), - modifier_regex_ (), - modifier_regex_specified_ (false), - one_modifier_regex_ (), - one_modifier_regex_specified_ (false), - opt_modifier_regex_ (), - opt_modifier_regex_specified_ (false), - seq_modifier_regex_ (), - seq_modifier_regex_specified_ (false), - parser_regex_ (), - parser_regex_specified_ (false), - serializer_regex_ (), - serializer_regex_specified_ (false), - const_regex_ (), - const_regex_specified_ (false), - enumerator_regex_ (), - enumerator_regex_specified_ (false), - element_type_regex_ (), - element_type_regex_specified_ (false), - name_regex_trace_ (), - root_element_first_ (), - root_element_last_ (), - root_element_all_ (), - root_element_none_ (), - root_element_ (), - root_element_specified_ (false), - custom_type_ (), - custom_type_specified_ (false), - custom_type_regex_ (), - custom_type_regex_specified_ (false), - parts_ (1), - parts_specified_ (false), - parts_suffix_ ("-"), - parts_suffix_specified_ (false) - { - ::cli::argv_scanner s (start, argc, argv, erase); - _parse (s, opt, arg); - end = s.end (); - } - - options:: - options (::cli::scanner& s, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) - : generate_polymorphic_ (), - polymorphic_type_ (), - polymorphic_type_specified_ (false), - polymorphic_type_all_ (), - polymorphic_plate_ (0), - polymorphic_plate_specified_ (false), - ordered_type_ (), - ordered_type_specified_ (false), - ordered_type_derived_ (), - ordered_type_mixed_ (), - ordered_type_all_ (), - order_container_ (), - order_container_specified_ (false), - generate_serialization_ (), - generate_ostream_ (), - generate_doxygen_ (), - generate_comparison_ (), - generate_default_ctor_ (), - generate_from_base_ctor_ (), - suppress_assignment_ (), - generate_detach_ (), - generate_wildcard_ (), - generate_any_type_ (), - generate_insertion_ (), - generate_insertion_specified_ (false), - generate_extraction_ (), - generate_extraction_specified_ (false), - generate_forward_ (), - suppress_parsing_ (), - generate_element_type_ (), - generate_element_map_ (), - generate_intellisense_ (), - omit_default_attributes_ (), - type_naming_ ("knr"), - type_naming_specified_ (false), - function_naming_ ("knr"), - function_naming_specified_ (false), - type_regex_ (), - type_regex_specified_ (false), - accessor_regex_ (), - accessor_regex_specified_ (false), - one_accessor_regex_ (), - one_accessor_regex_specified_ (false), - opt_accessor_regex_ (), - opt_accessor_regex_specified_ (false), - seq_accessor_regex_ (), - seq_accessor_regex_specified_ (false), - modifier_regex_ (), - modifier_regex_specified_ (false), - one_modifier_regex_ (), - one_modifier_regex_specified_ (false), - opt_modifier_regex_ (), - opt_modifier_regex_specified_ (false), - seq_modifier_regex_ (), - seq_modifier_regex_specified_ (false), - parser_regex_ (), - parser_regex_specified_ (false), - serializer_regex_ (), - serializer_regex_specified_ (false), - const_regex_ (), - const_regex_specified_ (false), - enumerator_regex_ (), - enumerator_regex_specified_ (false), - element_type_regex_ (), - element_type_regex_specified_ (false), - name_regex_trace_ (), - root_element_first_ (), - root_element_last_ (), - root_element_all_ (), - root_element_none_ (), - root_element_ (), - root_element_specified_ (false), - custom_type_ (), - custom_type_specified_ (false), - custom_type_regex_ (), - custom_type_regex_specified_ (false), - parts_ (1), - parts_specified_ (false), - parts_suffix_ ("-"), - parts_suffix_specified_ (false) - { - _parse (s, opt, arg); - } - - ::cli::usage_para options:: - print_usage (::std::wostream& os, ::cli::usage_para p) - { - CLI_POTENTIALLY_UNUSED (os); - - if (p == ::cli::usage_para::text) - os << ::std::endl; - - os << "--generate-polymorphic Generate polymorphism-aware code." << ::std::endl; - - os << "--polymorphic-type Indicate that is a root of a polymorphic" << ::std::endl - << " type hierarchy." << ::std::endl; - - os << "--polymorphic-type-all Indicate that all types should be treated as" << ::std::endl - << " polymorphic." << ::std::endl; - - os << "--polymorphic-plate Specify the polymorphic map plate the generated" << ::std::endl - << " code should register on." << ::std::endl; - - os << "--ordered-type Indicate that element order in is" << ::std::endl - << " significant." << ::std::endl; - - os << "--ordered-type-derived Automatically treat types derived from ordered" << ::std::endl - << " bases as also ordered." << ::std::endl; - - os << "--ordered-type-mixed Automatically treat complex types with mixed" << ::std::endl - << " content as ordered." << ::std::endl; - - os << "--ordered-type-all Indicate that element order in all types is" << ::std::endl - << " significant." << ::std::endl; - - os << "--order-container Specify a custom class template that should be" << ::std::endl - << " used as a container for the content order in" << ::std::endl - << " ordered types instead of the default std::vector." << ::std::endl; - - os << "--generate-serialization Generate serialization functions." << ::std::endl; - - os << "--generate-ostream Generate ostream insertion operators (operator<<)" << ::std::endl - << " for generated types." << ::std::endl; - - os << "--generate-doxygen Generate documentation comments suitable for" << ::std::endl - << " extraction by the Doxygen documentation system." << ::std::endl; - - os << "--generate-comparison Generate comparison operators (operator== and" << ::std::endl - << " operator!=) for complex types." << ::std::endl; - - os << "--generate-default-ctor Generate default constructors even for types that" << ::std::endl - << " have required members." << ::std::endl; - - os << "--generate-from-base-ctor Generate constructors that expect an instance of a" << ::std::endl - << " base type followed by all required members." << ::std::endl; - - os << "--suppress-assignment Suppress the generation of copy assignment" << ::std::endl - << " operators for complex types." << ::std::endl; - - os << "--generate-detach Generate detach functions for required elements" << ::std::endl - << " and attributes." << ::std::endl; - - os << "--generate-wildcard Generate accessors and modifiers as well as" << ::std::endl - << " parsing and serialization code for XML Schema" << ::std::endl - << " wildcards (any and anyAttribute)." << ::std::endl; - - os << "--generate-any-type Extract and store content of the XML Schema" << ::std::endl - << " anyType type as a DOM fragment." << ::std::endl; - - os << "--generate-insertion Generate data representation stream insertion" << ::std::endl - << " operators for the output stream type." << ::std::endl; - - os << "--generate-extraction Generate data representation stream extraction" << ::std::endl - << " constructors for the input stream type." << ::std::endl; - - os << "--generate-forward Generate a separate header file with forward" << ::std::endl - << " declarations for the types being generated." << ::std::endl; - - os << "--suppress-parsing Suppress the generation of the parsing functions" << ::std::endl - << " and constructors." << ::std::endl; - - os << "--generate-element-type Generate types instead of parsing and" << ::std::endl - << " serialization functions for root elements." << ::std::endl; - - os << "--generate-element-map Generate a root element map that allows uniform" << ::std::endl - << " parsing and serialization of multiple root" << ::std::endl - << " elements." << ::std::endl; - - os << "--generate-intellisense Generate workarounds for IntelliSense bugs in" << ::std::endl - << " Visual Studio 2005 (8.0)." << ::std::endl; - - os << "--omit-default-attributes Omit attributes with default and fixed values from" << ::std::endl - << " serialized XML documents." << ::std::endl; - - os << "--type-naming