From: malaterre Date: Mon, 22 Aug 2005 15:38:04 +0000 (+0000) Subject: COMP: Remove problem with static being define in a common header file X-Git-Tag: Version1.2.bp~216 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=cd6b936f711fcbc70918e6b623b4b7b2f65dc69c;p=gdcm.git COMP: Remove problem with static being define in a common header file --- diff --git a/Testing/TestUtil.cxx b/Testing/TestUtil.cxx index ba4fc909..d72b8c47 100644 --- a/Testing/TestUtil.cxx +++ b/Testing/TestUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestUtil.cxx,v $ Language: C++ - Date: $Date: 2005/08/19 16:31:06 $ - Version: $Revision: 1.14 $ + Date: $Date: 2005/08/22 15:38:04 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,7 +33,7 @@ int TestUtil(int , char *[]) float flt= 1.0; double dbl=1.0; - std::cout << "This is gdcm version: " << gdcm::GetVersion() << std::endl; + std::cout << "This is gdcm version: " << gdcm::Util::GetVersion() << std::endl; std::cout << "---------- uint16 : " << std::dec <SetValue("GDCM 1.1"); Archive->Push(e_0002_0013); diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 6551051b..95e9a077 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2005/07/18 10:20:20 $ - Version: $Revision: 1.157 $ + Date: $Date: 2005/08/22 15:38:05 $ + Version: $Revision: 1.158 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -331,6 +331,14 @@ std::string Util::GetCurrentDateTime() return tmpAll; } +/* + * \brief Provide a simple static GetVersion() function + */ +std::string Util::GetVersion() +{ + return GDCM_VERSION; +} + unsigned int Util::GetCurrentThreadID() { // FIXME the implementation is far from complete diff --git a/src/gdcmUtil.h b/src/gdcmUtil.h index 1a0be66e..3a7971b2 100644 --- a/src/gdcmUtil.h +++ b/src/gdcmUtil.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.h,v $ Language: C++ - Date: $Date: 2005/07/21 05:02:12 $ - Version: $Revision: 1.59 $ + Date: $Date: 2005/08/22 15:38:05 $ + Version: $Revision: 1.60 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -50,6 +50,7 @@ public: static std::string GetCurrentDate(); static std::string GetCurrentTime(); static std::string GetCurrentDateTime(); + static std::string GetVersion(); static unsigned int GetCurrentThreadID(); static unsigned int GetCurrentProcessID(); static bool IsCurrentProcessorBigEndian();