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/xsd.cxx | 117 ++---------------------------------------------------------- 1 file changed, 3 insertions(+), 114 deletions(-) (limited to 'xsd/xsd.cxx') diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx index ea7b09d..27f4b09 100644 --- a/xsd/xsd.cxx +++ b/xsd/xsd.cxx @@ -33,8 +33,6 @@ #include #include -#include - #include #include @@ -42,7 +40,7 @@ #include #include -#include +#include #include "../libxsd/xsd/cxx/version.hxx" @@ -235,7 +233,6 @@ struct XercesInitializer Void expand_nl (NarrowString& s); - Int main (Int argc, Char* argv[]) { @@ -325,117 +322,9 @@ main (Int argc, Char* argv[]) return 1; } - ::CLI::Indent::Clip< ::CLI::OptionsUsage, WideChar> clip (o); - - // Disable warning option. - // - o << "--disable-warning " << endl - << " Disable printing warning with id . If 'all'\n" - << " is specified for the warning id then all warnings\n" - << " are disabled." - << endl; - - // Anonymous morphing options. - // - o << "--preserve-anonymous" << endl - << " Preserve anonymous types. By default anonymous\n" - << " types are automatically named with names derived\n" - << " from the enclosing elements/attributes." - << endl; - - o << "--anonymous-regex " << endl - << " Add the provided regular expression to the list of\n" - << " regular expressions used to derive names for\n" - << " anonymous types from the names of the enclosing\n" - << " attributes/elements." - << endl; - - o << "--anonymous-regex-trace" << endl - << " Trace the process of applying regular expressions\n" - << " specified with the --anonymous-regex option." - << endl; - - // Location mapping options. - // - o << "--location-map
    =" << endl - << " Map the original schema location
      that is\n" - << " specified in the XML Schema include or import\n" - << " elements to new schema location . Repeat\n" - << " this option to map more than one schema location." - << endl; - - o << "--location-regex " << endl - << " Add to the list of regular expressions\n" - << " used to map schema locations that are specified\n" - << " in the XML Schema include or import elements." - << endl; - - o << "--location-regex-trace" << endl - << " Trace the process of applying regular expressions\n" - << " specified with the --location-regex option." - << endl; - - // File-per-type compilation mode options. + // Add frontend options at the end. // - o << "--file-per-type" << endl - << " Generate a separate set of C++ files for each\n" - << " type defined in XML Schema." - << endl; - - o << "--type-file-regex " << endl - << " Add the provided regular expression to the list of\n" - << " regular expressions used to translate type names\n" - << " to file names when the --file-per-type option is\n" - << " specified." - << endl; - - o << "--type-file-regex-trace" << endl - << " Trace the process of applying regular expressions\n" - << " specified with the --type-file-regex option." - << endl; - - o << "--schema-file-regex " << endl - << " Add the provided regular expression to the list\n" - << " of regular expressions used to translate schema\n" - << " file names when the --file-per-type option is\n" - << " specified." - << endl; - - o << "--schema-file-regex-trace" << endl - << " Trace the process of applying regular expressions\n" - << " specified with the --schema-file-regex option." - << endl; - - o << "--fat-type-file" << endl - << " Generate code corresponding to global elements\n" - << " into type files instead of schema files when the\n" - << " --file-per-type option is specified." - << endl; - - // File list options. - // - o << "--file-list " << endl - << " Write a list of generated C++ files to ." - << endl; - - o << "--file-list-prologue

      " << endl - << " Insert

      at the beginning of the file list. All\n" - << " occurrences of the \\n character sequence in

      \n" - << " are replaced with new lines." - << endl; - - o << "--file-list-prologue " << endl - << " Insert at the end of the file list. All\n" - << " occurrences of the \\n character sequence in \n" - << " are replaced with new lines." - << endl; - - o << "--file-list-delim " << endl - << " Delimit file names written to the file list with\n" - << " instead of new lines. All occurrences of the\n" - << " \\n character sequence in are replaced with\n" - << " new lines." - << endl; + options::print_usage (o); } else { -- cgit v1.1