[xsd-users] --custom-type mapping to fundamental types
Francis Rammeloo
francis.rammeloo at gmail.com
Sat Feb 2 09:29:45 EST 2008
Hello,
I have an .xsd file that contains following entry:
<xsd:simpleType name="time">
<xsd:restriction base="xsd:int" />
</xsd:simpleType>
The C++/Tree mapping tool would translate this normally to a class.
However, in order to reduse verbosity I used following command line
option:
--custom-type time=int
The generated code however does not compile. Visual Studio 2005
Express Edition gives following compile errors for these lines:
void user_status::
time (::std::auto_ptr< time_type > time)
{
this->time_.set (time);
}
error C2664: 'xsd::cxx::tree::one<X>::set' : cannot convert parameter
1 from 'std::auto_ptr<_Ty>' to 'const user_status::time_type &'
Can someone help me out? I would appreciate your help a lot.
Best regards,
Francis
More information about the xsd-users
mailing list