Architecture of the Generated Classes
This section includes a UML diagram of the interfaces and sample applications generated by the schema compiler. (Additional internal and support files not included in the diagram are also generated, but these are for internal use only.)
Figure 11 – Architecture of the Datatype Generated Classes
The generator creates a C++ class for each complex type defined in the schema. Each of these classes is based on the handle/body idiom, as illustrated in Figure 11, and each one is derived from the library classes rwsf::XmlBindingHandle and rwsf::XmlBindingBody respectively.
These complex type classes are represented by the handle/body pair <complexType> and <complexType>Imp in the figure above. If the schema defines any top-level elements that are of type <complexType>, an XML binding for that element is created deriving from type <complexType>, shown by the handle/body pair <element name> and <element name>Imp.
The class <schema name>_main.cpp is a generated sample application to use the datatype classes, and is placed into the app/data directory. The file contains a main() method skeleton with comments.
A marshaler, <complextype>Marshal.cpp, is created for each complex type in the schema to provide marshaling functionality, and the file <schema name>Converter.cpp performs string conversions as necessary.
For more information on the generated XML bindings, see Chapter 2, “XML Binding Concepts,” in the HydraExpress XML Binding Development Guide.