BDE 4.39.x Production Release
Loading...
Searching...
No Matches
balxml.h
Go to the documentation of this file.
1/// @file balxml.h
2///
3///
4/// @defgroup balxml Package balxml
5/// @brief Basic Application Library XML (balxml)
6/// @addtogroup bal
7/// @{
8/// @addtogroup balxml
9/// @{
10/// * <a href="#balxml-purpose"> Purpose</a>
11/// * <a href="#balxml-mnemonic"> Mnemonic </a>
12/// * <a href="#balxml-description"> Description </a>
13/// * <a href="#balxml-code-generation"> Code Generation </a>
14/// * <a href="#balxml-hierarchical-synopsis"> Hierarchical Synopsis </a>
15/// * <a href="#balxml-component-synopsis"> Component Synopsis </a>
16///
17/// # Purpose {#balxml-purpose}
18/// Provide utility components for using XML and XSD.
19///
20/// # Mnemonic {#balxml-mnemonic}
21/// Basic Application Library XML (balxml)
22///
23/// @see a_xercesc, a_xml2
24///
25/// # Description {#balxml-description}
26/// The `balxml` package provides utilities for working with XML and
27/// XSD. Clients can use the components provided by `balxml` for parsing and
28/// printing fundamental types, XML schema, and XML data documents. Typical
29/// usage is illustrated in the @ref balxml_encoder and @ref balxml_decoder components
30/// documentation.
31///
32/// There are 2 sets of the encoding/decoding member functions:
33///
34/// 1. `encode` & `decode`, and
35/// 2. `encodeAny` & `decodeAny` (referred as "any-functions" below).
36///
37/// The first set uses templates and compile-time metaprogramming to generate the
38/// encoding/decoding C++ code. The second set uses the runtime dispatch
39/// approach - base classes and virtual functions - to provide the same
40/// functionality. The result does not depend on the functions you use - their
41/// functionality is absolutely identical. The difference is not in **what**
42/// they do, but in **how** they do it.
43///
44/// As usual, the compile-time approach can be faster, but generates a lot of
45/// code. And since this code is in the headers, this causes big load on the
46/// compiler and linker - the generated code is in each translation unit and in
47/// the object file generated from it. As a result, slow compilation, huge
48/// memory and CPU consumption during the compilation and linking, and a larger
49/// resulting executable file size.
50///
51/// All the above mentioned shortcomings (except the final runtime performance)
52/// can be mitigated by using the "any-functions", at the cost of a small runtime
53/// slowdown. All the encoding/decoding code is pre-compiled and located in one
54/// place - the BDE library (archive) files. But how big is the execution
55/// slowdown? Our benchmarks show that the slowdown is less than 10%.
56///
57/// ## Code Generation {#balxml-code-generation}
58///
59/// The script 'code_from_xsd.pl' will automatically generate several components
60/// from the file 'balxml.xsd'. It will refuse to run in the 'balxml' source
61/// directory. Create a separate, temporary directory and copy 'balxml.xsd' and
62/// 'code_from_xsd.sh' into it, 'cd' into that directory, and run
63/// 'code_from_xsd.sh' there will no command-line arguments.
64///
65/// Note that the @ref balxml_encodingstyle component will need hand-editing due to
66/// redundant, synonymous enum values.
67///
68/// ## Hierarchical Synopsis {#balxml-hierarchical-synopsis}
69///
70/// The 'balxml' package currently has 24 components having 6 levels of physical
71/// dependency. The list below shows the hierarchical ordering of the components.
72/// The order of components within each level is not architecturally significant,
73/// just alphabetical.
74/// @code
75/// 6. balxml_decoder
76/// balxml_encoder
77///
78/// 5. balxml_formatter
79/// balxml_minireader
80/// balxml_utf8readerwrapper
81/// balxml_validatingreader
82///
83/// 4. balxml_formatter_compactimpl !PRIVATE!
84/// balxml_formatter_prettyimpl !PRIVATE!
85/// balxml_reader
86/// balxml_typesparserutil
87///
88/// 3. balxml_elementattribute
89/// balxml_typesprintutil
90///
91/// 2. balxml_encoderoptions
92/// balxml_prefixstack
93///
94/// 1. balxml_base64parser !DEPRECATED!
95/// balxml_configschema
96/// balxml_decoderoptions
97/// balxml_encodingstyle
98/// balxml_errorinfo
99/// balxml_formatterwhitespacetype
100/// balxml_hexparser
101/// balxml_listparser
102/// balxml_namespaceregistry
103/// balxml_util
104/// @endcode
105///
106/// ## Component Synopsis {#balxml-component-synopsis}
107///
108/// @ref balxml_base64parser : !DEPRECATED!
109/// Provide push parser for Base64 types.
110///
111/// @ref balxml_configschema :
112/// Provide the service configuration schema
113///
114/// @ref balxml_decoder :
115/// Provide a generic translation from XML into C++ objects.
116///
117/// @ref balxml_decoderoptions :
118/// Provide value-semantic attribute classes
119///
120/// @ref balxml_elementattribute :
121/// Provide the properties of an attribute in an XML element tag.
122///
123/// @ref balxml_encoder :
124/// Provide an XML encoder utility.
125///
126/// @ref balxml_encoderoptions :
127/// Provide value-semantic attribute classes
128///
129/// @ref balxml_encodingstyle :
130/// Provide value-semantic attribute classes
131///
132/// @ref balxml_errorinfo :
133/// Provide common error information for XML components.
134///
135/// @ref balxml_formatter :
136/// Provide a simple interface for writing formatted XML.
137///
138/// @ref balxml_formatter_compactimpl : !PRIVATE!
139/// Provide a minimal-whitespace implementation for @ref balxml_formatter .
140///
141/// @ref balxml_formatter_prettyimpl : !PRIVATE!
142/// Provide pretty-printing implementation for @ref balxml_formatter .
143///
144/// @ref balxml_formatterwhitespacetype :
145/// Enumerate the set of whitespace options for @ref balxml_formatter .
146///
147/// @ref balxml_hexparser :
148/// Provide push parser for hex types.
149///
150/// @ref balxml_listparser :
151/// Provide push parser for lists.
152///
153/// @ref balxml_minireader :
154/// Provide light-weight implementation of `balxml::Reader` protocol.
155///
156/// @ref balxml_namespaceregistry :
157/// Provide a unique integer ID for each XML namespace.
158///
159/// @ref balxml_prefixstack :
160/// Provide a unique integer ID for each XML namespace.
161///
162/// @ref balxml_reader :
163/// Provide common reader protocol for parsing XML documents.
164///
165/// @ref balxml_typesparserutil :
166/// Provide a utility for parsing types using XML formatting.
167///
168/// @ref balxml_typesprintutil :
169/// Provide a utility for printing types using XML formatting.
170///
171/// @ref balxml_utf8readerwrapper :
172/// Provide wrapper for `Reader` to check input UTF-8 validity.
173///
174/// @ref balxml_util :
175/// Provide a suite of common XML utilities.
176///
177/// @ref balxml_validatingreader :
178/// Provide a common reader protocol for parsing and validating XML.
179///
180/// @}
181/** @} */