From 8715f3d6b69ba43c991687849781fefb884a7bc1 Mon Sep 17 00:00:00 2001 From: malaterre Date: Wed, 2 Feb 2005 16:16:07 +0000 Subject: [PATCH] BUG: Fix problem with typedef. When you use a typedef within a namespace + class it is only with a namespace AND the class. Declare it within the namespace only --- src/gdcmSerieHelper.cxx | 12 ++++-------- src/gdcmSerieHelper.h | 15 +++++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/gdcmSerieHelper.cxx b/src/gdcmSerieHelper.cxx index 77849c9f..dba1e90c 100644 --- a/src/gdcmSerieHelper.cxx +++ b/src/gdcmSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 15:12:09 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/02/02 16:16:07 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,8 +27,6 @@ namespace gdcm { -typedef std::list GdcmFileList; -typedef std::vector GdcmFileVector; //----------------------------------------------------------------------------- // Constructor / Destructor @@ -155,9 +153,7 @@ void SerieHelper::OrderGdcmFileList(GdcmFileList *CoherentGdcmFileList) * \brief Get the first List while visiting the CoherentFileListHT * @return The first GdcmFileList if found, otherwhise NULL */ - std::list *SerieHelper::GetFirstCoherentFileList() -// Why doesn't it compile ?!? -//GdcmFileList *SerieHelper::GetFirstCoherentFileList() +GdcmFileList *SerieHelper::GetFirstCoherentFileList() { ItListHt = CoherentGdcmFileListHT.begin(); if( ItListHt != CoherentGdcmFileListHT.end() ) @@ -170,7 +166,7 @@ void SerieHelper::OrderGdcmFileList(GdcmFileList *CoherentGdcmFileList) * \note : meaningfull only if GetFirstCoherentFileList already called * @return The next GdcmFileList if found, otherwhise NULL */ -std::list *SerieHelper::GetNextCoherentFileList() +GdcmFileList *SerieHelper::GetNextCoherentFileList() { gdcmAssertMacro (ItListHt != CoherentGdcmFileListHT.end()); diff --git a/src/gdcmSerieHelper.h b/src/gdcmSerieHelper.h index 45fcd4f4..47e7178d 100644 --- a/src/gdcmSerieHelper.h +++ b/src/gdcmSerieHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.h,v $ Language: C++ - Date: $Date: 2005/02/02 15:12:09 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/02/02 16:16:07 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,11 +20,14 @@ #define GDCMSERIEHELPER_H #include "gdcmCommon.h" + #include #include + namespace gdcm { class File; +typedef std::list GdcmFileList; //----------------------------------------------------------------------------- /** @@ -37,12 +40,12 @@ class File; class GDCM_EXPORT SerieHelper { public: - typedef std::list GdcmFileList; typedef std::map CoherentFileListmap; + typedef std::vector GdcmFileVector; - SerieHelper(); - ~SerieHelper(); - void Print(); + SerieHelper(); + ~SerieHelper(); + void Print(); /// \todo should return bool or throw error ? void AddFileName(std::string const &filename); -- 2.45.1