X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmDebug.h;h=172464871634499bc06e3b3e4c4b2b663e141641;hb=98cf38e32be18dc2b7d3d1a13e45f60717b008bc;hp=8fb72a087c02f03c2b32689dd4a960f2b09681ae;hpb=46afb30d2d016a9b1581c7ee4ca96d614a35203c;p=gdcm.git diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index 8fb72a08..17246487 100644 --- a/src/gdcmDebug.h +++ b/src/gdcmDebug.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.h,v $ Language: C++ - Date: $Date: 2005/11/28 15:20:32 $ - Version: $Revision: 1.48 $ + Date: $Date: 2005/11/29 17:21:34 $ + Version: $Revision: 1.52 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -88,7 +88,8 @@ public: static std::ostream &GetOutput (); - static void SendToOutput(unsigned int type,std::string const &msg,const CommandManager *mgr = NULL); + static void SendToOutput(unsigned int type,std::string const &msg, + const Base *object = NULL); private: static bool DebugFlag; @@ -129,7 +130,7 @@ private: * \brief Debug : To be used to help bug tracking developer * @param msg message part */ -#define gdcmMessageBodyMacro(type,obj,msg,adds) \ +#define gdcmMessageBodyMacro(type, obj, msg, adds) \ { \ std::ostringstream osmacro; \ osmacro << "In " __FILE__ ", line " << __LINE__ \ @@ -143,11 +144,11 @@ private: * @param msg message part */ #ifdef NDEBUG -#define gdcmDebugBodyMacro(obj,msg) {} +#define gdcmDebugBodyMacro(obj, msg) {} #define gdcmDebugMacro(msg) {} #define gdcmStaticDebugMacro(msg) {} #else -#define gdcmDebugBodyMacro(obj,msg) \ +#define gdcmDebugBodyMacro(obj, msg) \ { \ if( Debug::GetDebugFlag() ) \ { \ @@ -162,7 +163,7 @@ private: } \ } #define gdcmDebugMacro(msg) \ - gdcmDebugBodyMacro(this,msg) + gdcmDebugBodyMacro(NULL,msg) #define gdcmStaticDebugMacro(msg) \ gdcmDebugBodyMacro(NULL,msg) #endif //NDEBUG @@ -172,7 +173,8 @@ private: * @param msg message part */ // No NDEBUG test to always have a return of warnings !!! -#define gdcmWarningBodyMacro(obj,msg) \ +// -> Rien compris! JPRx +#define gdcmWarningBodyMacro(obj, msg) \ { \ if( Debug::GetWarningFlag() ) \ gdcmMessageBodyMacro(gdcm::CMD_WARNING,obj,msg,""); \ @@ -188,7 +190,8 @@ private: * @param msg second message part */ // No NDEBUG test to always have a return of errors !!! -#define gdcmErrorBodyMacro(obj,msg) \ +// -> Rien compris! JPRx +#define gdcmErrorBodyMacro(obj, msg) \ { \ gdcmMessageBodyMacro(gdcm::CMD_ERROR,obj,msg,""); \ } @@ -206,7 +209,8 @@ private: * gdcmAssertMacro( "my message" && 2 < 3 ) */ // No NDEBUG test to always have a return of asserts !!! -#define gdcmAssertBodyMacro(obj,arg) \ +// -> Rien compris! JPRx +#define gdcmAssertBodyMacro(obj, arg) \ { \ if( !(arg) ) \ { \ @@ -215,7 +219,7 @@ private: } \ } #define gdcmAssertMacro(msg) \ - gdcmAssertBodyMacro(this,msg) + gdcmAssertBodyMacro(NULL,msg) #define gdcmStaticAssertMacro(msg) \ gdcmAssertBodyMacro(NULL,msg)