From 592587e0073cb6722f1fc9c0833d441ad5636358 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 11 Jun 2012 19:01:54 +0200 Subject: Initial work on CLI port Add options files with all the documentation. Move documentation and usage to use the new approach. Finally get rid of dependency on libbackend-elements. --- xsd/cxx/tree/generator.cxx | 537 +-------------------------------------------- xsd/cxx/tree/options.cli | 415 +++++++++++++++++++++++++++++++++++ 2 files changed, 418 insertions(+), 534 deletions(-) create mode 100644 xsd/cxx/tree/options.cli (limited to 'xsd/cxx/tree') diff --git a/xsd/cxx/tree/generator.cxx b/xsd/cxx/tree/generator.cxx index 5fe4af5..7a6759b 100644 --- a/xsd/cxx/tree/generator.cxx +++ b/xsd/cxx/tree/generator.cxx @@ -16,8 +16,6 @@ #include #include -#include - #include #include @@ -47,7 +45,7 @@ #include #include -#include +#include #include "../../../libxsd/xsd/cxx/version.hxx" @@ -223,536 +221,8 @@ namespace CXX Void Tree::Generator:: usage () { - std::wostream& o (wcout); - ::CLI::Indent::Clip< ::CLI::OptionsUsage, WideChar> clip (o); - - o << "--char-type " << endl - << " Use as the base character type. Valid\n" - << " values are 'char' (default) and 'wchar_t'." - << endl; - - o << "--char-encoding " << endl - << " Specify the character encoding that should be used\n" - << " in the object model. Valid values for the 'char'\n" - << " character type are 'utf8' (default), 'iso8859-1',\n" - << " 'lcp', and 'custom'. For the 'wchar_t' character\n" - << " type the only valid value is 'auto'." - << endl; - - o << "--output-dir " << endl - << " Write generated files to instead of current\n" - << " directory." - << endl; - - o << "--generate-polymorphic" << endl - << " Generate polymorphism-aware code. Specify this\n" - << " option if you use substitution groups or xsi:type." - << endl; - - o << "--polymorphic-type " << endl - << " Indicate that is a root of a polymorphic\n" - << " type hierarchy." - << endl; - - o << "--polymorphic-type-all" << endl - << " Indicate that all types should be treated as\n" - << " polymorphic." - << endl; - - o << "--generate-serialization" << endl - << " Generate serialization functions. They convert an\n" - << " in-memory representation back to XML." - << endl; - - o << "--generate-inline" << endl - << " Generate certain functions inline." - << endl; - - o << "--generate-ostream" << endl - << " Generate ostream insertion operators." - << endl; - - o << "--generate-doxygen" << endl - << " Generate documentation comments in the Doxygen\n" - << " format." - << endl; - - o << "--generate-comparison" << endl - << " Generate comparison operators." - << endl; - - o << "--generate-default-ctor" << endl - << " Generate default constructors even for types that\n" - << " have required members." - << endl; - - o << "--generate-from-base-ctor" << endl - << " Generate from-base constructors." - << endl; - - o << "--suppress-assignment" << endl - << " Suppress the generation of copy assignment\n" - << " operators for complex types." - << endl; - - o << "--generate-detach" << endl - << " Generate detach functions for required members." - << endl; - - o << "--generate-wildcard" << endl - << " Generate accessors/modifiers as well as parsing\n" - << " and serialization code for XML Schema wildcards." - << endl; - - o << "--generate-insertion " << endl - << " Generate data representation stream insertion\n" - << " operators for the output stream type." - << endl; - - o << "--generate-extraction " << endl - << " Generate data representation stream extraction\n" - << " constructors for the input stream type." - << endl; - - o << "--generate-forward" << endl - << " Generate forward declaration file." - << endl; - - o << "--generate-xml-schema" << endl - << " Generate a C++ header file as if the schema being\n" - << " compiled defines the XML Schema namespace." - << endl; - - o << "--extern-xml-schema " << endl - << " Generate code as if the XML Schema namespace was\n" - << " defined in and xsd:included in the schema\n" - << " being compiled." - << endl; - - o << "--suppress-parsing" << endl - << " Suppress the generation of parsing functions." - << endl; - - o << "--generate-element-type" << endl - << " Generate types instead of parsing/serialization\n" - << " functions for root elements." - << endl; - - o << "--generate-element-map" << endl - << " Generate a root element map that allows uniform\n" - << " parsing/serialization of multiple root elements.\n" - << endl; - - o << "--generate-intellisense" << endl - << " Generate workarounds for IntelliSense bugs in\n" - << " Visual Studio 2005 (8.0)." - << endl; - - o << "--omit-default-attributes" << endl - << " Omit attributes with default and fixed values\n" - << " from serialized XML documents." - << endl; - - o << "--namespace-map =" << endl - << " Map XML Schema namespace to C++ namespace\n" - << " . Repeat this option to specify mapping for\n" - << " more than one XML Schema namespace." - << endl; - - o << "--namespace-regex " << endl - << " Add to the list of regular expressions\n" - << " used to translate XML Schema namespace names to\n" - << " C++ namespace names." - << endl; - - o << "--namespace-regex-trace" << endl - << " Trace the process of applying regular expressions\n" - << " specified with the --namespace-regex option." - << endl; - - o << "--reserved-name " << endl - << " Add to the list of names that should not\n" - << " be used as identifiers. The name can optionally\n" - << " be followed by '=' and the replacement name that\n" - << " should be used instead." - << endl; - - o << "--type-naming