GDCM  2.2.6
Classes | Namespaces | Macros
gdcmTrace.h File Reference
#include "gdcmTypes.h"
#include "gdcmSystem.h"
#include <iosfwd>
#include <cassert>
Include dependency graph for gdcmTrace.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gdcm::Trace
 Trace. More...
 

Namespaces

 gdcm
 

Macros

#define GDCM_FUNCTION   "<unknow>"
 
#define gdcmAssertAlwaysMacro(arg)   gdcmAssertMacro(arg)
 AssertAlways. More...
 
#define gdcmAssertMacro(arg)
 Assert. More...
 
#define gdcmDebugMacro(msg)
 Debug. More...
 
#define gdcmErrorMacro(msg)
 Error this is pretty bad, more than just warning It could mean lost of data, something not handle... More...
 
#define gdcmWarningMacro(msg)
 Warning. More...
 

Macro Definition Documentation

#define GDCM_FUNCTION   "<unknow>"
#define gdcmAssertAlwaysMacro (   arg)    gdcmAssertMacro(arg)

AssertAlways.

Parameters
argargument to test An easy solution to pass also a message is to do: gdcmAssertMacro( "my message" && 2 < 3 )

Referenced by gdcm::SequenceOfFragments::ReadValue(), and gdcm::VR::Write().

#define gdcmAssertMacro (   arg)
Value:
{ \
if( !(arg) ) \
{ \
std::ostringstream osmacro; \
osmacro << "Assert: In " __FILE__ ", line " << __LINE__ \
<< ", function " << GDCM_FUNCTION \
<< "\n\n"; \
std::ostream &_os = gdcm::Trace::GetErrorStream(); \
_os << osmacro.str() << std::endl; \
assert ( arg ); \
} \
}
#define GDCM_FUNCTION
Definition: gdcmTrace.h:109
static std::ostream & GetErrorStream()

Assert.

Parameters
argargument to test An easy solution to pass also a message is to do: gdcmAssertMacro( "my message" && 2 < 3 )

Referenced by gdcm::PixelFormat::SetSamplesPerPixel().

#define gdcmDebugMacro (   msg)
Value:
{ \
{ \
std::ostringstream osmacro; \
osmacro << "Debug: In " __FILE__ ", line " << __LINE__ \
<< ", function " << GDCM_FUNCTION << '\n' \
<< "Last system error was: " \
<< gdcm::System::GetLastSystemError() << '\n' << msg; \
std::ostream &_os = gdcm::Trace::GetDebugStream(); \
_os << osmacro.str() << "\n\n" << std::endl; \
} \
}
#define GDCM_FUNCTION
Definition: gdcmTrace.h:109
static std::ostream & GetDebugStream()
static const char * GetLastSystemError()
Return the last error.
static bool GetDebugFlag()

Debug.

Parameters
msgmessage part

Referenced by gdcm::ByteValue::ByteValue(), gdcm::BasicOffsetTable::Read(), gdcm::SequenceOfItems::Read(), gdcm::Item::Read(), gdcm::VR::Read(), gdcm::SequenceOfFragments::ReadPreValue(), gdcm::SequenceOfFragments::ReadValue(), and gdcm::ByteValue::SetLength().

#define gdcmErrorMacro (   msg)
Value:
{ \
{ \
std::ostringstream osmacro; \
osmacro << "Error: In " __FILE__ ", line " << __LINE__ \
<< ", function " << GDCM_FUNCTION << '\n' \
<< msg << "\n\n"; \
std::ostream &_os = gdcm::Trace::GetErrorStream(); \
_os << osmacro.str() << std::endl; \
} \
}
#define GDCM_FUNCTION
Definition: gdcmTrace.h:109
static std::ostream & GetErrorStream()
static bool GetErrorFlag()

Error this is pretty bad, more than just warning It could mean lost of data, something not handle...

Parameters
msgsecond message part

Referenced by gdcm::CommandDataSet::Insert(), gdcm::FileMetaInformation::Insert(), gdcm::DataSet::Insert(), gdcm::Item::Read(), and gdcm::Fragment::ReadBacktrack().

#define gdcmWarningMacro (   msg)
Value:
{ \
{ \
std::ostringstream osmacro; \
osmacro << "Warning: In " __FILE__ ", line " << __LINE__ \
<< ", function " << GDCM_FUNCTION << "\n" \
<< msg << "\n\n"; \
std::ostream &_os = gdcm::Trace::GetWarningStream(); \
_os << osmacro.str() << std::endl; \
} \
}
#define GDCM_FUNCTION
Definition: gdcmTrace.h:109
static bool GetWarningFlag()
static std::ostream & GetWarningStream()

Warning.

Parameters
msgmessage part

Referenced by gdcm::DataSet::InsertDataElement(), gdcm::SequenceOfItems::Read(), gdcm::Item::Read(), gdcm::Fragment::ReadBacktrack(), gdcm::Fragment::ReadValue(), gdcm::SequenceOfFragments::ReadValue(), and gdcm::Item::Write().


Generated on Sat Dec 21 2013 05:56:19 for GDCM by doxygen 1.8.5
SourceForge.net Logo