summaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-06-02 04:36:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-06-02 04:36:07 +0200
commitdfe30bb81e90d729cd11dddeeb04924df38d0bcc (patch)
tree260a6ebd95bbc326233b348b60d369f112fcad25 /xsd
parent4d3692a500bd5cf2bd500e1eb0632850ca8260ab (diff)
Add support for fat type files
Such files also contain all the global elements that this type classifies.
Diffstat (limited to 'xsd')
-rw-r--r--xsd/xsd.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx
index d2d7248..bba866f 100644
--- a/xsd/xsd.cxx
+++ b/xsd/xsd.cxx
@@ -88,6 +88,7 @@ namespace CLI
extern Key type_file_regex_trace = "type-file-regex-trace";
extern Key schema_file_regex = "schema-file-regex";
extern Key schema_file_regex_trace = "schema-file-regex-trace";
+ extern Key fat_type_file = "fat-type-file";
extern Key file_list = "file-list";
extern Key file_list_prologue = "file-list-prologue";
extern Key file_list_epilogue = "file-list-epilogue";
@@ -113,6 +114,7 @@ namespace CLI
type_file_regex_trace, Boolean,
schema_file_regex, NarrowStrings,
schema_file_regex_trace, Boolean,
+ fat_type_file, Boolean,
file_list, NarrowString,
file_list_prologue, NarrowString,
file_list_epilogue, NarrowString,
@@ -397,6 +399,12 @@ main (Int argc, Char* argv[])
<< " specified with the --schema-file-regex option."
<< endl;
+ e << "--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.
//
e << "--file-list <file>" << endl
@@ -920,7 +928,10 @@ main (Int argc, Char* argv[])
common_ops.value<CLI::schema_file_regex> (),
common_ops.value<CLI::schema_file_regex_trace> ());
- Transformations::SchemaPerType trans (type_translator);
+ Transformations::SchemaPerType trans (
+ type_translator,
+ common_ops.value<CLI::fat_type_file> ());
+
Schemas schemas (trans.transform (*schema));
// Generate code.