X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocEntry.cxx;h=e54f0c987178fd52aa5ab66949aa38102c15ad04;hb=9dbffd306a2b7981cf033ab8402c774f8f970475;hp=a4011aa731b0fef048e8ec408ef6087f498088b4;hpb=8b7ccc5d0086fd3df994c18e2883bc0e3f7d1984;p=gdcm.git diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index a4011aa7..e54f0c98 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 19:54:26 $ - Version: $Revision: 1.72 $ + Date: $Date: 2005/10/20 15:24:09 $ + Version: $Revision: 1.75 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,12 +39,24 @@ DocEntry::DocEntry(DictEntry *in) { ImplicitVR = false; DicomDict = in; - SetKey( in->GetKey( ) ); Offset = 0 ; // To avoid further missprinting // init some variables ReadLength = 0; Length = 0; + + gdcmAssertMacro(DicomDict); + DicomDict->Register(); +} + +/** + * \brief Destructor from a given DictEntry + */ +DocEntry::~DocEntry() +{ + gdcmAssertMacro(DicomDict); + + DicomDict->Unregister(); } //----------------------------------------------------------------------------- @@ -239,7 +251,7 @@ void DocEntry::Print(std::ostream &os, std::string const & ) o = GetOffset(); vr = GetVR(); if ( vr == GDCM_VRUNKNOWN ) - vr=" "; + vr = " "; s << DictEntry::TranslateToKey(GetGroup(),GetElement());