#include "gdcmCommon.h"#include "gdcmCommand.h"#include <iostream>#include <sstream>#include <fstream>#include <assert.h>#include <errno.h>Include dependency graph for gdcmDebug.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | GDCM_NAME_SPACE |
Classes | |
| class | GDCM_NAME_SPACE::Debug |
Debug is an object for warning/logging/tracing programs. It has the following modes :
| |
Defines | |
| #define | GDCM_FUNCTION "<unknow>" |
| #define | gdcmMessageBodyMacro(type, obj, msg, adds) |
| Debug : To be used to help bug tracking developer. | |
| #define | gdcmDebugBodyMacro(obj, msg) |
| Debug : To be used to help bug tracking developer. | |
| #define | gdcmDebugMacro(msg) gdcmDebugBodyMacro(NULL,msg) |
| #define | gdcmStaticDebugMacro(msg) gdcmDebugBodyMacro(NULL,msg) |
| #define | gdcmLogBodyMacro(obj, msg) |
| Log : we display messages when anything is not Dicom Kosher. | |
| #define | gdcmLogMacro(msg) gdcmLogBodyMacro(this,msg) |
| #define | gdcmStaticLogMacro(msg) gdcmLogBodyMacro(NULL,msg) |
| #define | gdcmWarningBodyMacro(obj, msg) |
| Warning : To be used to warn the user when some oddity occurs. | |
| #define | gdcmWarningMacro(msg) gdcmWarningBodyMacro(this,msg) |
| #define | gdcmStaticWarningMacro(msg) gdcmWarningBodyMacro(NULL,msg) |
| #define | gdcmErrorBodyMacro(obj, msg) |
| Error : To be used when unecoverabale error occurs at a 'deep' level. (don't use it if file is not ACR/DICOM!). | |
| #define | gdcmErrorMacro(msg) gdcmErrorBodyMacro(this,msg) |
| #define | gdcmStaticErrorMacro(msg) gdcmErrorBodyMacro(NULL,msg) |
| #define | gdcmAssertBodyMacro(obj, arg) |
| Assert : To be used when an *absolutely* impossible error occurs No function should be allowed to stop the process instead of warning the caller! | |
| #define | gdcmAssertMacro(msg) gdcmAssertBodyMacro(NULL,msg) |
| #define | gdcmStaticAssertMacro(msg) gdcmAssertBodyMacro(NULL,msg) |
|
|
Definition at line 157 of file gdcmDebug.h. |
|
|
Value: { \
if( !(arg) ) \
{ \
gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_ASSERT,obj,"","");\
assert ( arg ); \
} \
}
Definition at line 278 of file gdcmDebug.h. |
|
|
|
Value: { \
if( Debug::GetDebugFlag() ) \
{ \
std::string adds=""; \
if( errno ) \
{ \
adds = "Last system error was: "; \
adds += strerror(errno); \
adds += "\n"; \
} \
gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_DEBUG,obj,msg,adds);\
} \
}
Definition at line 188 of file gdcmDebug.h. |
|
|
|
Value: { \
gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_ERROR,obj,msg,"");\
}
Definition at line 256 of file gdcmDebug.h. |
|
|
|
Value: { \
if( Debug::GetLogFlag() ) \
gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_LOG,obj,msg,"");\
}
Definition at line 217 of file gdcmDebug.h. |
|
|
Definition at line 222 of file gdcmDebug.h. |
|
|
Value: { \
std::ostringstream osmacro; \
osmacro << "In " __FILE__ ", line " << __LINE__ \
<< ", function " << GDCM_FUNCTION << "\n" \
<< adds << msg << "\n\n"; \
GDCM_NAME_SPACE::Debug::SendToOutput(type,osmacro.str(),obj);\
}
Definition at line 167 of file gdcmDebug.h. |
|
|
Definition at line 288 of file gdcmDebug.h. |
|
|
Definition at line 204 of file gdcmDebug.h. |
|
|
Definition at line 262 of file gdcmDebug.h. Referenced by GDCM_NAME_SPACE::DirList::IsDirectory(). |
|
|
Definition at line 224 of file gdcmDebug.h. |
|
|
Definition at line 243 of file gdcmDebug.h. Referenced by GDCM_NAME_SPACE::DictSet::BuildDictPath(), GDCM_NAME_SPACE::Util::GetMACAddress(), and GDCM_NAME_SPACE::Global::Global(). |
|
|
Value: { \
if( Debug::GetWarningFlag() ) \
gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_WARNING,obj,msg,"");\
}
Definition at line 236 of file gdcmDebug.h. |
|
1.4.6