Wasp base class.
More...
#include <MyBase.h>
Wasp base class.
- Author
- John Clyne
- Version
- 0.1
- Date
- Mon Dec 13 17:15:12 MST 2004
Definition at line 67 of file MyBase.h.
◆ DiagMsgCB_T
typedef void(* Wasp::MyBase::DiagMsgCB_T) (const char *msg) |
◆ ErrMsgCB_T
typedef void(* Wasp::MyBase::ErrMsgCB_T) (const char *msg, int err_code) |
◆ MyBase()
◆ EnableErrMsg()
static bool Wasp::MyBase::EnableErrMsg |
( |
bool |
enable | ) |
|
|
inlinestatic |
Get the file pointer to whence diagnostic messages are written
This method returns the error message file pointer most recently set with SetDiagMsgFilePtr().
- See also
- SetDiagMsgFilePtr() Enable or disable error message reporting.
When disabled calls to SetErrMsg() report no error messages either through the error message callback or the error message FILE pointer.
- Parameters
-
[in] | enable | Boolean flag to enable or disable error reporting |
Definition at line 238 of file MyBase.h.
◆ getClassName()
const string & Wasp::MyBase::getClassName |
( |
| ) |
const |
|
inline |
◆ GetDiagMsg()
static const char * Wasp::MyBase::GetDiagMsg |
( |
| ) |
|
|
inlinestatic |
Retrieve the current diagnostic message
Retrieves the last error message set with SetDiagMsg(). It is the caller's responsibility to copy the message returned to user space.
- See also
- SetDiagMsg()
- Return values
-
msg | A pointer to null-terminated string. |
Definition at line 186 of file MyBase.h.
◆ GetDiagMsgCB()
Get the callback function for error messages
Get the callback function to be called whenever SetDiagMsg() is called. This method returns the address of the callback function set with the most recent call to SetDiagMsgCB(). If no callback function is defined, NULL is returned.
- See also
- SetDiagMsgCB
Definition at line 208 of file MyBase.h.
◆ GetEnableErrMsg()
static bool Wasp::MyBase::GetEnableErrMsg |
( |
| ) |
|
|
inlinestatic |
◆ GetErrCode()
static int Wasp::MyBase::GetErrCode |
( |
| ) |
|
|
inlinestatic |
◆ GetErrMsg()
static const char * Wasp::MyBase::GetErrMsg |
( |
| ) |
|
|
inlinestatic |
Retrieve the current error message
Retrieves the last error message set with SetErrMsg(). It is the caller's responsibility to copy the message returned to user space.
- See also
- SetErrMsg(), SetErrCode()
- Return values
-
msg | A pointer to null-terminated string. |
Definition at line 106 of file MyBase.h.
◆ GetErrMsgCB()
Get the callback function for error messages
Get the callback function to be called whenever SetErrMsg() is called. This method returns the address of the callback function set with the most recent call to SetErrMsgCB(). If no callback function is defined, NULL is returned.
- See also
- SetErrMsgCB
Definition at line 145 of file MyBase.h.
◆ SetClassName()
void Wasp::MyBase::SetClassName |
( |
const string & |
name | ) |
|
|
inlineprotected |
◆ SetDiagMsg()
static void Wasp::MyBase::SetDiagMsg |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
static |
Record a formatted diagnostic message.
Formats and records a diagnostic message. Subsequent calls will overwrite the stored error message. This method differs from SetErrMsg() only in that no associated error code is set - the message is considered diagnostic only, not an error.
- Parameters
-
[in] | format | A 'C' style sprintf format string. |
[in] | arg... | Arguments to format |
- See also
- GetDiagMsg()
◆ SetDiagMsgCB()
static void Wasp::MyBase::SetDiagMsgCB |
( |
DiagMsgCB_T |
cb | ) |
|
|
inlinestatic |
Set a callback function for diagnostic messages
Set the callback function to be called whenever SetDiagMsg() is called. The callback function, cb
, will be called and passed the formatted error message as an argument. The default callback function is NULL, i.e. no function is called
- Parameters
-
[in] | cb | A callback function or NULL |
Definition at line 197 of file MyBase.h.
◆ SetDiagMsgFilePtr()
static void Wasp::MyBase::SetDiagMsgFilePtr |
( |
FILE * |
fp | ) |
|
|
inlinestatic |
Set the file pointer to whence diagnostic messages are written
This method permits the specification of a file pointer to which all messages logged with SetDiagMsg() will be written. The default file pointer is NULL. I.e. by default error messages logged by SetDiagMsg() are not written.
- Parameters
-
[in] | fp | A file pointer opened for writing or NULL |
- See also
- SetDiagMsg()
Definition at line 219 of file MyBase.h.
◆ SetErrCode()
static void Wasp::MyBase::SetErrCode |
( |
int |
err_code | ) |
|
|
inlinestatic |
◆ SetErrMsg() [1/2]
static void Wasp::MyBase::SetErrMsg |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
static |
Record a formatted error message.
Formats and records an error message. Subsequent calls will overwrite the stored error message. The method will also set the error code to 1.
- Parameters
-
[in] | format | A 'C' style sprintf format string. |
[in] | args... | Arguments to format |
- See also
- GetErrMsg(), GetErrCode()
Referenced by VAPoR::SetHDF5PluginPath().
◆ SetErrMsg() [2/2]
static void Wasp::MyBase::SetErrMsg |
( |
int |
errcode, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
|
static |
Record a formatted error message and an error code.
Formats and records an error message. Subsequent calls will overwrite the stored error message. The method will also set the error code to err_code.
- Parameters
-
[in] | errcode | A application-defined error code |
[in] | format | A 'C' style sprintf format string. |
[in] | arg... | Arguments to format |
- See also
- GetErrMsg(), GetErrCode()
◆ SetErrMsgCB()
static void Wasp::MyBase::SetErrMsgCB |
( |
ErrMsgCB_T |
cb | ) |
|
|
inlinestatic |
Set a callback function for error messages
Set the callback function to be called whenever SetErrMsg() is called. The callback function, cb
, will be called and passed the formatted error message and the error code as an argument. The default callback function is NULL, i.e. no function is called
- Parameters
-
[in] | cb | A callback function or NULL |
Definition at line 134 of file MyBase.h.
◆ SetErrMsgFilePtr() [1/2]
static const FILE * Wasp::MyBase::SetErrMsgFilePtr |
( |
| ) |
|
|
inlinestatic |
◆ SetErrMsgFilePtr() [2/2]
static void Wasp::MyBase::SetErrMsgFilePtr |
( |
FILE * |
fp | ) |
|
|
inlinestatic |
Set the file pointer to whence error messages are written
This method permits the specification of a file pointer to which all messages logged with SetErrMsg() will be written. The default file pointer is NULL. I.e. by default error messages logged by SetErrMsg() are not written.
- Parameters
-
[in] | fp | A file pointer opened for writing or NULL |
- See also
- SetErrMsg()
Definition at line 156 of file MyBase.h.
◆ DiagMsg
char* Wasp::MyBase::DiagMsg |
|
static |
◆ DiagMsgCB
◆ DiagMsgFilePtr
FILE* Wasp::MyBase::DiagMsgFilePtr |
|
static |
◆ DiagMsgSize
int Wasp::MyBase::DiagMsgSize |
|
static |
◆ Enabled
bool Wasp::MyBase::Enabled |
|
static |
◆ ErrCode
int Wasp::MyBase::ErrCode |
|
static |
◆ ErrMsg
char* Wasp::MyBase::ErrMsg |
|
static |
◆ ErrMsgCB
◆ ErrMsgFilePtr
FILE* Wasp::MyBase::ErrMsgFilePtr |
|
static |
◆ ErrMsgSize
int Wasp::MyBase::ErrMsgSize |
|
static |
The documentation for this class was generated from the following file:
- /Users/pearse/VAPOR/include/vapor/MyBase.h