SUNphi  1.0
SUNphi::Logger::LoggerLine Class Reference

Single line in the logger. More...

Public Member Functions

void startNewLine ()
 Starts a new line. More...
 
 LoggerLine (Logger &logger)
 Construct.
 
 LoggerLine (LoggerLine &&oth)
 Move constructor.
 
void endLine ()
 Ends the line.
 
 ~LoggerLine ()
 Destroy (end the line)
 
template<typename T >
LoggerLineoperator* (T &&t)
 Prints after putting a space. More...
 
template<typename T , typename = EnableIf<not canPrint<LoggerLine,T>>, typename = EnableIf<canPrint<File,const T&>>>
LoggerLineoperator<< (const T &t)
 
LoggerLineprintVariadicMessage (const char *format, va_list ap)
 Print a C-style variadic message. More...
 
LoggerLineoperator<< (const TextColor &c)
 Changes the color of the line.
 
LoggerLineoperator<< (const TextStyle &c)
 Changes the style of the line.
 
LoggerLineoperator<< (const Crasher &cr)
 
LoggerLineoperator<< (const char *str)
 Prints a string, parsing newline. More...
 
LoggerLineoperator<< (const std::string &str)
 Prints a c++ string.
 

Private Member Functions

 LoggerLine (const LoggerLine &)=delete
 Forbids copying a line.
 

Private Attributes

bool hasToEndLine
 Store wether the line has to be ended or not.
 
bool hasToCrash
 Store whether the line is crashing.
 
bool colorChanged
 Mark that the color has changed in this line.
 
bool styleChanged
 Mark that the style has changed in this line.
 
const bool reallyPrint
 Check whether should actually print or not.
 
const bool someOtherRankCouldBePrinting
 Check if some other rank could be printing.
 
const bool someOtherThreadCouldBePrinting
 Check if some other thread could be printing.
 
const bool hasToLock
 Check whether we need to lock.
 
Loggerlogger
 Reference to the logger.
 

Detailed Description

Single line in the logger.

Definition at line 52 of file Logger.hpp.

Member Function Documentation

template<typename T >
LoggerLine& SUNphi::Logger::LoggerLine::operator* ( T &&  t)
inline

Prints after putting a space.

Parameters
tObject to be printed

Definition at line 198 of file Logger.hpp.

template<typename T , typename = EnableIf<not canPrint<LoggerLine,T>>, typename = EnableIf<canPrint<File,const T&>>>
LoggerLine& SUNphi::Logger::LoggerLine::operator<< ( const T &  t)
inline

Catch-all print

The SFINAE is needed to avoid that the method is used when File does not know how to print

Parameters
tObject to print

Definition at line 213 of file Logger.hpp.

LoggerLine& SUNphi::Logger::LoggerLine::operator<< ( const Crasher cr)
inline

Prints crash information

Then sets the flag hasToCrash to true, such that at destroy of the line, crash happens

Definition at line 261 of file Logger.hpp.

LoggerLine& SUNphi::Logger::LoggerLine::operator<< ( const char *  str)
inline

Prints a string, parsing newline.

Pointer to the first char of the string

Definition at line 273 of file Logger.hpp.

LoggerLine& SUNphi::Logger::LoggerLine::printVariadicMessage ( const char *  format,
va_list  ap 
)
inline

Print a C-style variadic message.

Parameters
formatFormat to print
apVariadic part

Definition at line 222 of file Logger.hpp.

void SUNphi::Logger::LoggerLine::startNewLine ( )
inline

Starts a new line.

Total number of the character written

Definition at line 87 of file Logger.hpp.


The documentation for this class was generated from the following file: