+2004-07-19 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+ * src/gdcmCommon.h, gdcmDict.cxx, gdcmTS.cxx : bug fix for msvc6 compilation
+ * src/gdcmDebug.[h|cxx] : bug fix for msvc6 compilation. Replace the dbg
+ variable (instance of gdcmDebug) by a definition macro, and the instance
+ is now in static in the gdcmDebug class
+ * src/gdcmSQItem.h : (FIXME) remove an undefined method
+ * Test/PrintAllDocument.cxx : bug fix in the result of the test
+
2004-07-06 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
* WARNING: ctest now depends more tightly on gdcmData. You should
check out gdcmData properly for things to run smoothly...
* .... alas, the python testSuite is still broken.
2004-05-18 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
- * gdcmPython/gdcm.i : remove useless lines concerning the gdcmGlobal
+ * gdcmPython/gdcm.i : remove useless lines concerning the gdcmGlobal
gdcmGlob
* gdcmPython/setup.py : replace the use of cvar.gdcmGlob to gdcmGlobal
* src/gdcmUtil.h : export methods
Program: gdcm
Module: $RCSfile: gdcmCommon.h,v $
Language: C++
- Date: $Date: 2004/07/02 13:55:27 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2004/07/19 11:51:26 $
+ Version: $Revision: 1.29 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
#ifdef __GNUC__
#ifndef HAVE_NO_STDINT_H
-#include <stdint.h> // For uint16_t and uint32_t
+#include <stdint.h> // For uint8_t uint16_t and uint32_t
#else
+typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#define UINT32_MAX (4294967295U)
#endif
#ifdef _MSC_VER
+typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#define UINT32_MAX (4294967295U)
Program: gdcm
Module: $RCSfile: gdcmDebug.cxx,v $
Language: C++
- Date: $Date: 2004/06/20 18:08:47 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2004/07/19 11:51:26 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <iostream>
#include "gdcmDebug.h"
-/**
- * \ingroup Globals
- * \brief Instance of debugging utility.
- */
-gdcmDebug dbg;
+//-----------------------------------------------------------------------------
+gdcmDebug gdcmDebug::debug;
+//-----------------------------------------------------------------------------
/**
* \brief constructor
* @param level debug level
*/
-gdcmDebug::gdcmDebug(int level) {
+gdcmDebug::gdcmDebug(int level)
+{
DebugLevel = level;
}
* \brief Accessor
* @param level Set the debug level
*/
-void gdcmDebug::SetDebug(int level) {
+void gdcmDebug::SetDebug(int level)
+{
DebugLevel = level;
}
* @param Msg1 first message part
* @param Msg2 second message part
*/
-void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) {
+void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2)
+{
if (Level > DebugLevel)
return ;
std::cerr << Msg1 << ' ' << Msg2 << std::endl;
* @param Msg1 first message part
* @param Msg2 second message part
*/
-void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) {
+void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2)
+{
if (!Test)
return;
std::cerr << Msg1 << ' ' << Msg2 << std::endl;
* @param Msg3 Third message part
*/
void gdcmDebug::Error(const char* Msg1, const char* Msg2,
- const char* Msg3) {
+ const char* Msg3)
+{
std::cerr << Msg1 << ' ' << Msg2 << ' ' << Msg3 << std::endl;
Exit(1);
}
* @param Msg1 first message part
* @param Msg2 second message part
*/
- void gdcmDebug::Assert(int Level, bool Test,
- const char * Msg1, const char * Msg2) {
+void gdcmDebug::Assert(int Level, bool Test,
+ const char * Msg1, const char * Msg2)
+{
if (Level > DebugLevel)
return ;
if (!Test)
* \brief Exit
* @param a return code
*/
-void gdcmDebug::Exit(int a) {
+void gdcmDebug::Exit(int a)
+{
#ifdef __GNUC__
std::exit(a);
#endif
exit(a); // Found in #include <stdlib.h>
#endif
}
+
+/**
+ * \brief Get the debug instance
+ * \return Reference to the debug instance
+ */
+gdcmDebug &gdcmDebug::GetReference()
+{
+ return gdcmDebug::debug;
+}
+
Program: gdcm
Module: $RCSfile: gdcmDebug.h,v $
Language: C++
- Date: $Date: 2004/06/20 18:08:47 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2004/07/19 11:51:26 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef GDCMDEBUG_H
#define GDCMDEBUG_H
+#include "gdcmCommon.h"
+
+//-----------------------------------------------------------------------------
+#define dbg gdcmDebug::GetReference()
+
+//-----------------------------------------------------------------------------
+
/**
* \ingroup gdcmDebug
* \brief gdcmDebug is an object for debugging in program.
* Shown only when the debug level is higher than the
* message level.
*/
-class gdcmDebug {
+class GDCM_EXPORT gdcmDebug {
public:
gdcmDebug(int level = -1);
void Assert(int, bool, const char*, const char*);
void Exit(int);
+ static gdcmDebug &GetReference();
+
private:
/// warning message level to be displayed
int DebugLevel;
-};
-extern gdcmDebug dbg;
+/// Instance of debugging utility.
+ static gdcmDebug debug;
+};
#endif
Program: gdcm
Module: $RCSfile: gdcmDict.cxx,v $
Language: C++
- Date: $Date: 2004/07/02 13:55:27 $
- Version: $Revision: 1.38 $
+ Date: $Date: 2004/07/19 11:51:26 $
+ Version: $Revision: 1.39 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
from >> vr;
from >> fourth;
eatwhite(from);
- getline(from, name); /// MEMORY LEAK in std::getline<>
+ std::getline(from, name); /// MEMORY LEAK in std::getline<>
gdcmDictEntry * newEntry = new gdcmDictEntry(group, element,
vr, fourth, name);
Program: gdcm
Module: $RCSfile: gdcmSQItem.h,v $
Language: C++
- Date: $Date: 2004/07/02 13:55:28 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2004/07/19 11:51:26 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
virtual bool AddEntry(gdcmDocEntry *Entry); // add to the List
gdcmDocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element);
- gdcmDocEntry *GetDocEntryByName (std::string Name);
+ // FIXME method to write
+ //gdcmDocEntry *GetDocEntryByName (std::string Name);
bool SetEntryByNumber(std::string val, uint16_t group, uint16_t element);
Program: gdcm
Module: $RCSfile: gdcmTS.cxx,v $
Language: C++
- Date: $Date: 2004/06/23 03:36:24 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2004/07/19 11:51:26 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
from >> key;
eatwhite(from);
- getline(from, name); /// MEMORY LEAK
+ std::getline(from, name); /// MEMORY LEAK
if(key!="")
{