MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <MsqError.hpp>
Public Member Functions | |
Setter (MsqError &err, const char *function, const char *file, int line) | |
bool | set (ErrorCode num) |
bool | set (const char *message, ErrorCode num) |
bool | set (const std::string &message, ErrorCode num) |
bool | set (ErrorCode num, const char *format,...) |
Private Attributes | |
MsqError & | mErr |
const char * | functionName |
const char * | fileName |
int | lineNumber |
Definition at line 203 of file MsqError.hpp.
MBMesquite::MsqError::Setter::Setter | ( | MsqError & | err, |
const char * | function, | ||
const char * | file, | ||
int | line | ||
) | [inline] |
Definition at line 206 of file MsqError.hpp.
: mErr( err ), functionName( function ), fileName( file ), lineNumber( line ) { }
bool MBMesquite::MsqError::Setter::set | ( | ErrorCode | num | ) |
Definition at line 93 of file MsqError.cpp.
{ return mErr.set_error( num ) && mErr.push( functionName, fileName, lineNumber ); }
bool MBMesquite::MsqError::Setter::set | ( | const char * | message, |
ErrorCode | num | ||
) |
Definition at line 88 of file MsqError.cpp.
{ return mErr.set_error( num, msg ) && mErr.push( functionName, fileName, lineNumber ); }
bool MBMesquite::MsqError::Setter::set | ( | const std::string & | message, |
ErrorCode | num | ||
) |
Definition at line 83 of file MsqError.cpp.
References fileName, functionName, lineNumber, mErr, MBMesquite::MsqError::push(), and MBMesquite::MsqError::set_error().
{ return mErr.set_error( num, msg.c_str() ) && mErr.push( functionName, fileName, lineNumber ); }
bool MBMesquite::MsqError::Setter::set | ( | ErrorCode | num, |
const char * | format, | ||
... | |||
) |
Definition at line 98 of file MsqError.cpp.
{ char buffer[1024]; #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 return mErr.set_error( num, buffer ) && mErr.push( functionName, fileName, lineNumber ); }
const char* MBMesquite::MsqError::Setter::fileName [private] |
Definition at line 222 of file MsqError.hpp.
Referenced by set().
const char* MBMesquite::MsqError::Setter::functionName [private] |
Definition at line 221 of file MsqError.hpp.
Referenced by set().
int MBMesquite::MsqError::Setter::lineNumber [private] |
Definition at line 223 of file MsqError.hpp.
Referenced by set().
MsqError& MBMesquite::MsqError::Setter::mErr [private] |
Definition at line 220 of file MsqError.hpp.
Referenced by set().