From: jpr Date: Fri, 7 Jan 2005 16:07:01 +0000 (+0000) Subject: Add missing DictEntry::SetVM method X-Git-Tag: Version1.0.bp~445 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2c23b5e3fbe71eb3c945b8376b746c533a759901;p=gdcm.git Add missing DictEntry::SetVM method --- diff --git a/src/gdcmDictEntry.cxx b/src/gdcmDictEntry.cxx index 457c76c4..b754cc2c 100644 --- a/src/gdcmDictEntry.cxx +++ b/src/gdcmDictEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/07 12:29:17 $ - Version: $Revision: 1.31 $ + Date: $Date: 2005/01/07 16:07:01 $ + Version: $Revision: 1.32 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -83,6 +83,24 @@ void DictEntry::SetVR(TagName const &vr) } } +//----------------------------------------------------------------------------- +/** + * \brief If-and only if-the V(alue) M(ultiplicity) + * \ is unset then overwrite it. + * @param vr New V(alue) M(ultiplicity) to be set. + */ +void DictEntry::SetVM(TagName const &vm) +{ + if ( IsVMUnknown() ) + { + VR = vr; + } + else + { + dbg.Error(true, "DictEntry::SetVM", + "Overwriting VM might compromise a dictionary"); + } +} //----------------------------------------------------------------------------- // Protected