GDCM
2.2.3
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMXMLPRIVATEDICTREADER_H 00015 #define GDCMXMLPRIVATEDICTREADER_H 00016 00017 #include "gdcmTableReader.h" 00018 #include "gdcmDict.h" 00019 #include "gdcmDictEntry.h" 00020 #include "gdcmTag.h" 00021 00022 namespace gdcm 00023 { 00029 class GDCM_EXPORT XMLPrivateDictReader : public TableReader 00030 { 00031 public: 00032 XMLPrivateDictReader(); 00033 ~XMLPrivateDictReader() {} 00034 00035 void StartElement(const char *name, const char **atts); 00036 void EndElement(const char *name); 00037 void CharacterDataHandler(const char *data, int length); 00038 00039 const PrivateDict & GetPrivateDict() { return PDict; } 00040 00041 protected: 00042 void HandleEntry(const char **atts); 00043 void HandleDescription(const char **atts); 00044 00045 private: 00046 PrivateDict PDict; 00047 PrivateTag CurrentTag; 00048 DictEntry CurrentDE; 00049 bool ParsingDescription; 00050 std::string Description; 00051 }; 00052 00053 } // end namespace gdcm 00054 00055 #endif //GDCMXMLPRIVATEDICTREADER_H