X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocEntry.h;h=ee5c7eb64aecd8c565d239b5c72e87e9ba313cdf;hb=4c0fe0142482ede7dd8f5408f9303d78c213435b;hp=6791b02e20cf1edd4e72f4bb6ca06ddc7e460f7a;hpb=cb6cf86b2b3cc6b43d40561fb9552ebd19fdbc99;p=gdcm.git diff --git a/src/gdcmDocEntry.h b/src/gdcmDocEntry.h index 6791b02e..ee5c7eb6 100644 --- a/src/gdcmDocEntry.h +++ b/src/gdcmDocEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.h,v $ Language: C++ - Date: $Date: 2005/10/23 15:32:31 $ - Version: $Revision: 1.54 $ + Date: $Date: 2005/11/29 12:48:46 $ + Version: $Revision: 1.59 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,7 +19,7 @@ #ifndef GDCMDOCENTRY_H #define GDCMDOCENTRY_H -#include "gdcmBase.h" +#include "gdcmRefCounter.h" #include "gdcmDictEntry.h" #include @@ -35,12 +35,11 @@ class SeqEntry; * \brief The dicom header of a Dicom file contains a set of such entries * (when successfuly parsed against a given Dicom dictionary) */ -class GDCM_EXPORT DocEntry : public Base +class GDCM_EXPORT DocEntry : public RefCounter { -public: - DocEntry(DictEntry*); - virtual ~DocEntry(); + gdcmTypeMacro(DocEntry); +public: virtual void Print (std::ostream &os = std::cout, std::string const &indent = ""); virtual void WriteContent(std::ofstream *fp, FileType filetype); @@ -93,10 +92,11 @@ public: virtual void SetLength(uint32_t l) { Length = l; } /// \brief Returns the actual value length of the current Dicom entry /// \warning this value is not *always* the one stored in the Dicom header - /// in case of well knowned bugs + /// in case of well known bugs const uint32_t &GetLength() const { return Length; } uint32_t GetFullLength(); + virtual uint32_t ComputeFullLength() = 0; // The following 3 members, for internal use only ! /// \brief Sets the offset of the Dicom entry @@ -122,10 +122,13 @@ public: bool IsItemDelimitor(); bool IsItemStarter(); bool IsSequenceDelimitor(); - - virtual void Copy(DocEntry *e); + + virtual void Copy(DocEntry *doc); protected: + DocEntry(DictEntry*); + virtual ~DocEntry(); + /// \brief pointer to the underlying Dicom dictionary element DictEntry *DicomDict;