XMLBooster's C++ Code generator
The C++ code generator included in XMLBooster
aims at providing a more convenient interface
than the bare bone C code generator,
at a minor cost in terms of performance:
-
Generates a parser (to convert an XML input to
a valid C++ data structure) as well as an unparser
(to convert the C++ data structure back to an
XML stream).
-
Generates standard C++ code, that can be
compiled on virtually any platform, including
NT, Linux, Unix, etc.
-
Generates a convenient and strongly typed interface
to access the information parsed by XMLBooster,
using templates whenever possible.
-
Uses user-defined classes for collections and
strings. By default, XMLBooster uses classes provided
by the STL (Standard Template Library).
-
Generates destructors for all nodes of a
parsed XML message, thereby avoiding memory leaks.
-
Performs error recovery without using C++'s exception
mechanism.
-
Inheritance in terms of elements is mapped onto
equivalent inheritance relationships for
the corresponding generated classes.
-
All instances are created through calls to a user-redefinable
factory, so that subclassing can be used to add behaviour
to the objects that are created as part of the parse tree.
-
Fully supports regular expressions: a data element
can be attached to a regular expression, which will
be used to validate the data fetched from the incoming
XML message at parse time.
|