Program: gdcm
Module: $RCSfile: gdcmDict.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:49:41 $
- Version: $Revision: 1.66 $
+ Date: $Date: 2005/01/18 14:28:32 $
+ Version: $Revision: 1.68 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief Print all the dictionary entries contained in this dictionary.
* Entries will be sorted by tag i.e. the couple (group, element).
* @param os The output stream to be written to.
+ * @param indent indent
*/
void Dict::Print(std::ostream &os, std::string const & )
{
DictEntry *Dict::GetFirstEntry()
{
ItKeyHt = KeyHt.begin();
- return &(ItKeyHt->second);
+ if( ItKeyHt != KeyHt.end() )
+ return &(ItKeyHt->second);
+ return NULL;
}
/**
*/
DictEntry *Dict::GetNextEntry()
{
- if (ItKeyHt != KeyHt.end())
- {
- DictEntry *tmp = &(ItKeyHt->second);
- ++ItKeyHt;
+ gdcmAssertMacro (ItKeyHt != KeyHt.end());
- return tmp;
- }
- else
{
- return NULL;
+ ++ItKeyHt;
+ if (ItKeyHt != KeyHt.end())
+ return &(ItKeyHt->second);
}
+ return NULL;
}
//-----------------------------------------------------------------------------