]> Creatis software - gdcm.git/blobdiff - src/gdcmDict.h
BUG: Need to link agains gdcmoj
[gdcm.git] / src / gdcmDict.h
index 1e83f1b692720b1c7f1f908184e6ecb067f02e31..d48b96944fc028167744cba3d0afb14ab643fe99 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2005/05/11 15:01:47 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/10/23 15:32:30 $
+  Version:   $Revision: 1.44 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -23,6 +23,7 @@
 #include "gdcmDictEntry.h"
 
 #include <iostream>
+#include <fstream> // for ifstream
 #include <list>
 #include <map>
 
@@ -31,7 +32,8 @@ namespace gdcm
 
 //-----------------------------------------------------------------------------
 typedef std::string DictKey;
-typedef std::map<TagKey, DictEntry>  TagKeyHT;
+typedef std::map<TagKey, DictEntry *>  TagKeyHT;
+
 //-----------------------------------------------------------------------------
 /**
  * \brief    Dict acts a memory representation of a dicom dictionary i.e.
@@ -49,12 +51,14 @@ public:
    Dict(std::string const &filename);
    ~Dict();
 
+   bool AddDict(std::string const &filename);
+   bool RemoveDict(std::string const &filename);
 // Print
    void Print(std::ostream &os = std::cout, std::string const &indent = "");
 
 // Entries
-   bool AddEntry(DictEntry const &newEntry);
-   bool ReplaceEntry(DictEntry const &newEntry);
+   bool AddEntry(DictEntry *newEntry);
+   bool ReplaceEntry(DictEntry *newEntry);
    bool RemoveEntry (TagKey const &key);
    bool RemoveEntry (uint16_t group, uint16_t elem);
    void ClearEntry();
@@ -67,11 +71,14 @@ public:
    DictEntry *GetNextEntry();
 
 private:
+   void DoTheLoadingJob(std::ifstream &ifs);
+
    /// ASCII file holding the Dictionnary
    std::string Filename;
 
    /// Access through TagKey
    TagKeyHT KeyHt;
+   /// Iterator for the entries
    TagKeyHT::iterator ItKeyHt;
 };
 } // end namespace gdcm