[Insight-developers] ExceptionObject Borland Compile errors

Luis Ibanez luis.ibanez at kitware.com
Wed May 28 17:13:07 EDT 2008


Hi Niels,

Have you made any progress on this issue ?

Would you like some help ?

It will be nice to solve it before the Dashboard closes for the day.

I have a Borland build and can help if needed.

Please let me know,



    Thanks



       Luis


------------------
Niels Dekker wrote:
> Brad King wrote:
> 
>> The itk SmartPointer is not designed for working with
>> incomplete types.
> 
> 
> It works fine on GCC and MSVC, as I tested beforehand.  By the time 
> SmartPointer needs to access member functions of the type (in 
> itkExceptionObject.cxx), the complete type definitions are available. So 
> I think it's really a Borland issue.
> 
>> I suggest making the smart pointer type point at a
>> LightObject (or other complete type used as a base class for the
>> internal data type) and then downcast inside the .cxx file.
> 
> 
> Good suggestion...  Still things are even more tricky: when we would 
> declare ExceptionObject::m_ExceptionData as SmartPointer<LightObject>, 
> we would need to #include "itkLightObject.h" within 
> itkExceptionObject.h, right?  Unfortunately doing so would cause a lot 
> of compile errors, in unrelated CXX files that already do #include 
> "itkLightObject.h":
> 
> #include "itkLightObject.h" // error: LightObject undeclared identifier
> 
> It's because "itkLightObject.h" indirectly includes 
> "itkExceptionObject.h" (via "itkMacro.h") already!  You should really 
> try it yourself, because it's hard to explain.
> 
> So now I'm not entirely sure if LightObject can be used to do the 
> reference counting of ExceptionObject's data, because of this Borland 
> issue...  What do you think?
> 
> Kind regards, Niels
> 
> 
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 


More information about the Insight-developers mailing list