casa
$Rev:20696$
|
GLLogIO adds tracing support to the AIPS++ LogIO object. More...
#include <GLSupport.h>
Public Member Functions | |
GLLogIO () | |
virtual | ~GLLogIO () |
void | trace (const char *name, int nspaces, Bool errorsonly=False) |
Print tracing information. | |
void | append (const char *msg, uInt nspaces=0) |
Append a line to buffer then add a newline. | |
void | indent (uInt nspaces=0) |
Adds nspaces to buffer. | |
void | clear () |
Deletes current buffer contents. | |
int | glcheck (uInt nspaces) |
Copies any current OpenGL error messages to internal buffer. | |
void | postString () |
If an output string exists, copy it to an output stream if it exists. | |
void | postString (const String &str) |
Copy string to either output stream or LogIO object. | |
void | post () |
Copy internal buffer to output. | |
Static Public Member Functions | |
static void | postToStream (Bool useStream=False) |
Logging to standard AIPS++ disrupts trace formatting. | |
static void | postToString (String *str=NULL) |
Post messages to str for later use. | |
Private Attributes | |
String | buffer_ |
Static Private Attributes | |
static Bool | postToStream_ |
static String * | ostring_ |
GLLogIO adds tracing support to the AIPS++ LogIO object.
Definition at line 55 of file GLSupport.h.
virtual casa::GLLogIO::~GLLogIO | ( | ) | [virtual] |
void casa::GLLogIO::append | ( | const char * | msg, |
uInt | nspaces = 0 |
||
) |
Append a line to buffer then add a newline.
msg is indented by nspaces spaces. msg may contain newline characters.
void casa::GLLogIO::clear | ( | ) |
Deletes current buffer contents.
int casa::GLLogIO::glcheck | ( | uInt | nspaces | ) |
Copies any current OpenGL error messages to internal buffer.
void casa::GLLogIO::indent | ( | uInt | nspaces = 0 | ) |
Adds nspaces to buffer.
void casa::GLLogIO::post | ( | ) |
void casa::GLLogIO::postString | ( | ) |
If an output string exists, copy it to an output stream if it exists.
If the output stream doesn't exist, copy it to the LogIO object. The string is then cleared. Ignore if the string doesn't exist.
Referenced by casa::GLPixelCanvas::postString().
void casa::GLLogIO::postString | ( | const String & | str | ) |
Copy string to either output stream or LogIO object.
The string is not cleared.
static void casa::GLLogIO::postToStream | ( | Bool | useStream = False | ) | [static] |
Logging to standard AIPS++ disrupts trace formatting.
These routines allow redirecting or delaying output. NOTE: There is only 1 instance of the use iostream flag or String for all instances of GLLogIO.
Post messages to an iostream instead of LogIO object.
Referenced by casa::GLPixelCanvas::postToStream().
static void casa::GLLogIO::postToString | ( | String * | str = NULL | ) | [static] |
Post messages to str for later use.
Disables if NULL. If str is non NULL, no output is done until postString is called. Replacing an existing string does not cause the existing string to be posted.
Referenced by casa::GLPixelCanvas::postToString().
void casa::GLLogIO::trace | ( | const char * | name, |
int | nspaces, | ||
Bool | errorsonly = False |
||
) |
Print tracing information.
Also calls glcheck. This is the main use for GLLogIO. nspaces is the number of spaces to indent name and any errors. If errorsonly is True, don't print anything if there are no errors.
String casa::GLLogIO::buffer_ [private] |
Definition at line 103 of file GLSupport.h.
String* casa::GLLogIO::ostring_ [static, private] |
Definition at line 105 of file GLSupport.h.
Bool casa::GLLogIO::postToStream_ [static, private] |
Definition at line 104 of file GLSupport.h.