Complex Types
HydraExpress represents each complexType defined by the schema as a class. The name of the class is the name of the complexType or the name of the element that contains the complexType, modified according to the rules described in Names and Identifiers . HydraExpress creates a header file and a source file for each class. The files are named after the class with the appropriate extension added (.h for header files, .cpp for source files).
Each generated complexType class has a corresponding marshaling class whose name is the same but with “Marshal” appended. For example, the generated class SomeClass has the corresponding class SomeClassMarshal.
The generated complexType class contains unmarshal methods that populate an instance of the class from an XML document, and marshal methods that write out the class as an XML document. These methods call the associated generated marshaling class, which performs the marshaling.
HydraExpress represents the elements and attributes contained by the complexType as data members of the generated class. The generated class contains an accessor and a mutator for each data member. For elements or attributes that have minOccurs="0", the generated class also provides a method to query whether the class contains an instance of the element or attribute.
A generated class provides a default constructor and an equality operator, which create shallow copies, and a clone() method that creates a deep copy of the handle. (See Working with the Handle/Body Classes.) The class inherits a virtual destructor and an assignment operator from the handle base class.