aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/hybrid')
-rw-r--r--xsde/cxx/hybrid/generator.cxx516
-rw-r--r--xsde/cxx/hybrid/options.cli353
2 files changed, 356 insertions, 513 deletions
diff --git a/xsde/cxx/hybrid/generator.cxx b/xsde/cxx/hybrid/generator.cxx
index 4db77ea..3a61c95 100644
--- a/xsde/cxx/hybrid/generator.cxx
+++ b/xsde/cxx/hybrid/generator.cxx
@@ -17,8 +17,6 @@
#include <cutl/compiler/cxx-indenter.hxx>
#include <cutl/compiler/sloc-counter.hxx>
-#include <backend-elements/indentation/clip.hxx>
-
#include <xsd-frontend/semantic-graph.hxx>
#include <cxx/hybrid/elements.hxx>
@@ -52,7 +50,7 @@
#include <cxx/hybrid/serializer-aggregate-header.hxx>
#include <cxx/hybrid/serializer-aggregate-source.hxx>
-#include <usage.hxx>
+#include <cxx/hybrid/options.hxx>
#include "../../../libxsde/xsde/cxx/version.hxx"
@@ -61,7 +59,6 @@ using std::wcerr;
using std::wcout;
using namespace XSDFrontend::SemanticGraph;
-namespace Indentation = BackendElements::Indentation;
//
//
@@ -213,515 +210,8 @@ namespace CXX
Void Hybrid::Generator::
usage ()
{
- std::wostream& o (wcout);
- ::CLI::Indent::Clip< ::CLI::OptionsUsage, WideChar> clip (o);
-
- o << "--char-encoding <enc>" << endl
- << " Specify the character encoding that should be\n"
- << " used in the object model. Valid values are 'utf8'\n"
- << " (default) and 'iso8859-1'."
- << endl;
-
- o << "--no-stl" << endl
- << " Generate code that does not use STL."
- << endl;
-
- o << "--no-iostream" << endl
- << " Generate code that does not use the iostream\n"
- << " library."
- << endl;
-
- o << "--no-exceptions" << endl
- << " Generate code that does not use C++ exceptions."
- << endl;
-
- o << "--no-long-long" << endl
- << " Generate code that does not use the long long\n"
- << " and unsigned long long types."
- << endl;
-
- o << "--generate-parser" << endl
- << " Generate XML parsing code."
- << endl;
-
- o << "--generate-serializer" << endl
- << " Generate XML serialization code."
- << endl;
-
- o << "--generate-aggregate" << endl
- << " Generate parser/serializer aggregates for root\n"
- << " elements and/or types."
- << endl;
-
- o << "--suppress-validation" << endl
- << " Suppress the generation of validation code in\n"
- << " parser and serializer."
- << endl;
-
- o << "--suppress-parser-val" << endl
- << " Suppress the generation of validation code in\n"
- << " parser."
- << endl;
-
- o << "--suppress-serializer-val" << endl
- << " Suppress the generation of validation code in\n"
- << " serializer."
- << endl;
-
- o << "--omit-default-attributes" << endl
- << " Omit attributes with default and fixed values\n"
- << " from serialized XML documents."
- << endl;
-
- o << "--suppress-enum" << endl
- << " Suppress the generation of the XML Schema\n"
- << " enumeration to C++ enum mapping."
- << endl;
-
- o << "--generate-clone" << endl
- << " Generate clone functions for variable-length\n"
- << " types."
- << endl;
-
- o << "--generate-detach" << endl
- << " Generate detach functions for elements and\n"
- << " attributes of variable-length types."
- << endl;
-
- o << "--generate-insertion <os>" << endl
- << " Generate data representation stream insertion\n"
- << " operators for the <os> output stream type."
- << endl;
-
- o << "--generate-extraction <is>" << endl
- << " Generate data representation stream extraction\n"
- << " operators for the <is> input stream type."
- << endl;
-
- o << "--generate-inline" << endl
- << " Generate certain functions inline."
- << endl;
-
- o << "--generate-forward" << endl
- << " Generate forward declaration file."
- << endl;
-
- o << "--generate-xml-schema" << endl
- << " Generate C++ header files as if the schema being\n"
- << " compiled defines the XML Schema namespace."
- << endl;
-
- o << "--extern-xml-schema <file>" << endl
- << " Generate code as if the XML Schema namespace was\n"
- << " defined in <file> and xsd:included in the schema\n"
- << " being compiled."
- << endl;
-
- o << "--suppress-reset" << endl
- << " Suppress the generation of parser and serializer\n"
- << " reset code."
- << endl;
-
- o << "--custom-allocator" << endl
- << " Generate code that uses custom allocator functions\n"
- << " instead of operator new/delete."
- << endl;
-
- o << "--generate-polymorphic" << endl
- << " Generate polymorphism-aware code. Specify this\n"
- << " option if you use substitution groups or xsi:type."
- << endl;
-
- o << "--runtime-polymorphic" << endl
- << " Generate non-polymorphic code that uses the\n"
- << " runtime library configured with polymorphism\n"
- << " support."
- << endl;
-
- o << "--polymorphic-type <type>" << endl
- << " Indicate that <type> is a root of a polymorphic\n"
- << " type hierarchy."
- << endl;
-
- o << "--generate-typeinfo" << endl
- << " Generate type information functions for\n"
- << " polymorphic object model types."
- << endl;
-
- o << "--polymorphic-schema <file>" << endl
- << " Indicate that <file> contains derivations of\n"
- << " polymorphic types."
- << endl;
-
- o << "--reuse-style-mixin" << endl
- << " Generate code that supports the mixin base\n"
- << " parser/serializer implementation reuse style."
- << endl;
-
- o << "--custom-data <type>" << endl
- << " Add custom data to the C++ class generated for\n"
- << " XML Schema type <type>."
- << endl;
-
- o << "--custom-type <map>" << endl
- << " Use a custom type implementation instead of the\n"
- << " generated version. The <map> argument is in the\n"
- << " form name[=[flags][/[type][/[base][/include]]]],\n"
- << " where <name> is an XML Schema type name,\n"
- << " optional <flags> specify whether the custom type\n"
- << " is fixed or variable-length, optional <type> is\n"
- << " a C++ type name that should be used instead,\n"
- << " optional <base> is a C++ name that should be\n"
- << " given to the generated version, and optional\n"
- << " <include> is the header file that defines the\n"
- << " custom implementation."
- << endl;
-
- o << "--custom-parser <map>" << endl
- << " Use a custom parser implementation instead of the\n"
- << " generated version. The <map> argument is in the\n"
- << " form name[=[base][/include]], where <name> is an\n"
- << " XML Schema type name, optional <base> is a C++\n"
- << " name that should be given to the generated\n"
- << " version, and optional <include> is the header\n"
- << " file that defines the custom implementation."
- << endl;
-
- o << "--custom-serializer <map>" << endl
- << " Use a custom serializer implementation instead of\n"
- << " the generated version. The <map> argument is in\n"
- << " the form name[=[base][/include]], where <name> is\n"
- << " an XML Schema type name, optional <base> is a C++\n"
- << " name that should be given to the generated\n"
- << " version, and optional <include> is the header\n"
- << " file that defines the custom implementation."
- << endl;
-
- o << "--root-element-first" << endl
- << " Treat only the first global element as a document\n"
- << " root."
- << endl;
-
- o << "--root-element-last" << endl
- << " Treat only the last global element as a document\n"
- << " root."
- << endl;
-
- o << "--root-element-all" << endl
- << " Treat all global elements as document roots."
- << endl;
-
- o << "--root-element-none" << endl
- << " Don't treat any global elements as document roots."
- << endl;
-
- o << "--root-element <element>" << endl
- << " Treat only <element> as a document root. Repeat\n"
- << " this option to specify more than one root element."
- << endl;
-
- o << "--root-type <type>" << endl
- << " Generate parser/serializer aggregate for <type>.\n"
- << " Repeat this option to specify more than one type."
- << endl;
-
- o << "--output-dir <dir>" << endl
- << " Write generated files to <dir> instead of the\n"
- << " current directory."
- << endl;
-
- o << "--pskel-type-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '_pskel' suffix\n"
- << " to construct the names of generated parser\n"
- << " skeletons."
- << endl;
-
- o << "--sskel-type-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '_sskel' suffix\n"
- << " to construct the names of generated serializer\n"
- << " skeletons."
- << endl;
-
- o << "--pskel-file-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '-pskel' suffix\n"
- << " to construct the names of generated parser\n"
- << " skeleton files."
- << endl;
-
- o << "--sskel-file-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '-sskel' suffix\n"
- << " to construct the names of generated serializer\n"
- << " skeleton files."
- << endl;
-
- o << "--pimpl-type-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '_pimpl' suffix\n"
- << " to construct the names of generated parser\n"
- << " implementations."
- << endl;
-
- o << "--simpl-type-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '_simpl' suffix\n"
- << " to construct the names of generated serializer\n"
- << " implementations."
- << endl;
-
- o << "--pimpl-file-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '-pimpl' suffix\n"
- << " to construct the names of generated parser\n"
- << " implementation files."
- << endl;
-
- o << "--simpl-file-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '-simpl' suffix\n"
- << " to construct the names of generated serializer\n"
- << " implementation files."
- << endl;
-
- o << "--paggr-type-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '_paggs' suffix\n"
- << " to construct the names of generated parser\n"
- << " aggregates."
- << endl;
-
- o << "--saggr-type-suffix <sfx>" << endl
- << " Use <sfx> instead of the default '_saggr' suffix\n"
- << " to construct the names of generated serializer\n"
- << " aggregates."
- << endl;
-
- o << "--namespace-map <xns>=<cns>" << endl
- << " Map XML Schema namespace <xns> to C++ namespace\n"
- << " <cns>. Repeat this option to specify mapping for\n"
- << " more than one XML Schema namespace."
- << endl;
-
- o << "--namespace-regex <regex>" << endl
- << " Add <regex> 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 <name>" << endl
- << " Add <name> 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 << "--include-with-brackets" << endl
- << " Use angle brackets (<>) instead of quotes (\"\") in\n"
- << " generated #include directives."
- << endl;
-
- o << "--include-prefix <prefix>" << endl
- << " Add <prefix> to generated #include directive\n"
- << " paths."
- << endl;
-
- o << "--include-regex <regex>" << endl
- << " Add <regex> to the list of regular expressions\n"
- << " used to transform #include directive paths."
- << endl;
-
- o << "--include-regex-trace" << endl
- << " Trace the process of applying regular expressions\n"
- << " specified with the --include-regex option."
- << endl;
-
- o << "--guard-prefix <prefix>" << endl
- << " Add <prefix> to generated header inclusion guards."
- << endl;
-
- // File suffix.
- //
- o << "--hxx-suffix <suffix>" << endl
- << " Use <suffix> instead of the default '.hxx' to\n"
- << " construct the name of the header files."
- << endl;
-
- o << "--ixx-suffix <suffix>" << endl
- << " Use <suffix> instead of the default '.ixx' to\n"
- << " construct the name of the inline files."
- << endl;
-
- o << "--cxx-suffix <suffix>" << endl
- << " Use <suffix> instead of the default '.cxx' to\n"
- << " construct the name of the source files."
- << endl;
-
- o << "--fwd-suffix <suffix>" << endl
- << " Use <suffix> instead of the default '-fwd.hxx'\n"
- << " to construct the name of the forward declaration\n"
- << " file."
- << endl;
-
- // File regex.
- //
- o << "--hxx-regex <regex>" << endl
- << " Use <regex> to construct the names of the header\n"
- << " files."
- << endl;
-
- o << "--ixx-regex <regex>" << endl
- << " Use <regex> to construct the names of the inline\n"
- << " files."
- << endl;
-
- o << "--cxx-regex <regex>" << endl
- << " Use <regex> to construct the names of the source\n"
- << " files."
- << endl;
-
- o << "--fwd-regex <regex>" << endl
- << " Use <regex> to construct the name of the forward\n"
- << " declaration file."
- << endl;
-
-
- // Prologues.
- //
- o << "--hxx-prologue <text>" << endl
- << " Insert <text> at the beginning of the header\n"
- << " files."
- << endl;
-
- o << "--ixx-prologue <text>" << endl
- << " Insert <text> at the beginning of the inline\n"
- << " files."
- << endl;
-
- o << "--cxx-prologue <text>" << endl
- << " Insert <text> at the beginning of the source\n"
- << " files."
- << endl;
-
- o << "--fwd-prologue <text>" << endl
- << " Insert <text> at the beginning of the forward\n"
- << " declaration file."
- << endl;
-
- o << "--prologue <text>" << endl
- << " Insert <text> at the beginning of each generated\n"
- << " file for which there is no file-specific prologue."
- << endl;
-
-
- // Epilogues.
- //
- o << "--hxx-epilogue <text>" << endl
- << " Insert <text> at the end of the header files."
- << endl;
-
- o << "--ixx-epilogue <text>" << endl
- << " Insert <text> at the end of the inline files."
- << endl;
-
- o << "--cxx-epilogue <text>" << endl
- << " Insert <text> at the end of the source files."
- << endl;
-
- o << "--fwd-epilogue <text>" << endl
- << " Insert <text> at the end of the forward\n"
- << " declaration file."
- << endl;
-
- o << "--epilogue <text>" << endl
- << " Insert <text> at the end of each generated file\n"
- << " for which there is no file-specific epilogue."
- << endl;
-
-
- // Prologue files.
- //
- o << "--hxx-prologue-file <file>" << endl
- << " Insert the content of the <file> at the beginning\n"
- << " of the header files."
- << endl;
-
- o << "--ixx-prologue-file <file>" << endl
- << " Insert the content of the <file> at the beginning\n"
- << " of the inline files."
- << endl;
-
- o << "--cxx-prologue-file <file>" << endl
- << " Insert the content of the <file> at the beginning\n"
- << " of the source files."
- << endl;
-
- o << "--fwd-prologue-file <file>" << endl
- << " Insert the content of the <file> at the beginning\n"
- << " of the forward declaration file."
- << endl;
-
- o << "--prologue-file <file>" << endl
- << " Insert the content of the <file> at the beginning\n"
- << " of each generated file for which there is no file-\n"
- << " specific prologue file."
- << endl;
-
-
- // Epilogue files.
- //
- o << "--hxx-epilogue-file <file>" << endl
- << " Insert the content of the <file> at the end of\n"
- << " the header files."
- << endl;
-
- o << "--ixx-epilogue-file <file>" << endl
- << " Insert the content of the <file> at the end of\n"
- << " the inline files."
- << endl;
-
- o << "--cxx-epilogue-file <file>" << endl
- << " Insert the content of the <file> at the end of\n"
- << " the source files."
- << endl;
-
- o << "--fwd-epilogue-file <file>" << endl
- << " Insert the content of the <file> at the end of\n"
- << " the forward declaration file."
- << endl;
-
- o << "--epilogue-file <file>" << endl
- << " Insert the content of the <file> at the end of\n"
- << " each generated file for which there is no file-\n"
- << " specific epilogue file."
- << endl;
-
-
- // Misc.
- //
- o << "--show-anonymous" << endl
- << " Show elements and attributes that are of anonymous\n"
- << " types."
- << endl;
-
- o << "--show-sloc" << endl
- << " Show the number of generated physical source lines\n"
- << " of code (SLOC)."
- << endl;
-
- o << "--sloc-limit <num>" << endl
- << " Check that the number of generated physical source\n"
- << " lines of code (SLOC) does not exceed <num>."
- << endl;
-
- o << "--options-file <file>" << endl
- << " Read additional options from <file>. Each option\n"
- << " should appear on a separate line optionally\n"
- << " followed by space and an argument."
- << endl;
-
- o << "--proprietary-license" << endl
- << " Indicate that the generated code is licensed under\n"
- << " a proprietary license instead of the GPL."
- << endl;
+ CXX::Hybrid::options::print_usage (wcout);
+ CXX::options::print_usage (wcout);
}
Hybrid::CLI::OptionsSpec Hybrid::Generator::
diff --git a/xsde/cxx/hybrid/options.cli b/xsde/cxx/hybrid/options.cli
new file mode 100644
index 0000000..40df945
--- /dev/null
+++ b/xsde/cxx/hybrid/options.cli
@@ -0,0 +1,353 @@
+// file : xsde/cxx/hybrid/options.cli
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include <vector>;
+include <string>;
+include <cstddef>; // std::size_t
+
+include <cult/types.hxx>; // NarrowString
+
+include <cxx/options.cli>;
+
+namespace CXX
+{
+ namespace Hybrid
+ {
+ class options: CXX::options
+ {
+ // Features.
+ //
+ bool --generate-parser
+ {
+ "Generate XML parsing code."
+ };
+
+ bool --generate-serializer
+ {
+ "Generate XML serialization code."
+ };
+
+ bool --generate-aggregate
+ {
+ "Generate parser/serializer aggregates for root elements and/or types.
+ See also the \cb{--root-element-*} and \cb{--root-type} options."
+ };
+
+ bool --suppress-validation
+ {
+ "Suppress the generation of validation code in parser and serializer."
+ };
+
+ bool --suppress-parser-val
+ {
+ "Suppress the generation of validation code in parser."
+ };
+
+ bool --suppress-serializer-val
+ {
+ "Suppress the generation of validation code in serializer."
+ };
+
+ bool --omit-default-attributes
+ {
+ "Omit attributes with default and fixed values from serialized
+ XML documents."
+ };
+
+ bool --suppress-enum
+ {
+ "Suppress the generation of the XML Schema enumeration to C++
+ \cb{enum} mapping."
+ };
+
+ bool --generate-clone
+ {
+ "Generate clone functions for variable-length types. These
+ functions allow you to make dynamically-allocated copies of
+ variable-length objects."
+ };
+
+ bool --generate-detach
+ {
+ "Generate detach functions for elements and attributes of
+ variable-length types. These functions, for example, allow
+ you to move sub-trees in the object model either within the
+ same tree or between different trees."
+ };
+
+ std::vector<Cult::Types::NarrowString> --generate-insertion
+ {
+ "<os>",
+ "Generate data representation stream insertion operators for the
+ <os> output stream type. Repeat this option to specify more than
+ one stream type. The special \cb{CDR} and \cb{XDR} arguments are
+ recognized as ACE CDR and Sun RPC XDR stream types and the
+ corresponding stream wrappers provided by the XSD/e runtime are
+ automatically used. For custom stream types use the
+ \cb{--hxx-prologue*} options to include the necessary declarations."
+ };
+
+ std::vector<Cult::Types::NarrowString> --generate-extraction
+ {
+ "<is>",
+ "Generate data representation stream extraction operators for the
+ <is> input stream type. Repeat this option to specify more than
+ one stream type. The special \cb{CDR} and \cb{XDR} arguments are
+ recognized as ACE CDR and Sun RPC XDR stream types and the
+ corresponding stream wrappers provided by the XSD/e runtime are
+ automatically used. For custom stream types use the
+ \cb{--hxx-prologue*} options to include the necessary declarations."
+ };
+
+ bool --generate-forward
+ {
+ "Generate forward declaration file."
+ };
+
+ // Polymorphism.
+ //
+ bool --generate-polymorphic
+ {
+ "Generate polymorphism-aware code. Specify this option if you use
+ substitution groups or \cb{xsi:type}. Use the \cb{--polymorphic-type}
+ option to specify which type hierarchies are polymorphic."
+ };
+
+ bool --runtime-polymorphic
+ {
+ "Generate non-polymorphic code that uses the runtime library
+ configured with polymorphism support."
+ };
+
+ std::vector<Cult::Types::NarrowString> --polymorphic-type
+ {
+ "<type>",
+ "Indicate that <type> is a root of a polymorphic type hierarchy. The
+ XSD/e compiler can often automatically determine which types are
+ polymorphic based on the substitution group declarations. However,
+ you may need to use this option if you are not using substitution
+ groups or if substitution groups are defined in another schema.
+ You need to specify this option when compiling every schema file
+ that references <type>."
+ };
+
+ bool --generate-typeinfo
+ {
+ "Generate custom type information querying functions for polymorphic
+ object model types. These functions can be used instead of the
+ standard C++ RTTI mechanism to determine object's type at runtime."
+ };
+
+ std::vector<Cult::Types::NarrowString> --polymorphic-schema
+ {
+ "<file>",
+ "Indicate that <file> contains derivations of polymorphic types that
+ are not otherwise visible from the schema being compiled. This
+ option is used to make sure that during the generation of parser
+ and serializer aggregates the compiler is aware of all possible
+ derivations of polymorphic types. Repeat this option to specify
+ more than one schema file."
+ };
+
+ // Reuse style.
+ //
+ bool --reuse-style-mixin
+ {
+ "Generate code that supports the mixin base parser/serializer
+ implementation reuse style. Note that this reuse style relies on
+ virtual inheritance and may result in a substantial object code
+ size increase for large vocabularies. By default the tiein reuse
+ style is used."
+ };
+
+ // Custom data/type.
+ //
+ std::vector<Cult::Types::NarrowString> --custom-data
+ {
+ "<type>",
+ "Add the ability to store custom data to the C++ class generated for
+ XML Schema type <type>. To add custom data to a nested compositor
+ class use the qualified name starting from the XML Schema type
+ containing the compositor, for example, \cb{foo::sequence::choise1}."
+ };
+
+ std::vector<Cult::Types::NarrowString> --custom-type
+ {
+ "<map>",
+ "Use a custom type implementation instead of the generated version.
+ The <map> argument is in the form
+ \c{\i{name}[\b{=}[\i{flags}][\b{/}[\i{type}][\b{/}[\i{base}][\b{/}\i{include}]]]]},
+ where the \ci{name} component is the XML Schema type name being
+ customized. Optional \ci{flags} allow you to specify whether the
+ custom type is fixed or variable-length. The \cb{f} flag indicates
+ the type is fixed-length and the \cb{v} flag indicates the type is
+ variable-length. If omitted, the default rules are used to determine
+ the type length. Optional \ci{type} is a C++ type name that should
+ be used instead. If specified, the object model type is defined as
+ a \cb{typedef} alias for this C++ type. Optional \ci{base} is a C++
+ name that should be given to the generated version. It is normally
+ used as a base for the custom implementation. Optional \ci{include}
+ is the header file that defines the custom implementation. It is
+ \cb{#include}'ed into the generated code immediately after (if
+ \ci{base} is specified) or instead of the generated version."
+ };
+
+ std::vector<Cult::Types::NarrowString> --custom-parser
+ {
+ "<map>",
+ "Use a custom parser implementation instead of the generated version.
+ The <map> argument is in the form
+ \c{\i{name}[\b{=}[\i{base}][\b{/}\i{include}]]}, where the \ci{name}
+ component is the XML Schema type name being customized. Optional
+ \ci{base} is a C++ name that should be given to the generated
+ version. It is normally used as a base for the custom implementation.
+ Optional \ci{include} is the header file that defines the custom
+ implementation. It is \cb{#include}'ed into the generated code
+ immediately after (if \ci{base} is specified) or instead of the
+ generated version."
+ };
+
+ std::vector<Cult::Types::NarrowString> --custom-serializer
+ {
+ "<map>",
+ "Use a custom serializer implementation instead of the generated
+ version. The <map> argument is in the form
+ \c{\i{name}[\b{=}[\i{base}][\b{/}\i{include}]]}, where The \ci{name}
+ component is the XML Schema type name being customized. Optional
+ \ci{base} is a C++ name that should be given to the generated
+ version. It is normally used as a base for the custom implementation.
+ Optional \ci{include} is the header file that defines the custom
+ implementation. It is \cb{#include}'ed into the generated code
+ immediately after (if \ci{base} is specified) or instead of the
+ generated version."
+ };
+
+ // Root element/type.
+ //
+
+ bool --root-element-first
+ {
+ "Treat only the first global element as a document root. This
+ determines for which elements parser and serializer aggregates
+ are generated. By default all global elements are considered
+ document roots. See also the \cb{--generate-aggregate} option."
+ };
+
+ bool --root-element-last
+ {
+ "Treat only the last global element as a document root. This
+ determines for which elements parser and serializer aggregates
+ are generated. By default all global elements are considered
+ document roots. See also the \cb{--generate-aggregate} option."
+ };
+
+ bool --root-element-all
+ {
+ "Treat all global elements as document roots (the default behavior).
+ This determines for which elements parser and serializer aggregates
+ are generated. By explicitly specifying this option you can suppress
+ the warning that is issued if more than one global element is
+ defined. See also the \cb{--generate-aggregate} option."
+ };
+
+ bool --root-element-none
+ {
+ "Do not treat any global elements as document roots. This determines
+ for which elements parser and serializer aggregates are generated.
+ By default all global elements are considered document roots. See
+ also the \cb{--generate-aggregate} option."
+ };
+
+ std::vector<Cult::Types::NarrowString> --root-element
+ {
+ "<element>",
+ "Treat only <element> as a document root. This determines for which
+ elements parser and serializer aggregates are generated. Repeat
+ this option to specify more than one root element. See also the
+ \cb{--generate-aggregate} option."
+ };
+
+ std::vector<Cult::Types::NarrowString> --root-type
+ {
+ "<type>",
+ "Generate parser/serializer aggregate for <type>. Repeat this option
+ to specify more than one type. See also the \cb{--generate-aggregate}
+ option."
+ };
+
+ // Suffixes.
+ //
+ Cult::Types::NarrowString --pskel-type-suffix = "_pskel"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{_pskel} to construct the
+ names of generated parser skeletons."
+ };
+
+ Cult::Types::NarrowString --sskel-type-suffix = "_sskel"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{_sskel} to construct the
+ names of generated serializer skeletons."
+ };
+
+ Cult::Types::NarrowString --pskel-file-suffix = "-pskel"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{-pskel} to construct the
+ names of generated parser skeleton files."
+ };
+
+ Cult::Types::NarrowString --sskel-file-suffix = "-sskel"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{-sskel} to construct the
+ names of generated serializer skeleton files."
+ };
+
+ Cult::Types::NarrowString --pimpl-type-suffix = "_pimpl"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{_pimpl} to construct the
+ names of generated parser implementations."
+ };
+
+ Cult::Types::NarrowString --simpl-type-suffix = "_simpl"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{_simpl} to construct the
+ names of generated serializer implementations."
+ };
+
+ Cult::Types::NarrowString --pimpl-file-suffix = "-pimpl"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{-pimpl} to construct the
+ names of generated parser implementation files."
+ };
+
+ Cult::Types::NarrowString --simpl-file-suffix = "-simpl"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{-simpl} to construct the
+ names of generated serializer implementation files."
+ };
+
+ Cult::Types::NarrowString --paggr-type-suffix = "_paggs"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{_paggs} to construct the
+ names of generated parser aggregates."
+ };
+
+ Cult::Types::NarrowString --saggr-type-suffix = "_saggr"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{_saggr} to construct the
+ names of generated serializer aggregates."
+ };
+ };
+ }
+}