# gdcmXMLDictReader.h

Go to the documentation of this file.

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