]> Creatis software - gdcm.git/commitdiff
Use GDCM_LEGACY for DicomDir, as well
authorjpr <jpr>
Wed, 20 Jul 2005 14:49:41 +0000 (14:49 +0000)
committerjpr <jpr>
Wed, 20 Jul 2005 14:49:41 +0000 (14:49 +0000)
src/gdcmDebug.h
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmFile.cxx

index 85eda8b3cae08ec08fdc3d24982d99946ff3af16..c597d65e75d1b67dd0f6416df014ff3786f4d23b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.h,v $
   Language:  C++
-  Date:      $Date: 2005/07/19 14:43:48 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2005/07/20 14:49:42 $
+  Version:   $Revision: 1.37 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -193,7 +193,11 @@ public:
 //-----------------------------------------------------------------------------
 //
 // Define GDCM_LEGACY macro to mark legacy methods where they are
-// declared in their class.  Example usage:
+// declared in their class.
+// 
+// WARNING : Don't try to use it with 'inline' methods ! 
+//
+//Example usage:
 //
 //   // @deprecated Replaced by MyOtherMethod() as of gdcm 2.0.
 //   GDCM_LEGACY(void MyMethod());
index de95ee6825d872a1402152a9fe82b9ad8bd547df..12eb27468ecaf018980834809cc03b221d76b7b7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/19 15:19:26 $
-  Version:   $Revision: 1.149 $
+  Date:      $Date: 2005/07/20 14:49:41 $
+  Version:   $Revision: 1.150 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -134,7 +134,10 @@ DicomDir::DicomDir()
  *                        and wants to explore recursively the directories
  *                      - false if user passed an already built DICOMDIR file
  *                        and wants to use it 
+ * @deprecated use : new DicomDir() + [ SetLoadMode(lm) + ] SetDirectoryName(name)
+ *              or : new DicomDir() + SetFileName(name)
  */
+#ifndef GDCM_LEGACY_REMOVE
 DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
    Document( )
 {
@@ -147,6 +150,7 @@ DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
    SetLoadMode (0x00000000); // concerns only dicom files
    Load( fileName );
 }
+#endif
 
 /**
  * \brief  Canonical destructor 
@@ -168,7 +172,8 @@ DicomDir::~DicomDir()
 // Public
 
 /**
- * \brief   Loader. use SetLoadMode(), SetFileName() before !  
+ * \brief   Loader. use SetFileName(fn) 
+ *                  or SetLoadMode(lm) + SetDirectoryName(dn)  before !  
  * @return false if file cannot be open or no swap info was found,
  *         or no tag was found.
  */
@@ -185,11 +190,13 @@ bool DicomDir::Load( )
     return DoTheLoadingJob( );   
 }
 
+ #ifndef GDCM_LEGACY_REMOVE
 /**
- * \brief   Loader. (DEPRECATED : not to break the API)
+ * \brief   Loader. (DEPRECATED : kept not to break the API)
  * @param   fileName file to be open for parsing
  * @return false if file cannot be open or no swap info was found,
  *         or no tag was found.
+ * @deprecated use SetFileName(n) + Load() instead
  */
 bool DicomDir::Load(std::string const &fileName ) 
 {
@@ -205,6 +212,13 @@ bool DicomDir::Load(std::string const &fileName )
    return DoTheLoadingJob( );
 }
 
+/// DEPRECATED : use SetDirectoryName(dn) instead
+void DicomDir::SetParseDir(bool parseDir)
+{
+   ParseDir = parseDir;
+}
+#endif
+
 /**
  * \brief   Does the Loading Job (internal use only)
  * @return false if file cannot be open or no swap info was found,
index 09d0f5e9e81b7dde08ae6cde313a5fc2bc3fc980..b47c3d306f8997f6802e4909b5a78aabb4f67746 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2005/07/17 04:28:55 $
-  Version:   $Revision: 1.64 $
+  Date:      $Date: 2005/07/20 14:49:42 $
+  Version:   $Revision: 1.65 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,6 +20,7 @@
 #define GDCMDICOMDIR_H
 
 #include "gdcmDocument.h"
+#include "gdcmDebug.h"
 
 #include <list>
 #include <vector>
@@ -36,8 +37,8 @@ class DicomDirVisit;
 class DicomDirImage;
 class SQItem;
 
-typedef std::list<DicomDirPatient *>   ListDicomDirPatient;
-typedef std::vector<Document *>  VectDocument;
+typedef std::list<DicomDirPatient *> ListDicomDirPatient;
+typedef std::vector<Document *> VectDocument;
 
 //-----------------------------------------------------------------------------
 /**
@@ -52,12 +53,11 @@ class GDCM_EXPORT DicomDir: public Document
 public:
    typedef void Method(void*);
 
-   DicomDir( std::string const &filename, bool parseDir = false ); // Deprecated
    DicomDir(); 
-                   
+   GDCM_LEGACY( DicomDir(std::string const &filename, bool parseDir = false) ); 
    ~DicomDir();
 
-   bool Load( std::string const &filename );
+   GDCM_LEGACY( bool Load(std::string const &filename) );
    bool Load( );
    void Print(std::ostream &os = std::cout, std::string const &indent = "" );
    
@@ -68,10 +68,10 @@ public:
    /// Accessor to \ref Filename
    virtual void SetFileName(std::string const &fileName) 
                    { ParseDir = false; if (Filename != fileName)
-                               Filename = fileName, IsDocumentModified = true; }
+                              Filename = fileName, IsDocumentModified = true;};
 
    /// DEPRECATED : use SetDirectoryName
-   void SetParseDir(bool parseDir)  { ParseDir = parseDir; };
+   GDCM_LEGACY( void SetParseDir(bool parseDir) );
    
    // Informations contained in the parser
    virtual bool IsReadable();
index b85f3b6c66e795cb4c56f23de7a44cde6204cb72..13570e2196845545714e5805701b3f2917c0ef85 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/20 13:31:01 $
-  Version:   $Revision: 1.253 $
+  Date:      $Date: 2005/07/20 14:49:41 $
+  Version:   $Revision: 1.254 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1732,11 +1732,12 @@ void File::ReadAndSkipEncapsulatedBasicOffsetTable()
 }
 
 // These are the deprecated method that one day should be removed (after the next release)
+
 #ifndef GDCM_LEGACY_REMOVE
 /**
- * \brief  Constructor 
+ * \brief  Constructor (DEPRECATED : temporaryly kept not to break the API)
  * @param  filename name of the file whose header we want to analyze
- * @deprecated do not use anymore
+ * @deprecated do not use any longer
  */
 File::File( std::string const &filename )
      :Document( )
@@ -1748,11 +1749,11 @@ File::File( std::string const &filename )
 }
 
 /**
- * \brief   Loader. (DEPRECATED : not to break the API)
+ * \brief   Loader. (DEPRECATED :  temporaryly kept not to break the API)
  * @param   fileName file to be open for parsing
  * @return false if file cannot be open or no swap info was found,
  *         or no tag was found.
- * @deprecated Use the Load() function instead
+ * @deprecated Use the Load() [ + SetLoadMode() ] + SetFileName() functions instead
  */
 bool File::Load( std::string const &fileName ) 
 {