Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MsqError::Setter Class Reference

#include <MsqError.hpp>

Collaboration diagram for MsqError::Setter:

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 msq_std::string &message, ErrorCode num)
 
bool set (ErrorCode num, const char *format,...)
 
 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 msq_std::string &message, ErrorCode num)
 
bool set (ErrorCode num, const char *format,...)
 

Private Attributes

MsqErrormErr
 
const char * functionName
 
const char * fileName
 
int lineNumber
 

Detailed Description

Definition at line 193 of file includeLinks/MsqError.hpp.

Constructor & Destructor Documentation

Setter ( MsqError err,
const char *  function,
const char *  file,
int  line 
)
inline
Setter ( MsqError err,
const char *  function,
const char *  file,
int  line 
)
inline

Member Function Documentation

bool set ( ErrorCode  num)

Definition at line 96 of file Misc/MsqError.cpp.

97 {
98  return mErr.set_error( num )
100 }
virtual bool push(const char *function, const char *file, int line)
Add to back-trace of call stack.
virtual bool set_error(ErrorCode num, const char *msg=0)
Initialize the error object with the passed data.
bool set ( ErrorCode  num)
bool set ( const char *  message,
ErrorCode  num 
)

Definition at line 90 of file Misc/MsqError.cpp.

91 {
92  return mErr.set_error( num, msg )
94 }
virtual bool push(const char *function, const char *file, int line)
Add to back-trace of call stack.
virtual bool set_error(ErrorCode num, const char *msg=0)
Initialize the error object with the passed data.
bool set ( const char *  message,
ErrorCode  num 
)
bool set ( const msq_std::string &  message,
ErrorCode  num 
)
bool set ( const msq_std::string &  message,
ErrorCode  num 
)

Definition at line 84 of file Misc/MsqError.cpp.

References MsqError::Setter::fileName, MsqError::Setter::functionName, MsqError::Setter::lineNumber, MsqError::Setter::mErr, MsqError::push(), and MsqError::set_error().

85 {
86  return mErr.set_error( num, msg.c_str() )
88 }
virtual bool push(const char *function, const char *file, int line)
Add to back-trace of call stack.
virtual bool set_error(ErrorCode num, const char *msg=0)
Initialize the error object with the passed data.

Here is the call graph for this function:

bool set ( ErrorCode  num,
const char *  format,
  ... 
)

Definition at line 102 of file Misc/MsqError.cpp.

103 {
104  char buffer[1024];
105 
106 #if defined(HAVE_VSNPRINTF)
107  va_list args;
108  va_start( args, format );
109  vsnprintf( buffer, sizeof(buffer), format, args );
110  va_end( args );
111 #elif defined(HAVE__VSNPRINTF)
112  va_list args;
113  va_start( args, format );
114  _vsnprintf( buffer, sizeof(buffer), format, args );
115  va_end( args );
116 #elif defined(HAVE_VSPRINTF)
117  va_list args;
118  va_start( args, format );
119  vsprintf( buffer, format, args );
120  va_end( args );
121 #else
122  strncpy( buffer, format, sizeof(buffer) );
123  buffer[sizeof(buffer)-1] = '\0';
124 #endif
125 
126  return mErr.set_error( num, buffer )
128 }
virtual bool push(const char *function, const char *file, int line)
Add to back-trace of call stack.
virtual bool set_error(ErrorCode num, const char *msg=0)
Initialize the error object with the passed data.
bool set ( ErrorCode  num,
const char *  format,
  ... 
)

Member Data Documentation

const char * fileName
private

Definition at line 209 of file includeLinks/MsqError.hpp.

Referenced by MsqError::Setter::set().

const char * functionName
private

Definition at line 208 of file includeLinks/MsqError.hpp.

Referenced by MsqError::Setter::set().

int lineNumber
private

Definition at line 210 of file includeLinks/MsqError.hpp.

Referenced by MsqError::Setter::set().

MsqError & mErr
private

Definition at line 207 of file includeLinks/MsqError.hpp.

Referenced by MsqError::Setter::set().


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