casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
casa::GLLogIO Class Reference

GLLogIO adds tracing support to the AIPS++ LogIO object. More...

#include <GLSupport.h>

Inheritance diagram for casa::GLLogIO:
casa::LogIO

List of all members.

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 Stringostring_

Detailed Description

GLLogIO adds tracing support to the AIPS++ LogIO object.

Definition at line 55 of file GLSupport.h.


Constructor & Destructor Documentation

virtual casa::GLLogIO::~GLLogIO ( ) [virtual]

Member Function Documentation

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.

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.

Copy internal buffer to output.

Then clear internal buffer.

Reimplemented from casa::LogIO.

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.


Member Data Documentation

Definition at line 103 of file GLSupport.h.

String* casa::GLLogIO::ostring_ [static, private]

Definition at line 105 of file GLSupport.h.

Definition at line 104 of file GLSupport.h.


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