Go to the source code of this file.
|
namespace | TexGen |
| Namespace containing a series of customised math operations not found in the standard c++ library.
|
|
◆ TGERROR
#define TGERROR |
( |
|
MESSAGE | ) |
|
Value: { \
std::ostringstream o; \
o << MESSAGE; \
GetLogger().TexGenError(__FILE__, __LINE__, o.str()); \
}
Macros used to report the file name and line number to the TexGenError and TexGenLog functions.
Also converts stream to string making it easier to insert values into the error message without need to use the stringify function. E.g. TEXGENERROR("Value is not high enough: " << iValue);
Definition at line 29 of file Logger.h.
◆ TGLOG
Value: { \
std::ostringstream o; \
o << MESSAGE; \
GetLogger().TexGenLog(__FILE__, __LINE__, o.str()); \
}
Definition at line 36 of file Logger.h.
◆ TGLOGAUTOINDENT
#define TGLOGAUTOINDENT |
( |
| ) |
CLogIndent AutoLogIndentVariable; |
◆ TGLOGDECREASEINDENT
#define TGLOGDECREASEINDENT |
( |
| ) |
|
Value: { \
GetLogger().DecreaseIndent(); \
}
Definition at line 60 of file Logger.h.
◆ TGLOGINCREASEINDENT
#define TGLOGINCREASEINDENT |
( |
| ) |
|
Value: { \
GetLogger().IncreaseIndent(); \
}
Macros to increase and decrease indentation in the logging.
Indentation can be done in two ways, by calling INCREASELOGINDENT followed by DECREASELOGINDENT. Care must be taken to make sure that each INCREASELOGINDENT is ALWAYS matched with a DECREASELOGINDENT (it can be easy to get a miss match when a "return" occurs in the middle of a function).
A safer way to indent things is by calling AUTOLOGINDENT. This macro actually creates an instance of the CLogIndent class which has a constructor that calls INCREASELOGINDENT and destructor that calls DECREASELOGINDENT. Thus a call to increase indent is ALWAYS matched with a call to decrease indent. The decrease indent occurs when the variable exits the current scope, i.e. before exiting a function, an if statement, loop, etc... Note that this macro cannot be placed twice within the same control loop since the class instance will already be declared with the same name.
Definition at line 55 of file Logger.h.
◆ TGLOGINDENT
Combines the TGLOG macro and TGLOGAUTOINDENT macro in one.
Definition at line 68 of file Logger.h.