[fdo-internals] dynamic_cast and shared libraries on Linux

Frank Warmerdam warmerdam at pobox.com
Tue Feb 20 13:40:23 EST 2007


Greg Boone wrote:
> Yes. I have seen this also with templated classes. 
> 
> I concur with Traian that the general rule to work around this issue has
> been to use static casts where possible. Typically this is the case for
> all of the FDO connection, capabilities, command, geometry interfaces,
> etc. These typically have a known type associated with them. 

Greg / Traian,

OK, I won't sweat about this too much, and I'll just update the unit
tests to avoid dynamic casts on these objects.

> One aspects of the FDO API that still required dynamic casting has been
> aspects of the FDO expression API since there is no associated type
> information to a portion of these classes. However, I have not
> encountered problems in the past in using dynamic casting in this area
> of the FDO API.

I have also confirmed that these dynamic casts work fine.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the fdo-internals mailing list