-/**
- * \ingroup gdcmDicomDirElement
- * \brief returns a reference to the chained List
- * related to the META Elements of a DICOMDIR.
- */
- ListDicomDirMetaElem &GetDicomDirMetaElements()
- { return DicomDirMetaList; };
-/**
- * \ingroup gdcmDicomDirElement
- * \brief returns a reference to the chained List
- * related to the PATIENT Elements of a DICOMDIR.
- */
- ListDicomDirPatientElem &GetDicomDirPatientElements()
- { return DicomDirPatientList; };
-/**
- * \ingroup gdcmDicomDirElement
- * \brief returns a reference to the chained List
- * related to the STUDY Elements of a DICOMDIR.
- */
- ListDicomDirStudyElem &GetDicomDirStudyElements()
- { return DicomDirStudyList; };
-/**
- * \ingroup gdcmDicomDirElement
- * \brief returns a reference to the chained List
- * related to the SERIE Elements of a DICOMDIR.
- */
- ListDicomDirSerieElem &GetDicomDirSerieElements()
- { return DicomDirSerieList; };
-/**
- * \ingroup gdcmDicomDirElement
- * \brief returns a reference to the chained List
- * related to the IMAGE Elements of a DICOMDIR.
- */
- ListDicomDirImageElem &GetDicomDirImageElements()
- { return DicomDirImageList; };
+
+ /**
+ * \brief returns a reference to the chained List
+ * related to the META Elements of a DICOMDIR.
+ */
+ ListDicomDirMetaElem const &GetDicomDirMetaElements() const
+ { return DicomDirMetaList; }
+
+ /**
+ * \brief returns a reference to the chained List
+ * related to the PATIENT Elements of a DICOMDIR.
+ */
+ ListDicomDirPatientElem const &GetDicomDirPatientElements() const
+ { return DicomDirPatientList; }
+
+ /**
+ * \brief returns a reference to the chained List
+ * related to the STUDY Elements of a DICOMDIR.
+ */
+ ListDicomDirStudyElem const &GetDicomDirStudyElements() const
+ { return DicomDirStudyList; }
+
+ /**
+ * \brief returns a reference to the chained List
+ * related to the VISIT Elements of a DICOMDIR.
+ */
+ ListDicomDirVisitElem const &GetDicomDirVisitElements() const
+ { return DicomDirVisitList; }
+ /**
+ * \brief returns a reference to the chained List
+ * related to the SERIE Elements of a DICOMDIR.
+ */
+ ListDicomDirSerieElem const &GetDicomDirSerieElements() const
+ { return DicomDirSerieList; }
+
+ /**
+ * \brief returns a reference to the chained List
+ * related to the IMAGE Elements of a DICOMDIR.
+ */
+ ListDicomDirImageElem const &GetDicomDirImageElements() const
+ { return DicomDirImageList; }
+
+ // Public method to add an element
+ bool AddEntry(DicomDirType type, DicomElement const &elem);
+
+ // Only one instance of ddElem
+ void AddDicomDirElement(DicomDirType type,
+ uint16_t group, uint16_t elem);
+
+protected:
+ DicomDirElement();
+ ~DicomDirElement();