[xsde-users] base class for complextype classes?
dv
dv7777 at gmail.com
Mon Apr 4 09:17:33 EDT 2011
Hello,
XSD/e generates classes out of complextypes specified in the XML schema,
just like in
http://www.codesynthesis.com/projects/xsde/documentation/cxx/hybrid/guide/#2.1
.
However, the generated class does not have a base class - in XSD, it
does (xml_schema::type). This is bad, because I have been using
xml_schema::type in some template specialization code:
template < typename T >
struct DataTraits
< T
, typename boost::enable_if
< boost::is_base_of< typename ::xml_schema::type, T>
>::type
>
{
....
};
T would be one of the generated classes. This code does not work with
code generated XSD/e code, since the classes have no common base.
Is there a way to specify a base class for all complex types? I looked
into the polymorphism options, but I am not sure they give me what I want.
regards
More information about the xsde-users
mailing list