[xsd-users] retrieving polygon from raeumlicherGeltungsbereich
Boris Kolpackov
boris at codesynthesis.com
Mon Nov 19 12:41:12 EST 2007
Hi Jan,
Jan Pauwels <Jan.Pauwels at graphicomp.com> writes:
> ::gml::SurfacePropertyType surf = *j;
> ::gml::AbstractSurfaceType absurf = surf._Surface();
> ::gml::AbstractGMLType ab = absurf;
You need to use references instead of making copies:
gml::SurfacePropertyType& surf = *j;
gml::AbstractSurfaceType& absurf = surf._Surface();
gml::AbstractGMLType& ab = absurf;
When you make a copy using a copy constructor, you "slice" the object
and only get the statically-typed portion of it. This is why you
dynamic_cast fails.
Also note that this is a fairly basic C++ knowledge and we normally
don't help with such problems on this mailing list.
Boris
More information about the xsd-users
mailing list