[xsde-users] problem with classes derived from long_base
Boris Kolpackov
boris at codesynthesis.com
Mon Apr 4 08:51:20 EDT 2011
Hi,
dv <dv7777 at gmail.com> writes:
> I looked at the autogenerated code, and classes that derive from
> long_base only have a copy constructor. They do not have assignment
> operators or constructors that accept long/long long. This means that I
> have to upcast to long_base to make use of these facilities. Am I
> missing something?
You can use the base_value() accessors/modifier. For example:
MyLong l; // MyLong is derived from long_base
l.base_value (123L);
This is covered in Chapter, 5 "Mapping for Built-In XML Schema Types"
in the C++/Hybrid Mapping Getting Started Guide:
http://www.codesynthesis.com/projects/xsde/documentation/cxx/hybrid/guide/#5
Boris
More information about the xsde-users
mailing list