Program: gdcm
Module: $RCSfile: gdcmDict.cxx,v $
Language: C++
- Date: $Date: 2004/10/18 02:17:06 $
- Version: $Revision: 1.46 $
+ Date: $Date: 2004/10/18 02:31:58 $
+ Version: $Revision: 1.47 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* @param key (group|element)
* @return false if Dicom Dictionary Entry doesn't exist
*/
-bool Dict::RemoveEntry(TagKey key)
+bool Dict::RemoveEntry(TagKey const & key)
{
- if(KeyHt.count(key) == 1)
+ TagKeyHT::const_iterator it = KeyHt.find(key);
+ if(it != KeyHt.end())
{
- DictEntry* entryToDelete = KeyHt.find(key)->second;
+ DictEntry* entryToDelete = it->second;
if ( entryToDelete )
{
*/
DictEntry* Dict::GetDictEntryByName(TagName const & name)
{
- if ( !NameHt.count(name))
+ TagNameHT::const_iterator it = NameHt.find(name);
+ if ( it == NameHt.end() )
{
return 0;
}
- return NameHt.find(name)->second;
+ return it->second;
}
/**
DictEntry* Dict::GetDictEntryByNumber(uint16_t group, uint16_t element)
{
TagKey key = DictEntry::TranslateToKey(group, element);
- if ( !KeyHt.count(key) )
+ TagKeyHT::const_iterator it = KeyHt.find(key);
+ if ( it == KeyHt.end() )
{
return 0;
}
- return KeyHt.find(key)->second;
+ return it->second;
}
/**
Program: gdcm
Module: $RCSfile: gdcmDict.h,v $
Language: C++
- Date: $Date: 2004/10/18 02:17:06 $
- Version: $Revision: 1.20 $
+ Date: $Date: 2004/10/18 02:31:58 $
+ Version: $Revision: 1.21 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Entries
bool AddNewEntry (DictEntry *newEntry);
bool ReplaceEntry(DictEntry *newEntry);
- bool RemoveEntry (TagKey key);
+ bool RemoveEntry (TagKey const & key);
bool RemoveEntry (uint16_t group, uint16_t element);
// Tag
Program: gdcm
Module: $RCSfile: gdcmDictSet.cxx,v $
Language: C++
- Date: $Date: 2004/10/18 02:17:07 $
- Version: $Revision: 1.39 $
+ Date: $Date: 2004/10/18 02:31:58 $
+ Version: $Revision: 1.40 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* @param name Symbolic name that be used as identifier of the newly
* created dictionary.
*/
-Dict *DictSet::LoadDictFromFile(std::string const & fileName,
+Dict *DictSet::LoadDictFromFile(std::string const & filename,
DictKey const & name)
{
- Dict *newDict = new Dict(fileName);
+ Dict *newDict = new Dict(filename);
AppendDict(newDict, name);
return newDict;