]> Creatis software - gdcm.git/commitdiff
ENH: Provide a GetVersion function, apparently need for python
authormalaterre <malaterre>
Fri, 19 Aug 2005 16:31:06 +0000 (16:31 +0000)
committermalaterre <malaterre>
Fri, 19 Aug 2005 16:31:06 +0000 (16:31 +0000)
Testing/TestUtil.cxx
src/gdcmCommon.h

index be81795aea0dd8e77c976c4570fe32ad9a3f0f5d..ba4fc909b7eb36fc69887fcebb8b70a7dc888983 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/17 11:14:56 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/08/19 16:31:06 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -33,6 +33,8 @@ int TestUtil(int , char *[])
    float flt= 1.0;
    double dbl=1.0;
 
+   std::cout << "This is gdcm version: " << gdcm::GetVersion() << std::endl;
+
    std::cout << "---------- uint16 : " << std::dec <<u16 << " = 0x" 
              << std::hex << u16 << std::endl;
    for (i=0;i<sizeof(uint16_t);i++) 
index a61ac871bf1804b48d5c89495abd8760b55e1670..f07cbcfafc0707d183325633005812e2f62e9a99 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmCommon.h,v $
   Language:  C++
-  Date:      $Date: 2005/08/18 14:34:47 $
-  Version:   $Revision: 1.83 $
+  Date:      $Date: 2005/08/19 16:31:07 $
+  Version:   $Revision: 1.84 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -209,6 +209,13 @@ struct Element
    std::string Value;
 };
 
+// Provide a simple static GetVersion() function
+
+static const char *GetVersion()
+{
+  return GDCM_VERSION;
+}
+
 } //namespace gdcm
 //-----------------------------------------------------------------------------
 #endif