1 /*=========================================================================
4 Module: $RCSfile: gdcmElementSet.h,v $
6 Date: $Date: 2005/01/14 11:28:31 $
7 Version: $Revision: 1.30 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #ifndef GDCMELEMENTSET_H
20 #define GDCMELEMENTSET_H
22 #include "gdcmDocEntrySet.h"
34 typedef std::map<TagKey, DocEntry *> TagDocEntryHT;
36 //-----------------------------------------------------------------------------
39 * \ref ElementSet is based on the STL map<> container
40 * (see \ref ElementSet::TagHT), as opposed to \ref SQItem
41 * which is based on an STL list container (see \ref ListDocEntry).
42 * It contains the 'zero-level- DocEntry (out of any Dicom Sequence)
44 class GDCM_EXPORT ElementSet : public DocEntrySet
50 virtual void Print(std::ostream &os = std::cout);
52 bool AddEntry(DocEntry *Entry);
53 bool RemoveEntry(DocEntry *EntryToRemove);
54 bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
56 void WriteContent(std::ofstream *fp, FileType filetype);
58 /// Accessor to \ref TagHT
59 // Do not expose this to user (public API) !
60 // A test is using it thus put it in public (matt)
61 //TagDocEntryHT const &GetTagHT() const { return TagHT; };
64 DocEntry *GetNextEntry();
70 /// Hash Table (map), to provide fast access
72 /// Hash Table (map) iterator, used to visit the TagHT variable
73 TagDocEntryHT::iterator ItTagHT;
75 friend class Document;
76 friend class DicomDir; //For accessing private TagHT
77 friend class DocEntryArchive; //For accessing private TagHT
79 } // end namespace gdcm
80 //-----------------------------------------------------------------------------