[Insight-users] itkSTLContainerAdaptorTest - fix for Borland

Luis Ibanez luis.ibanez@kitware.com
Wed, 27 Nov 2002 13:11:23 -0500


Hi Dean, Ofri,

Probaly making the derivation public is the
right solution here. The Adaptor seems to
be an overkill since itk containers are
actually std::containers anyways.

The only purpouse of the adaptor here is
to get around of the encapsulation provided
by the private derivation.

We will have to put a big warning on the
documentation stating that the STL interface
is left there only to be used at your own
risk...

and we could remove the STL adaptor class.



  Does it sound good  ?


    Luis


==================================

Dean Inglis wrote:

> Hi,
> 
> 1) Is the templating over the std::container (hiding by private
> inheritance) meant to add SmartPointer functionality to
> the std::container?  If no, why not just use the std::containers
> as they are?
> 
> anyway, making them public derivations without the
> incorrect fix gives:
> 
> Changing directory into c:\Builder\itkRelease\Testing\Code\Common
> Testing itkSTLContainerAdaptorTest        Passed
> Testing the VectorContainer ----- Testing non-const Adaptor
> VectorContainer (009852C8)
>   Reference Count: 1
>   Modified Time: 1
>   Debug: Off
>   Observers:
>     none
> 
> Testing assignment... Passed !
> Testing index access... Passed !
> ----- Testing const Adaptor
> Testing reading assignment... Passed !
> Testing index access... Passed !
> 
> VectorContainer test passed !
> Testing the MapContainer
> ----- Testing non-const Adaptor
> MapContainer (009858D8)
>   Reference Count: 1
>   Modified Time: 3
>   Debug: Off
>   Observers:
>     none
> 
> Testing assignment... Passed !
> Testing index access... Passed !
> ----- Testing const Adaptor
> Testing reading assignment... Passed !
> Testing index access... Passed !
> 
> MapContainer test passed !
> 
> 
> 
> The following tests passed:
> 	itkSTLContainerAdaptorTest
> 
> 100% tests passed, 0 tests failed out of 1
> 
> 2) do the default std::allocator(s) in a given std::container
> need to be fleshed out explicitly for Borland? see for e.g.,
> http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Code/Algorithms/itkLaplacianSe
> gmentationLevelSetImageFilter.h?cvsroot=Insight&sortby=date
> revison 1.3
> 
> making
> 
> Dean
>