From 0897bd94a7d430a3d14a2de01a109191bb89c86e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 8 Mar 2012 11:20:20 +0200 Subject: Print usage/version information to STDOUT instead of STDERR --- xsd/cxx/tree/generator.cxx | 201 +++++++++++++++++++++++---------------------- 1 file changed, 101 insertions(+), 100 deletions(-) (limited to 'xsd/cxx/tree/generator.cxx') diff --git a/xsd/cxx/tree/generator.cxx b/xsd/cxx/tree/generator.cxx index 006a666..19cdd0e 100644 --- a/xsd/cxx/tree/generator.cxx +++ b/xsd/cxx/tree/generator.cxx @@ -50,6 +50,7 @@ using std::endl; using std::wcerr; +using std::wcout; using namespace XSDFrontend::SemanticGraph; @@ -218,15 +219,15 @@ namespace CXX Void Tree::Generator:: usage () { - std::wostream& e (wcerr); - ::CLI::Indent::Clip< ::CLI::OptionsUsage, WideChar> clip (e); + std::wostream& o (wcout); + ::CLI::Indent::Clip< ::CLI::OptionsUsage, WideChar> clip (o); - e << "--char-type " << endl + o << "--char-type " << endl << " Use as the base character type. Valid\n" << " values are 'char' (default) and 'wchar_t'." << endl; - e << "--char-encoding " << 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" @@ -234,293 +235,293 @@ namespace CXX << " type the only valid value is 'auto'." << endl; - e << "--output-dir " << endl + o << "--output-dir " << endl << " Write generated files to instead of current\n" << " directory." << endl; - e << "--generate-polymorphic" << endl + o << "--generate-polymorphic" << endl << " Generate polymorphism-aware code. Specify this\n" << " option if you use substitution groups or xsi:type." << endl; - e << "--polymorphic-type " << endl + o << "--polymorphic-type " << endl << " Indicate that is a root of a polymorphic\n" << " type hierarchy." << endl; - e << "--polymorphic-type-all" << endl + o << "--polymorphic-type-all" << endl << " Indicate that all types should be treated as\n" << " polymorphic." << endl; - e << "--generate-serialization" << endl + o << "--generate-serialization" << endl << " Generate serialization functions. They convert an\n" << " in-memory representation back to XML." << endl; - e << "--generate-inline" << endl + o << "--generate-inline" << endl << " Generate certain functions inline." << endl; - e << "--generate-ostream" << endl + o << "--generate-ostream" << endl << " Generate ostream insertion operators." << endl; - e << "--generate-doxygen" << endl + o << "--generate-doxygen" << endl << " Generate documentation comments in the Doxygen\n" << " format." << endl; - e << "--generate-comparison" << endl + o << "--generate-comparison" << endl << " Generate comparison operators." << endl; - e << "--generate-default-ctor" << endl + o << "--generate-default-ctor" << endl << " Generate default constructors even for types that\n" << " have required members." << endl; - e << "--generate-from-base-ctor" << endl + o << "--generate-from-base-ctor" << endl << " Generate from-base constructors." << endl; - e << "--suppress-assignment" << endl + o << "--suppress-assignment" << endl << " Suppress the generation of copy assignment\n" << " operators for complex types." << endl; - e << "--generate-detach" << endl + o << "--generate-detach" << endl << " Generate detach functions for required members." << endl; - e << "--generate-wildcard" << endl + o << "--generate-wildcard" << endl << " Generate accessors/modifiers as well as parsing\n" << " and serialization code for XML Schema wildcards." << endl; - e << "--generate-insertion " << endl + o << "--generate-insertion " << endl << " Generate data representation stream insertion\n" << " operators for the output stream type." << endl; - e << "--generate-extraction " << endl + o << "--generate-extraction " << endl << " Generate data representation stream extraction\n" << " constructors for the input stream type." << endl; - e << "--generate-forward" << endl + o << "--generate-forward" << endl << " Generate forward declaration file." << endl; - e << "--generate-xml-schema" << endl + o << "--generate-xml-schema" << endl << " Generate a C++ header file as if the schema being\n" << " compiled defines the XML Schema namespace." << endl; - e << "--extern-xml-schema " << 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; - e << "--suppress-parsing" << endl + o << "--suppress-parsing" << endl << " Suppress the generation of parsing functions." << endl; - e << "--generate-element-type" << endl + o << "--generate-element-type" << endl << " Generate types instead of parsing/serialization\n" << " functions for root elements." << endl; - e << "--generate-element-map" << endl + o << "--generate-element-map" << endl << " Generate a root element map that allows uniform\n" << " parsing/serialization of multiple root elements.\n" << endl; - e << "--generate-intellisense" << endl + o << "--generate-intellisense" << endl << " Generate workarounds for IntelliSense bugs in\n" << " Visual Studio 2005 (8.0)." << endl; - e << "--omit-default-attributes" << endl + o << "--omit-default-attributes" << endl << " Omit attributes with default and fixed values\n" << " from serialized XML documents." << endl; - e << "--namespace-map =" << 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; - e << "--namespace-regex " << 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; - e << "--namespace-regex-trace" << endl + o << "--namespace-regex-trace" << endl << " Trace the process of applying regular expressions\n" << " specified with the --namespace-regex option." << endl; - e << "--reserved-name " << 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; - e << "--type-naming