[Dcmlib] new DicomDir syntax: aka Deprecation pass
jpr at creatis.insa-lyon.fr
Thu Jul 14 16:30:10 CEST 2005
Mathieu Malaterre wrote:
> Hum this is pretty bad. I thought the old functionanlities where
> being kept back...
The functionalities are kept.
I flaged them as 'deprecated', because 'old style' was a bad idea.
(Unaware user was allowed to do stupid things : remember the 'cascade'
Luca wanted to use 'new style' -he was right to do that-, and get
problemes on a wery short and simple program sequence.
(Probabely on 'new style' line was missing)
> I would like then to introduce a deprecation mechanism that will
> prevent event like this. A number of compilers (well in fact only
> gcc/and visual studio but there are the main one), support a notion of
> 'deprecated functions'. Therefore at *compiler* time the code produces
> warning like:
> ...this function is deprecated...
Does it make a sense if I add a run time Warning message to tell
user/debuger to update his code ?
> But the at run time the code still works ok.
> JP can we keep the old API or is this too much troubles ? Is this
> already broken ?
> Luca Picello wrote:
>> Hi all,
>> Syncronizing with today's CVS my code is not working anymore.
>> Its code is very easy and I wonder if you can help me on make it
>> working again.
>> gdcm::DicomDir *e1;
>> gdcm::DicomDirPatient *pa;
>> e1 = new gdcm::DicomDir( fold.c_str() , true ); // DEPRECATED OLD
>> GDCM SYNTAX
>> // NEW SYNTAX AS DESCRIBED IN ML BY JP:
>> e1 = new gdcm::DicomDir();
>> if( e1->IsReadable() )
>> pa = e1->GetFirstPatient();
>> now both fails!!
>> I do have also access violation error doing (because of failure):
>> delete e1;
>> at: gdcmDicomDir.cxx at line 163 ( delete MetaElems; in
>> DicomDir::~DicomDir() )
>> thank you all,
>> ps: does anybody encoured my latest reported bug on halt on loading 2
>> I can prepare a simple test when gdcm will be functional to me again...
>> Dcmlib mailing list
>> Dcmlib at creatis.insa-lyon.fr
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
More information about the Dcmlib