Lib
QOLを高める
Classes | Functions
yappy::debug Namespace Reference

Debug utilities. More...

Classes

class  StopWatch
 Stop watch utility for performance measurement. More...
 

Functions

bool enableDebugOutput () noexcept
 Enables writing to OutputDebugString(). More...
 
bool enableConsoleOutput () noexcept
 Shows a console window and enables writing to it. More...
 
bool enableFileOutput (const wchar_t *fileName) noexcept
 Enables writing to a file. More...
 
void shutdownDebugOutput () noexcept
 Flush buffers and free resources. More...
 
void write (const wchar_t *str, bool newline=false) noexcept
 Write debug string. More...
 
void writef (const wchar_t *fmt,...) noexcept
 Write debug message using format string like printf. More...
 
void writef (const char *fmt,...) noexcept
 Write debug message using format string like printf. More...
 
void writef_nonl (const wchar_t *fmt,...) noexcept
 Write debug message using format string like printf. (No new line) More...
 
void writef_nonl (const char *fmt,...) noexcept
 Write debug message using format string like printf. (No new line) More...
 
void write (const char *str, bool newline=false) noexcept
 Write debug string. More...
 
void writeLine (const wchar_t *str=L"") noexcept
 Write debug string and new line. More...
 
void writeLine (const char *str) noexcept
 Write debug string and new line. More...
 

Detailed Description

Debug utilities.

Function Documentation

bool yappy::debug::enableConsoleOutput ( )
noexcept

Shows a console window and enables writing to it.

Definition at line 25 of file debug.cpp.

bool yappy::debug::enableDebugOutput ( )
noexcept

Enables writing to OutputDebugString().

Definition at line 19 of file debug.cpp.

bool yappy::debug::enableFileOutput ( const wchar_t *  fileName)
noexcept

Enables writing to a file.

Parameters
[in]fileNameFile name.

Definition at line 43 of file debug.cpp.

void yappy::debug::shutdownDebugOutput ( )
noexcept

Flush buffers and free resources.

Definition at line 57 of file debug.cpp.

void yappy::debug::write ( const char *  str,
bool  newline = false 
)
inlinenoexcept

Write debug string.

Parameters
[in]strDebug message string.
[in]newlinetrue if new line after str.

Definition at line 57 of file debug.h.

void yappy::debug::write ( const wchar_t *  str,
bool  newline = false 
)
noexcept

Write debug string.

Parameters
[in]strDebug message string.
[in]newlinetrue if new line after str.

Definition at line 73 of file debug.cpp.

void yappy::debug::writef ( const wchar_t *  fmt,
  ... 
)
noexcept

Write debug message using format string like printf.

Parameters
[in]fmtFormat string.
[in]...Additional params.

Definition at line 103 of file debug.cpp.

void yappy::debug::writef ( const char *  fmt,
  ... 
)
noexcept

Write debug message using format string like printf.

Parameters
[in]fmtFormat string.
[in]...Additional params.

Definition at line 114 of file debug.cpp.

void yappy::debug::writef_nonl ( const wchar_t *  fmt,
  ... 
)
noexcept

Write debug message using format string like printf. (No new line)

Parameters
[in]fmtFormat string.
[in]...Additional params.

Definition at line 125 of file debug.cpp.

void yappy::debug::writef_nonl ( const char *  fmt,
  ... 
)
noexcept

Write debug message using format string like printf. (No new line)

Parameters
[in]fmtFormat string.
[in]...Additional params.

Definition at line 136 of file debug.cpp.

void yappy::debug::writeLine ( const wchar_t *  str = L"")
inlinenoexcept

Write debug string and new line.

Parameters
[in]strDebug message string.

Definition at line 64 of file debug.h.

void yappy::debug::writeLine ( const char *  str)
inlinenoexcept

Write debug string and new line.

Parameters
[in]strDebug message string.

Definition at line 71 of file debug.h.