summaryrefslogtreecommitdiff
path: root/xsd/xsd/cxx/tree
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-11-19 21:57:02 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-11-19 21:57:02 +0300
commit1494877a56f9034d5a0218cc02128ef015e1fc23 (patch)
tree8818e7744d7e58eee289c89a0bcc16bf9421c544 /xsd/xsd/cxx/tree
parent2f0f77b511a3dae214d084105a4277ea0009300b (diff)
Make changes required for CI
Diffstat (limited to 'xsd/xsd/cxx/tree')
-rw-r--r--xsd/xsd/cxx/tree/options.cxx1264
-rw-r--r--xsd/xsd/cxx/tree/options.hxx414
-rw-r--r--xsd/xsd/cxx/tree/options.ixx504
3 files changed, 2182 insertions, 0 deletions
diff --git a/xsd/xsd/cxx/tree/options.cxx b/xsd/xsd/cxx/tree/options.cxx
new file mode 100644
index 0000000..481e2ea
--- /dev/null
+++ b/xsd/xsd/cxx/tree/options.cxx
@@ -0,0 +1,1264 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+#include <xsd/options-parser.hxx>
+//
+// End prologue.
+
+#include <xsd/cxx/tree/options.hxx>
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+#include <utility>
+#include <ostream>
+#include <sstream>
+
+namespace cli
+{
+ template <typename X>
+ 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<bool>
+ {
+ static void
+ parse (bool& x, scanner& s)
+ {
+ s.next ();
+ x = true;
+ }
+ };
+
+ template <>
+ struct parser<std::string>
+ {
+ 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 <typename X>
+ struct parser<std::pair<X, std::size_t> >
+ {
+ static void
+ parse (std::pair<X, std::size_t>& x, bool& xs, scanner& s)
+ {
+ x.second = s.position ();
+ parser<X>::parse (x.first, xs, s);
+ }
+ };
+
+ template <typename X>
+ struct parser<std::vector<X> >
+ {
+ static void
+ parse (std::vector<X>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.push_back (x);
+ xs = true;
+ }
+ };
+
+ template <typename X, typename C>
+ struct parser<std::set<X, C> >
+ {
+ static void
+ parse (std::set<X, C>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.insert (x);
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::map<K, V, C> >
+ {
+ static void
+ parse (std::map<K, V, C>& 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<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m[k] = v;
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X, typename T, T X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, s);
+ }
+
+ template <typename X, typename T, T X::*M, bool X::*S>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, x.*S, s);
+ }
+}
+
+#include <map>
+#include <cstring>
+
+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 <type> Indicate that <type> 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 <num> Specify the polymorphic map plate the generated" << ::std::endl
+ << " code should register on." << ::std::endl;
+
+ os << "--ordered-type <type> Indicate that element order in <type> 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 <type> 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 <os> Generate data representation stream insertion" << ::std::endl
+ << " operators for the <os> output stream type." << ::std::endl;
+
+ os << "--generate-extraction <is> Generate data representation stream extraction" << ::std::endl
+ << " constructors for the <is> 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 <style> Specify the type naming convention that should be" << ::std::endl
+ << " used in the generated code." << ::std::endl;
+
+ os << "--function-naming <style> Specify the function naming convention that should" << ::std::endl
+ << " be used in the generated code." << ::std::endl;
+
+ os << "--type-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema type names to C++" << ::std::endl
+ << " type names." << ::std::endl;
+
+ os << "--accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes to C++ accessor function" << ::std::endl
+ << " names." << ::std::endl;
+
+ os << "--one-accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality one to C++" << ::std::endl
+ << " accessor function names." << ::std::endl;
+
+ os << "--opt-accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality optional to" << ::std::endl
+ << " C++ accessor function names." << ::std::endl;
+
+ os << "--seq-accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality sequence to" << ::std::endl
+ << " C++ accessor function names." << ::std::endl;
+
+ os << "--modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes to C++ modifier function" << ::std::endl
+ << " names." << ::std::endl;
+
+ os << "--one-modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality one to C++" << ::std::endl
+ << " modifier function names." << ::std::endl;
+
+ os << "--opt-modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality optional to" << ::std::endl
+ << " C++ modifier function names." << ::std::endl;
+
+ os << "--seq-modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality sequence to" << ::std::endl
+ << " C++ modifier function names." << ::std::endl;
+
+ os << "--parser-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema element names to C++" << ::std::endl
+ << " parsing function names." << ::std::endl;
+
+ os << "--serializer-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema element names to C++" << ::std::endl
+ << " serialization function names." << ::std::endl;
+
+ os << "--const-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema-derived names to C++" << ::std::endl
+ << " constant names." << ::std::endl;
+
+ os << "--enumerator-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema enumeration values to" << ::std::endl
+ << " C++ enumerator names." << ::std::endl;
+
+ os << "--element-type-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema element names to C++" << ::std::endl
+ << " element type names." << ::std::endl;
+
+ os << "--name-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the name transformation options." << ::std::endl;
+
+ os << "--root-element-first Treat only the first global element as a document" << ::std::endl
+ << " root." << ::std::endl;
+
+ os << "--root-element-last Treat only the last global element as a document" << ::std::endl
+ << " root." << ::std::endl;
+
+ os << "--root-element-all Treat all global elements as document roots." << ::std::endl;
+
+ os << "--root-element-none Do not treat any global elements as document" << ::std::endl
+ << " roots." << ::std::endl;
+
+ os << "--root-element <element> Treat only <element> as a document root." << ::std::endl;
+
+ os << "--custom-type <map> Use a custom C++ type instead of the generated" << ::std::endl
+ << " class." << ::std::endl;
+
+ os << "--custom-type-regex <regex> Use custom C++ types instead of the generated" << ::std::endl
+ << " classes." << ::std::endl;
+
+ os << "--parts <num> Split generated source code into <num> parts." << ::std::endl;
+
+ os << "--parts-suffix <suffix> Use <suffix> instead of the default '-' to" << ::std::endl
+ << " separate the file name from the part number." << ::std::endl;
+
+ p = ::cli::usage_para::option;
+
+ return p;
+ }
+
+ typedef
+ std::map<std::string, void (*) (options&, ::cli::scanner&)>
+ _cli_options_map;
+
+ static _cli_options_map _cli_options_map_;
+
+ struct _cli_options_map_init
+ {
+ _cli_options_map_init ()
+ {
+ _cli_options_map_["--generate-polymorphic"] =
+ &::cli::thunk< options, bool, &options::generate_polymorphic_ >;
+ _cli_options_map_["--polymorphic-type"] =
+ &::cli::thunk< options, NarrowStrings, &options::polymorphic_type_,
+ &options::polymorphic_type_specified_ >;
+ _cli_options_map_["--polymorphic-type-all"] =
+ &::cli::thunk< options, bool, &options::polymorphic_type_all_ >;
+ _cli_options_map_["--polymorphic-plate"] =
+ &::cli::thunk< options, unsigned long, &options::polymorphic_plate_,
+ &options::polymorphic_plate_specified_ >;
+ _cli_options_map_["--ordered-type"] =
+ &::cli::thunk< options, NarrowStrings, &options::ordered_type_,
+ &options::ordered_type_specified_ >;
+ _cli_options_map_["--ordered-type-derived"] =
+ &::cli::thunk< options, bool, &options::ordered_type_derived_ >;
+ _cli_options_map_["--ordered-type-mixed"] =
+ &::cli::thunk< options, bool, &options::ordered_type_mixed_ >;
+ _cli_options_map_["--ordered-type-all"] =
+ &::cli::thunk< options, bool, &options::ordered_type_all_ >;
+ _cli_options_map_["--order-container"] =
+ &::cli::thunk< options, NarrowString, &options::order_container_,
+ &options::order_container_specified_ >;
+ _cli_options_map_["--generate-serialization"] =
+ &::cli::thunk< options, bool, &options::generate_serialization_ >;
+ _cli_options_map_["--generate-ostream"] =
+ &::cli::thunk< options, bool, &options::generate_ostream_ >;
+ _cli_options_map_["--generate-doxygen"] =
+ &::cli::thunk< options, bool, &options::generate_doxygen_ >;
+ _cli_options_map_["--generate-comparison"] =
+ &::cli::thunk< options, bool, &options::generate_comparison_ >;
+ _cli_options_map_["--generate-default-ctor"] =
+ &::cli::thunk< options, bool, &options::generate_default_ctor_ >;
+ _cli_options_map_["--generate-from-base-ctor"] =
+ &::cli::thunk< options, bool, &options::generate_from_base_ctor_ >;
+ _cli_options_map_["--suppress-assignment"] =
+ &::cli::thunk< options, bool, &options::suppress_assignment_ >;
+ _cli_options_map_["--generate-detach"] =
+ &::cli::thunk< options, bool, &options::generate_detach_ >;
+ _cli_options_map_["--generate-wildcard"] =
+ &::cli::thunk< options, bool, &options::generate_wildcard_ >;
+ _cli_options_map_["--generate-any-type"] =
+ &::cli::thunk< options, bool, &options::generate_any_type_ >;
+ _cli_options_map_["--generate-insertion"] =
+ &::cli::thunk< options, NarrowStrings, &options::generate_insertion_,
+ &options::generate_insertion_specified_ >;
+ _cli_options_map_["--generate-extraction"] =
+ &::cli::thunk< options, NarrowStrings, &options::generate_extraction_,
+ &options::generate_extraction_specified_ >;
+ _cli_options_map_["--generate-forward"] =
+ &::cli::thunk< options, bool, &options::generate_forward_ >;
+ _cli_options_map_["--suppress-parsing"] =
+ &::cli::thunk< options, bool, &options::suppress_parsing_ >;
+ _cli_options_map_["--generate-element-type"] =
+ &::cli::thunk< options, bool, &options::generate_element_type_ >;
+ _cli_options_map_["--generate-element-map"] =
+ &::cli::thunk< options, bool, &options::generate_element_map_ >;
+ _cli_options_map_["--generate-intellisense"] =
+ &::cli::thunk< options, bool, &options::generate_intellisense_ >;
+ _cli_options_map_["--omit-default-attributes"] =
+ &::cli::thunk< options, bool, &options::omit_default_attributes_ >;
+ _cli_options_map_["--type-naming"] =
+ &::cli::thunk< options, NarrowString, &options::type_naming_,
+ &options::type_naming_specified_ >;
+ _cli_options_map_["--function-naming"] =
+ &::cli::thunk< options, NarrowString, &options::function_naming_,
+ &options::function_naming_specified_ >;
+ _cli_options_map_["--type-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::type_regex_,
+ &options::type_regex_specified_ >;
+ _cli_options_map_["--accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::accessor_regex_,
+ &options::accessor_regex_specified_ >;
+ _cli_options_map_["--one-accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::one_accessor_regex_,
+ &options::one_accessor_regex_specified_ >;
+ _cli_options_map_["--opt-accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::opt_accessor_regex_,
+ &options::opt_accessor_regex_specified_ >;
+ _cli_options_map_["--seq-accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::seq_accessor_regex_,
+ &options::seq_accessor_regex_specified_ >;
+ _cli_options_map_["--modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::modifier_regex_,
+ &options::modifier_regex_specified_ >;
+ _cli_options_map_["--one-modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::one_modifier_regex_,
+ &options::one_modifier_regex_specified_ >;
+ _cli_options_map_["--opt-modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::opt_modifier_regex_,
+ &options::opt_modifier_regex_specified_ >;
+ _cli_options_map_["--seq-modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::seq_modifier_regex_,
+ &options::seq_modifier_regex_specified_ >;
+ _cli_options_map_["--parser-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::parser_regex_,
+ &options::parser_regex_specified_ >;
+ _cli_options_map_["--serializer-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::serializer_regex_,
+ &options::serializer_regex_specified_ >;
+ _cli_options_map_["--const-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::const_regex_,
+ &options::const_regex_specified_ >;
+ _cli_options_map_["--enumerator-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::enumerator_regex_,
+ &options::enumerator_regex_specified_ >;
+ _cli_options_map_["--element-type-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::element_type_regex_,
+ &options::element_type_regex_specified_ >;
+ _cli_options_map_["--name-regex-trace"] =
+ &::cli::thunk< options, bool, &options::name_regex_trace_ >;
+ _cli_options_map_["--root-element-first"] =
+ &::cli::thunk< options, bool, &options::root_element_first_ >;
+ _cli_options_map_["--root-element-last"] =
+ &::cli::thunk< options, bool, &options::root_element_last_ >;
+ _cli_options_map_["--root-element-all"] =
+ &::cli::thunk< options, bool, &options::root_element_all_ >;
+ _cli_options_map_["--root-element-none"] =
+ &::cli::thunk< options, bool, &options::root_element_none_ >;
+ _cli_options_map_["--root-element"] =
+ &::cli::thunk< options, NarrowStrings, &options::root_element_,
+ &options::root_element_specified_ >;
+ _cli_options_map_["--custom-type"] =
+ &::cli::thunk< options, NarrowStrings, &options::custom_type_,
+ &options::custom_type_specified_ >;
+ _cli_options_map_["--custom-type-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::custom_type_regex_,
+ &options::custom_type_regex_specified_ >;
+ _cli_options_map_["--parts"] =
+ &::cli::thunk< options, std::size_t, &options::parts_,
+ &options::parts_specified_ >;
+ _cli_options_map_["--parts-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::parts_suffix_,
+ &options::parts_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<char*> (co.c_str ()),
+ const_cast<char*> (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/xsd/cxx/tree/options.hxx b/xsd/xsd/cxx/tree/options.hxx
new file mode 100644
index 0000000..f5a808c
--- /dev/null
+++ b/xsd/xsd/cxx/tree/options.hxx
@@ -0,0 +1,414 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+#ifndef XSD_CXX_TREE_OPTIONS_HXX
+#define XSD_CXX_TREE_OPTIONS_HXX
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <cstddef>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ 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 bool&
+ generate_polymorphic () const;
+
+ const NarrowStrings&
+ polymorphic_type () const;
+
+ bool
+ polymorphic_type_specified () const;
+
+ const bool&
+ polymorphic_type_all () const;
+
+ const unsigned long&
+ polymorphic_plate () const;
+
+ bool
+ polymorphic_plate_specified () const;
+
+ const NarrowStrings&
+ ordered_type () const;
+
+ bool
+ ordered_type_specified () const;
+
+ const bool&
+ ordered_type_derived () const;
+
+ const bool&
+ ordered_type_mixed () const;
+
+ const bool&
+ ordered_type_all () const;
+
+ const NarrowString&
+ order_container () const;
+
+ bool
+ order_container_specified () const;
+
+ const bool&
+ generate_serialization () const;
+
+ const bool&
+ generate_ostream () const;
+
+ const bool&
+ generate_doxygen () const;
+
+ const bool&
+ generate_comparison () const;
+
+ const bool&
+ generate_default_ctor () const;
+
+ const bool&
+ generate_from_base_ctor () const;
+
+ const bool&
+ suppress_assignment () const;
+
+ const bool&
+ generate_detach () const;
+
+ const bool&
+ generate_wildcard () const;
+
+ const bool&
+ generate_any_type () const;
+
+ const NarrowStrings&
+ generate_insertion () const;
+
+ bool
+ generate_insertion_specified () const;
+
+ const NarrowStrings&
+ generate_extraction () const;
+
+ bool
+ generate_extraction_specified () const;
+
+ const bool&
+ generate_forward () const;
+
+ const bool&
+ suppress_parsing () const;
+
+ const bool&
+ generate_element_type () const;
+
+ const bool&
+ generate_element_map () const;
+
+ const bool&
+ generate_intellisense () const;
+
+ const bool&
+ omit_default_attributes () const;
+
+ const NarrowString&
+ type_naming () const;
+
+ bool
+ type_naming_specified () const;
+
+ const NarrowString&
+ function_naming () const;
+
+ bool
+ function_naming_specified () const;
+
+ const NarrowStrings&
+ type_regex () const;
+
+ bool
+ type_regex_specified () const;
+
+ const NarrowStrings&
+ accessor_regex () const;
+
+ bool
+ accessor_regex_specified () const;
+
+ const NarrowStrings&
+ one_accessor_regex () const;
+
+ bool
+ one_accessor_regex_specified () const;
+
+ const NarrowStrings&
+ opt_accessor_regex () const;
+
+ bool
+ opt_accessor_regex_specified () const;
+
+ const NarrowStrings&
+ seq_accessor_regex () const;
+
+ bool
+ seq_accessor_regex_specified () const;
+
+ const NarrowStrings&
+ modifier_regex () const;
+
+ bool
+ modifier_regex_specified () const;
+
+ const NarrowStrings&
+ one_modifier_regex () const;
+
+ bool
+ one_modifier_regex_specified () const;
+
+ const NarrowStrings&
+ opt_modifier_regex () const;
+
+ bool
+ opt_modifier_regex_specified () const;
+
+ const NarrowStrings&
+ seq_modifier_regex () const;
+
+ bool
+ seq_modifier_regex_specified () const;
+
+ const NarrowStrings&
+ parser_regex () const;
+
+ bool
+ parser_regex_specified () const;
+
+ const NarrowStrings&
+ serializer_regex () const;
+
+ bool
+ serializer_regex_specified () const;
+
+ const NarrowStrings&
+ const_regex () const;
+
+ bool
+ const_regex_specified () const;
+
+ const NarrowStrings&
+ enumerator_regex () const;
+
+ bool
+ enumerator_regex_specified () const;
+
+ const NarrowStrings&
+ element_type_regex () const;
+
+ bool
+ element_type_regex_specified () const;
+
+ const bool&
+ name_regex_trace () const;
+
+ const bool&
+ root_element_first () const;
+
+ const bool&
+ root_element_last () const;
+
+ const bool&
+ root_element_all () const;
+
+ const bool&
+ root_element_none () const;
+
+ const NarrowStrings&
+ root_element () const;
+
+ bool
+ root_element_specified () const;
+
+ const NarrowStrings&
+ custom_type () const;
+
+ bool
+ custom_type_specified () const;
+
+ const NarrowStrings&
+ custom_type_regex () const;
+
+ bool
+ custom_type_regex_specified () const;
+
+ const std::size_t&
+ parts () const;
+
+ bool
+ parts_specified () const;
+
+ const NarrowString&
+ parts_suffix () const;
+
+ bool
+ parts_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:
+ bool generate_polymorphic_;
+ NarrowStrings polymorphic_type_;
+ bool polymorphic_type_specified_;
+ bool polymorphic_type_all_;
+ unsigned long polymorphic_plate_;
+ bool polymorphic_plate_specified_;
+ NarrowStrings ordered_type_;
+ bool ordered_type_specified_;
+ bool ordered_type_derived_;
+ bool ordered_type_mixed_;
+ bool ordered_type_all_;
+ NarrowString order_container_;
+ bool order_container_specified_;
+ bool generate_serialization_;
+ bool generate_ostream_;
+ bool generate_doxygen_;
+ bool generate_comparison_;
+ bool generate_default_ctor_;
+ bool generate_from_base_ctor_;
+ bool suppress_assignment_;
+ bool generate_detach_;
+ bool generate_wildcard_;
+ bool generate_any_type_;
+ NarrowStrings generate_insertion_;
+ bool generate_insertion_specified_;
+ NarrowStrings generate_extraction_;
+ bool generate_extraction_specified_;
+ bool generate_forward_;
+ bool suppress_parsing_;
+ bool generate_element_type_;
+ bool generate_element_map_;
+ bool generate_intellisense_;
+ bool omit_default_attributes_;
+ NarrowString type_naming_;
+ bool type_naming_specified_;
+ NarrowString function_naming_;
+ bool function_naming_specified_;
+ NarrowStrings type_regex_;
+ bool type_regex_specified_;
+ NarrowStrings accessor_regex_;
+ bool accessor_regex_specified_;
+ NarrowStrings one_accessor_regex_;
+ bool one_accessor_regex_specified_;
+ NarrowStrings opt_accessor_regex_;
+ bool opt_accessor_regex_specified_;
+ NarrowStrings seq_accessor_regex_;
+ bool seq_accessor_regex_specified_;
+ NarrowStrings modifier_regex_;
+ bool modifier_regex_specified_;
+ NarrowStrings one_modifier_regex_;
+ bool one_modifier_regex_specified_;
+ NarrowStrings opt_modifier_regex_;
+ bool opt_modifier_regex_specified_;
+ NarrowStrings seq_modifier_regex_;
+ bool seq_modifier_regex_specified_;
+ NarrowStrings parser_regex_;
+ bool parser_regex_specified_;
+ NarrowStrings serializer_regex_;
+ bool serializer_regex_specified_;
+ NarrowStrings const_regex_;
+ bool const_regex_specified_;
+ NarrowStrings enumerator_regex_;
+ bool enumerator_regex_specified_;
+ NarrowStrings element_type_regex_;
+ bool element_type_regex_specified_;
+ bool name_regex_trace_;
+ bool root_element_first_;
+ bool root_element_last_;
+ bool root_element_all_;
+ bool root_element_none_;
+ NarrowStrings root_element_;
+ bool root_element_specified_;
+ NarrowStrings custom_type_;
+ bool custom_type_specified_;
+ NarrowStrings custom_type_regex_;
+ bool custom_type_regex_specified_;
+ std::size_t parts_;
+ bool parts_specified_;
+ NarrowString parts_suffix_;
+ bool parts_suffix_specified_;
+ };
+ }
+}
+
+#include <xsd/cxx/tree/options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // XSD_CXX_TREE_OPTIONS_HXX
diff --git a/xsd/xsd/cxx/tree/options.ixx b/xsd/xsd/cxx/tree/options.ixx
new file mode 100644
index 0000000..4d34fd9
--- /dev/null
+++ b/xsd/xsd/cxx/tree/options.ixx
@@ -0,0 +1,504 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+namespace CXX
+{
+ namespace Tree
+ {
+ // options
+ //
+
+ inline const bool& options::
+ generate_polymorphic () const
+ {
+ return this->generate_polymorphic_;
+ }
+
+ inline const NarrowStrings& options::
+ polymorphic_type () const
+ {
+ return this->polymorphic_type_;
+ }
+
+ inline bool options::
+ polymorphic_type_specified () const
+ {
+ return this->polymorphic_type_specified_;
+ }
+
+ inline const bool& options::
+ polymorphic_type_all () const
+ {
+ return this->polymorphic_type_all_;
+ }
+
+ inline const unsigned long& options::
+ polymorphic_plate () const
+ {
+ return this->polymorphic_plate_;
+ }
+
+ inline bool options::
+ polymorphic_plate_specified () const
+ {
+ return this->polymorphic_plate_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ ordered_type () const
+ {
+ return this->ordered_type_;
+ }
+
+ inline bool options::
+ ordered_type_specified () const
+ {
+ return this->ordered_type_specified_;
+ }
+
+ inline const bool& options::
+ ordered_type_derived () const
+ {
+ return this->ordered_type_derived_;
+ }
+
+ inline const bool& options::
+ ordered_type_mixed () const
+ {
+ return this->ordered_type_mixed_;
+ }
+
+ inline const bool& options::
+ ordered_type_all () const
+ {
+ return this->ordered_type_all_;
+ }
+
+ inline const NarrowString& options::
+ order_container () const
+ {
+ return this->order_container_;
+ }
+
+ inline bool options::
+ order_container_specified () const
+ {
+ return this->order_container_specified_;
+ }
+
+ inline const bool& options::
+ generate_serialization () const
+ {
+ return this->generate_serialization_;
+ }
+
+ inline const bool& options::
+ generate_ostream () const
+ {
+ return this->generate_ostream_;
+ }
+
+ inline const bool& options::
+ generate_doxygen () const
+ {
+ return this->generate_doxygen_;
+ }
+
+ inline const bool& options::
+ generate_comparison () const
+ {
+ return this->generate_comparison_;
+ }
+
+ inline const bool& options::
+ generate_default_ctor () const
+ {
+ return this->generate_default_ctor_;
+ }
+
+ inline const bool& options::
+ generate_from_base_ctor () const
+ {
+ return this->generate_from_base_ctor_;
+ }
+
+ inline const bool& options::
+ suppress_assignment () const
+ {
+ return this->suppress_assignment_;
+ }
+
+ inline const bool& options::
+ generate_detach () const
+ {
+ return this->generate_detach_;
+ }
+
+ inline const bool& options::
+ generate_wildcard () const
+ {
+ return this->generate_wildcard_;
+ }
+
+ inline const bool& options::
+ generate_any_type () const
+ {
+ return this->generate_any_type_;
+ }
+
+ inline const NarrowStrings& options::
+ generate_insertion () const
+ {
+ return this->generate_insertion_;
+ }
+
+ inline bool options::
+ generate_insertion_specified () const
+ {
+ return this->generate_insertion_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ generate_extraction () const
+ {
+ return this->generate_extraction_;
+ }
+
+ inline bool options::
+ generate_extraction_specified () const
+ {
+ return this->generate_extraction_specified_;
+ }
+
+ inline const bool& options::
+ generate_forward () const
+ {
+ return this->generate_forward_;
+ }
+
+ inline const bool& options::
+ suppress_parsing () const
+ {
+ return this->suppress_parsing_;
+ }
+
+ inline const bool& options::
+ generate_element_type () const
+ {
+ return this->generate_element_type_;
+ }
+
+ inline const bool& options::
+ generate_element_map () const
+ {
+ return this->generate_element_map_;
+ }
+
+ inline const bool& options::
+ generate_intellisense () const
+ {
+ return this->generate_intellisense_;
+ }
+
+ inline const bool& options::
+ omit_default_attributes () const
+ {
+ return this->omit_default_attributes_;
+ }
+
+ inline const NarrowString& options::
+ type_naming () const
+ {
+ return this->type_naming_;
+ }
+
+ inline bool options::
+ type_naming_specified () const
+ {
+ return this->type_naming_specified_;
+ }
+
+ inline const NarrowString& options::
+ function_naming () const
+ {
+ return this->function_naming_;
+ }
+
+ inline bool options::
+ function_naming_specified () const
+ {
+ return this->function_naming_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ type_regex () const
+ {
+ return this->type_regex_;
+ }
+
+ inline bool options::
+ type_regex_specified () const
+ {
+ return this->type_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ accessor_regex () const
+ {
+ return this->accessor_regex_;
+ }
+
+ inline bool options::
+ accessor_regex_specified () const
+ {
+ return this->accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ one_accessor_regex () const
+ {
+ return this->one_accessor_regex_;
+ }
+
+ inline bool options::
+ one_accessor_regex_specified () const
+ {
+ return this->one_accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ opt_accessor_regex () const
+ {
+ return this->opt_accessor_regex_;
+ }
+
+ inline bool options::
+ opt_accessor_regex_specified () const
+ {
+ return this->opt_accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ seq_accessor_regex () const
+ {
+ return this->seq_accessor_regex_;
+ }
+
+ inline bool options::
+ seq_accessor_regex_specified () const
+ {
+ return this->seq_accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ modifier_regex () const
+ {
+ return this->modifier_regex_;
+ }
+
+ inline bool options::
+ modifier_regex_specified () const
+ {
+ return this->modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ one_modifier_regex () const
+ {
+ return this->one_modifier_regex_;
+ }
+
+ inline bool options::
+ one_modifier_regex_specified () const
+ {
+ return this->one_modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ opt_modifier_regex () const
+ {
+ return this->opt_modifier_regex_;
+ }
+
+ inline bool options::
+ opt_modifier_regex_specified () const
+ {
+ return this->opt_modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ seq_modifier_regex () const
+ {
+ return this->seq_modifier_regex_;
+ }
+
+ inline bool options::
+ seq_modifier_regex_specified () const
+ {
+ return this->seq_modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ parser_regex () const
+ {
+ return this->parser_regex_;
+ }
+
+ inline bool options::
+ parser_regex_specified () const
+ {
+ return this->parser_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ serializer_regex () const
+ {
+ return this->serializer_regex_;
+ }
+
+ inline bool options::
+ serializer_regex_specified () const
+ {
+ return this->serializer_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ const_regex () const
+ {
+ return this->const_regex_;
+ }
+
+ inline bool options::
+ const_regex_specified () const
+ {
+ return this->const_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ enumerator_regex () const
+ {
+ return this->enumerator_regex_;
+ }
+
+ inline bool options::
+ enumerator_regex_specified () const
+ {
+ return this->enumerator_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ element_type_regex () const
+ {
+ return this->element_type_regex_;
+ }
+
+ inline bool options::
+ element_type_regex_specified () const
+ {
+ return this->element_type_regex_specified_;
+ }
+
+ inline const bool& options::
+ name_regex_trace () const
+ {
+ return this->name_regex_trace_;
+ }
+
+ 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 bool& options::
+ root_element_all () const
+ {
+ return this->root_element_all_;
+ }
+
+ inline const bool& options::
+ root_element_none () const
+ {
+ return this->root_element_none_;
+ }
+
+ inline const NarrowStrings& options::
+ root_element () const
+ {
+ return this->root_element_;
+ }
+
+ inline bool options::
+ root_element_specified () const
+ {
+ return this->root_element_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ custom_type () const
+ {
+ return this->custom_type_;
+ }
+
+ inline bool options::
+ custom_type_specified () const
+ {
+ return this->custom_type_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ custom_type_regex () const
+ {
+ return this->custom_type_regex_;
+ }
+
+ inline bool options::
+ custom_type_regex_specified () const
+ {
+ return this->custom_type_regex_specified_;
+ }
+
+ inline const std::size_t& options::
+ parts () const
+ {
+ return this->parts_;
+ }
+
+ inline bool options::
+ parts_specified () const
+ {
+ return this->parts_specified_;
+ }
+
+ inline const NarrowString& options::
+ parts_suffix () const
+ {
+ return this->parts_suffix_;
+ }
+
+ inline bool options::
+ parts_suffix_specified () const
+ {
+ return this->parts_suffix_specified_;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.