aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/serializer/options.cli
blob: e4e35a12f5d3a8166214973bc9a931d05bcaf7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// file      : xsde/cxx/serializer/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 <cstddef>; // std::size_t

include <types.hxx>; // NarrowString, NarrowStrings

include <cxx/options.cli>;

namespace CXX
{
  namespace Serializer
  {
    class options: CXX::options
    {
      NarrowStrings --type-map
      {
        "<mapfile>",
        "Read XML Schema to C++ type mapping information from <mapfile>.
         Repeat this option to specify several type maps. Type maps are
         considered in order of appearance and the first match is used.
         By default all user-defined types are mapped to \cb{void}. See
         the TYPE MAP section below for more information."
      };

      bool --suppress-validation
      {
        "Suppress the generation of validation code."
      };

      // Reuse style.
      //
      bool --reuse-style-mixin
      {
        "Generate code that supports the mixin base 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 support for the tiein style is generated."
      };

      bool --reuse-style-none
      {
        "Do not generate any support for base serializer implementation
         reuse. By default support for the tiein style is generated."
      };

      // Polymorphism.
      //
      bool --generate-polymorphic
      {
        "Generate polymorphism-aware code. Specify this option if you use
         substitution groups or \cb{xsi:type}."
      };

      bool --runtime-polymorphic
      {
        "Generate non-polymorphic code that uses the runtime library
         configured with polymorphism support."
      };

      // Implementation/driver.
      //
      bool --generate-empty-impl
      {
        "Generate a sample serializer implementation with empty function
         bodies which can then be filled with the application-specific code.
         For an input file in the form \cb{name.xsd} this option triggers
         the generation of the two additional C++ files in the form:
         \cb{name-simpl.hxx} (serializer implementation header file) and
         \cb{name-simpl.cxx} (serializer implementation source file)."
      };

      bool --generate-test-driver
      {
        "Generate a test driver for the sample serializer implementation.
         For an input file in the form \cb{name.xsd} this option triggers
         the generation of an additional C++ file in the form
         \cb{name-sdriver.cxx}."
      };

      bool --force-overwrite
      {
        "Force overwriting of the existing implementation and test driver
         files. Use this option only if you do not mind loosing the changes
         you have made in the sample implementation or test driver files."
      };

      // Root element.
      //
      bool --root-element-first
      {
        "Indicate that the first global element is the document root. This
         information is used to generate the test driver for the sample
         implementation."
      };

      bool --root-element-last
      {
        "Indicate that the last global element is the document root. This
         information is used to generate the test driver for the sample
         implementation."
      };

      NarrowString --root-element
      {
        "<element>",
        "Indicate that <element> is the document root. This information is
         used to generate the test driver for the sample implementation."
      };

      // Suffixes.
      //
      NarrowString --skel-type-suffix = "_sskel"
      {
        "<suffix>",
        "Use the provided <suffix> instead of the default \cb{_sskel} to
         construct the names of generated serializer skeletons."
      };

      NarrowString --skel-file-suffix = "-sskel"
      {
        "<suffix>",
        "Use the provided <suffix> instead of the default \cb{-sskel} to
         construct the names of generated serializer skeleton files."
      };

      NarrowString --impl-type-suffix = "_simpl"
      {
        "<suffix>",
        "Use the provided <suffix> instead of the default \cb{_simpl} to
         construct the names of serializer implementations for the built-in
         XML Schema types and sample serializer implementations."
      };

      NarrowString --impl-file-suffix = "-simpl"
      {
        "<suffix>",
        "Use the provided <suffix> instead of the default \cb{-simpl} to
         construct the names of generated sample serializer implementation
         files."
      };
    };
  }
}