#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 |
Classes | |
| class | gdcm::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::CMD_ASSERT,obj,"",""); \
assert ( arg ); \
} \
}
Definition at line 270 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::CMD_DEBUG,obj,msg,adds); \
} \
}
Definition at line 184 of file gdcmDebug.h. |
|
|
|
Value: { \
gdcmMessageBodyMacro(gdcm::CMD_ERROR,obj,msg,""); \
}
Definition at line 249 of file gdcmDebug.h. |
|
|
|
Value: { \
if( Debug::GetLogFlag() ) \
gdcmMessageBodyMacro(gdcm::CMD_LOG,obj,msg,""); \
}
Definition at line 212 of file gdcmDebug.h. |
|
|
Definition at line 217 of file gdcmDebug.h. |
|
|
Value: { \
std::ostringstream osmacro; \
osmacro << "In " __FILE__ ", line " << __LINE__ \
<< ", function " << GDCM_FUNCTION << "\n" \
<< adds << msg << "\n\n"; \
gdcm::Debug::SendToOutput(type,osmacro.str(),obj); \
}
Definition at line 164 of file gdcmDebug.h. |
|
|
Definition at line 280 of file gdcmDebug.h. |
|
|
Definition at line 200 of file gdcmDebug.h. |
|
|
Definition at line 255 of file gdcmDebug.h. Referenced by gdcm::Util::CreateUniqueUID(), gdcm::gdcm_read_JPEG2000_file(), and gdcm::DirList::IsDirectory(). |
|
|
Definition at line 219 of file gdcmDebug.h. |
|
|
Definition at line 237 of file gdcmDebug.h. Referenced by gdcm::DictSet::BuildDictPath(), gdcm::Util::GetMACAddress(), and gdcm::Global::Global(). |
|
|
Value: { \
if( Debug::GetWarningFlag() ) \
gdcmMessageBodyMacro(gdcm::CMD_WARNING,obj,msg,""); \
}
Definition at line 230 of file gdcmDebug.h. |
|
1.4.4