EXT :Re: [xsde-users] C1061: Blocks nested too deeply

Boris Kolpackov boris at codesynthesis.com
Tue Jul 1 04:17:59 EDT 2014


Hi Tony,

Holzer, Tony (AS) <anthony.holzer at ngc.com> writes:

> Boris,
> Thanks for the quick reply. 
> What is the easiest way to remove the C++ enum interface? 

You can customize the generated type using the --custom-type option:

http://www.codesynthesis.com/projects/xsde/documentation/cxx/hybrid/guide/#4.9

For example:

--custom-type MessageTypeEnum=v/xml_schema::string

You will still need to provide custom parser and serializer implementations
for this type using the options discussed below. It's just that these
implementations won't have to be updated when the enum changes.

The easiest way to come up with these implementation is to make XSD/e
generate parser/serializer implementations for a type like this:

  <xsd:simpleType name="MessageTypeEnum">
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>

And then copy the MessageTypeEnum_pimpl and MessageTypeEnum_simpl into
your files.

Boris



More information about the xsde-users mailing list