GLSupport.h

Classes

GLLogIO -- (full description)
GLTraceLevel -- (full description)

class GLLogIO : public LogIO

Interface

Public Members
GLLogIO()
virtual ~GLLogIO()
void trace(const char *name, int nspaces, Bool errorsonly=False)
void append(const char *msg, uInt nspaces=0)
void indent(uInt nspaces=0)
void clear()
int glcheck(uInt nspaces)
static void postToStream(Bool useStream=False)
static void postToString(String *str=NULL)
void postString()
void postString(const String &str)
void post()

Description

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

Member Description

GLLogIO()

virtual ~GLLogIO()

void 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.

void 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 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.

static void postToStream(Bool useStream=False)

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.

static void postToString(String *str=NULL)

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.

void 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.

void postString(const String &str)

Copy string to either output stream or LogIO object. The string is not cleared.

void post()

Copy internal buffer to output. Then clear internal buffer.

enum GLTraceLevel

GLTraceNone
GLTraceErrors = 1
GLTraceInfo = 2
GLTraceCalls = 4
GLTraceImages = 8
GLTraceGraphics = 0x10,GLTraceMath=0x20,GLTraceOther=0x40,GLTraceNormal=0x3F,GLTraceAll=~0}

Description