]> Creatis software - gdcm.git/commitdiff
GetDocEntry,GetValEntry,GetBinEntry,GetSeqEntry are now 'pure virtual' methods
authorjpr <jpr>
Wed, 19 Jan 2005 10:30:51 +0000 (10:30 +0000)
committerjpr <jpr>
Wed, 19 Jan 2005 10:30:51 +0000 (10:30 +0000)
of DocEntrySet

src/gdcmDocEntrySet.h
src/gdcmDocument.cxx

index 8d74d2cf5d9a1d5ac2624fcdf7f8c3bf56c8f585..055548d1e8ac35c5b7ffb8cca48a70092fd03747 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 15:15:38 $
-  Version:   $Revision: 1.37 $
+  Date:      $Date: 2005/01/19 10:30:51 $
+  Version:   $Revision: 1.38 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -63,16 +63,38 @@ public:
    DocEntrySet() {};
    virtual ~DocEntrySet() {};
 
-   /// \brief adds any type of entry to the entry set (pure vitual)
-   virtual bool AddEntry(DocEntry *Entry) = 0; // pure virtual
-   virtual bool RemoveEntry(DocEntry *EntryToRemove)=0; // pure virtual
-   virtual bool RemoveEntryNoDestroy(DocEntry *EntryToRemove)=0; // pure virtual
+   // ------- '... =0;' stands for 'Pure Virtual'
+
+   /// \brief adds any type of entry to the entry set
+   virtual bool AddEntry(DocEntry *Entry) = 0;
+
+   /// \brief Removes any type of entry out of the entry set, and destroys it
+   virtual bool RemoveEntry(DocEntry *EntryToRemove)=0;
+
+   /// \brief Removes any type of entry out of the entry set, DOESN'T destroy it
+   virtual bool RemoveEntryNoDestroy(DocEntry *EntryToRemove)=0;
 
    /// \brief write any type of entry to the entry set
-   virtual void WriteContent (std::ofstream *fp, FileType filetype) = 0;// pure virtual
+   virtual void WriteContent (std::ofstream *fp, 
+                              FileType filetype) = 0;
 
+   /// \brief Gets any type of DocEntry, identified by its (group,element)
    virtual DocEntry *GetDocEntry(uint16_t group,
                                  uint16_t elem) = 0;
+
+   /// \brief Gets a ValEntry, identified by its (group,element)
+   virtual ValEntry *GetValEntry(uint16_t group,
+                                 uint16_t elem) = 0;
+   /// \brief Gets a BinEntry, identified by its (group,element)
+   virtual BinEntry *GetBinEntry(uint16_t group,
+                                 uint16_t elem) = 0;
+
+   /// \brief Gets a SeqEntry, identified by its (group,element)
+   virtual SeqEntry *GetSeqEntry(uint16_t group,
+                                 uint16_t elem) = 0;
+
+   /// \brief Gets the 'string value' of a ValEntry
+   ///        identified by its (group,element) - Sorry for the name !...-
    virtual std::string GetEntry(uint16_t group, uint16_t elem) = 0;
 
    DictEntry *NewVirtualDictEntry(uint16_t group, 
index 4adb7d947cdd844e3130db7fd7f217ce7b449da0..a454f9b1d985c11bd883f02068ca020834ff1ea0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 18:03:16 $
-  Version:   $Revision: 1.198 $
+  Date:      $Date: 2005/01/19 10:30:51 $
+  Version:   $Revision: 1.199 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -409,7 +409,7 @@ bool Document::CloseFile()
       Fp = 0;
    }
 
-   return true; //FIXME how do we detect a non-close ifstream ?
+   return true; //FIXME how do we detect a non-closed ifstream ?
 }
 
 /**
@@ -620,7 +620,6 @@ SeqEntry *Document::ReplaceOrCreate( uint16_t group, uint16_t elem)
          }
       }
    }
-
    // Create a new seqEntry if necessary
    if (!seqEntry)
    {
@@ -634,7 +633,6 @@ SeqEntry *Document::ReplaceOrCreate( uint16_t group, uint16_t elem)
          return NULL;
       }
    }
-
    return seqEntry;
 } 
  
@@ -839,8 +837,8 @@ void *Document::GetEntryBinArea(uint16_t group, uint16_t elem)
 }
 
 /**
- * \brief         Loads (from disk) the element content 
- *                when a string is not suitable
+ * \brief Loads (from disk) the element content 
+ *        when a string is not suitable
  * @param group   group number of the Entry 
  * @param elem  element number of the Entry
  */
@@ -859,8 +857,8 @@ void Document::LoadEntryBinArea(uint16_t group, uint16_t elem)
 }
 
 /**
- * \brief         Loads (from disk) the element content 
- *                when a string is not suitable
+ * \brief Loads (from disk) the element content 
+ *        when a string is not suitable
  * @param elem  Entry whose binArea is going to be loaded
  */
 void Document::LoadEntryBinArea(BinEntry *elem)