[xsd-users] Using template to serialize and deserialize
boris at codesynthesis.com
Thu Apr 26 10:58:24 EDT 2012
Wallman, Joakim <Joakim.Wallman at gyros.com> writes:
> When we generate code with the Codesynthesis XSD we get serialization and
> parsing functions as global (not defined in the class) functions. Is there
> any way to generate so these functions will be static in the class and have
> same name for all classes so it is possible to use template to minimize the
No, this won't be possible because parsing functions will only differ by the
If you are looking for a uniform way to perform parsing/serialization, then
you may want to consider using the element type and element map features.
See the 'messaging' example and Section 2.9, "Mapping for Global Elements"
in the C++/Tree Mapping Manual:
More information about the xsd-users