MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <MsqDebug.hpp>
Public Member Functions | |
FormatPrinter (unsigned flag) | |
void | print (const char *format,...) const |
Public Attributes | |
const unsigned | myFlag |
Definition at line 109 of file MsqDebug.hpp.
MBMesquite::MsqDebug::FormatPrinter::FormatPrinter | ( | unsigned | flag | ) | [inline] |
Definition at line 112 of file MsqDebug.hpp.
: myFlag( flag ) {}
void MBMesquite::MsqDebug::FormatPrinter::print | ( | const char * | format, |
... | |||
) | const |
Definition at line 127 of file MsqDebug.cpp.
References args, buffer, MBMesquite::MsqDebug::get(), and MBMesquite::MsqDebug::get_stream().
{ if( !MsqDebug::get( myFlag ) ) return; char buffer[512]; #if defined( HAVE_VSNPRINTF ) va_list args; va_start( args, format ); vsnprintf( buffer, sizeof( buffer ), format, args ); va_end( args ); #elif defined( HAVE__VSNPRINTF ) va_list args; va_start( args, format ); _vsnprintf( buffer, sizeof( buffer ), format, args ); va_end( args ); #elif defined( HAVE_VSPRINTF ) va_list args; va_start( args, format ); vsprintf( buffer, format, args ); va_end( args ); #else strncpy( buffer, format, sizeof( buffer ) ); buffer[sizeof( buffer ) - 1] = '\0'; #endif MsqDebug::get_stream( myFlag ) << buffer; }
const unsigned MBMesquite::MsqDebug::FormatPrinter::myFlag |
Definition at line 118 of file MsqDebug.hpp.