# gdcmXMLPrivateDictReader.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-2009 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 __gdcmXMLPrivateDictReader_h
    00016 #define __gdcmXMLPrivateDictReader_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 XMLPrivateDictReader : public TableReader
    00031 {
    00032 public:
    00033   XMLPrivateDictReader();
    00034   ~XMLPrivateDictReader() {}
    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 PrivateDict & GetPrivateDict() { return PDict; }
    00041
    00042 protected:
    00043   void HandleEntry(const char **atts);
    00044   void HandleDescription(const char **atts);
    00045
    00046 private:
    00047   PrivateDict PDict;
    00048   PrivateTag CurrentTag;
    00049   DictEntry CurrentDE;
    00050   bool ParsingDescription;
    00051   std::string Description;
    00052 };
    00053
    00054 } // end namespace gdcm
    00055
    00056 #endif //__gdcmXMLPrivateDictReader_h