TBTK
Namespaces | Macros
TBTKMacros.h File Reference

Precompiler macros. More...

#include "Streams.h"
#include <cstring>
#include <sstream>

Go to the source code of this file.

Namespaces

 TBTKcalc
 

Macros

#define TBTKAssert(expression, function, message, hint)
 
#define TBTKExit(function, message, hint)
 
#define TBTKNotYetImplemented(function)
 

Detailed Description

Precompiler macros.

Author
Kristofer Björnson

Macro Definition Documentation

#define TBTKAssert (   expression,
  function,
  message,
  hint 
)
Value:
if(!(expression)){ \
TBTK::Util::Streams::err << "Error in " << function << "\n"; \
TBTK::Util::Streams::err << "\t" << message << "\n"; \
std::stringstream hintStream; \
hintStream << hint; \
if(std::strcmp(hintStream.str().c_str(), "") != 0) \
TBTK::Util::Streams::err << "\tHint: " << hint << "\n"; \
TBTK::Util::Streams::err << "\tWhere: " << __FILE__ << ", " << __LINE__ << "\n"; \
if(Util::Streams::logIsOpen()) \
Util::Streams::closeLog(); \
exit(1); \
}
static std::ostream err
Definition: Streams.h:43
#define TBTKExit (   function,
  message,
  hint 
)
Value:
TBTK::Util::Streams::err << "Error in " << function << "\n"; \
TBTK::Util::Streams::err << "\t" << message << "\n"; \
std::stringstream hintStream; \
hintStream << hint; \
if(std::strcmp(hintStream.str().c_str(), "") != 0) \
TBTK::Util::Streams::err << "\tHint: " << hint << "\n"; \
TBTK::Util::Streams::err << "\tWhere: " << __FILE__ << ", " << __LINE__ << "\n"; \
if(Util::Streams::logIsOpen()) \
Util::Streams::closeLog(); \
exit(1);
static std::ostream err
Definition: Streams.h:43
#define TBTKNotYetImplemented (   function)
Value:
TBTK::Util::Streams::err << "Error in " << function << "\n"; \
TBTK::Util::Streams::err << "\tNot yet implemented.\n"; \
TBTK::Util::Streams::err << "\tWhere: " << __FILE__ << ", " << __LINE__ << "\n"; \
if(Util::Streams::logIsOpen()) \
Util::Streams::closeLog(); \
exit(1);
static std::ostream err
Definition: Streams.h:43