NTagMessage¶
-
class
NTagMessage¶ Public Functions
-
NTagMessage(const char *className = "", Verbosity verbose = pDEFAULT)¶ Constructor of NTagMessage.
Sample message with
className“TempClass”: [NTagTempClass] Sample message.- Parameters
className – The class name to print in all messages. Use the name of the owner class.
verbose – #Verbosity.
-
virtual void
PrintTag(Verbosity)¶ Prints colored (red for errors and yellow for warnings) tags.
-
virtual void
Print(TString line, Verbosity vType = pDEFAULT, bool newLine = true)¶ Prints one-liners.
Sample usage:
msg.Print("some message", pWARNING);- Parameters
line – A line to print.
vType – Message type (in #Verbosity). If
vType&le #fVerbosity,lineis printed.newLine – If
false, no new line is made at the end of output.
-
virtual void
PrintBlock(TString line, BlockSize size = pMAIN, Verbosity vType = pDEFAULT, bool newLine = true)¶ Print a block.
- Parameters
line – A line to print.
vType – Message type (in #Verbosity). If
vType&le #fVerbosity,lineis printed.newLine – If
false, no new line is made at the end of output.
-
virtual float
Timer(TString line, std::clock_t tStart, Verbosity vType = pDEFAULT)¶ Prints time that has been taken since the input
tStart.A
std::clock_tobjecttStartmust have been declared before using this method. Sample usage:std::clock_t startTimer; (some codes...;) msg.Timer("Code execution", startTimer);- Parameters
line – A line to print.
vType – Message type (in #Verbosity). If
vType&le #fVerbosity,lineis printed.tStart – The start time of the timer.
-