Planeshift
Static Public Member Functions | Static Public Attributes

ConsoleOut Class Reference

Simple static class for controlled user output. More...

#include <consoleout.h>

List of all members.

Static Public Member Functions

static ConsoleOutMsgClass GetMaximumOutputClassFile ()
static ConsoleOutMsgClass GetMaximumOutputClassStdout ()
static void Intern_Printf (ConsoleOutMsgClass con, const char *arg,...)
 Used to print things to the console.
static void Intern_Printf_LogOnly (ConsoleOutMsgClass con, const char *arg,...)
 Used to print things to the console.
static void Intern_VPrintf (ConsoleOutMsgClass con, const char *arg, va_list ap)
 Used to print things to the console.
static void Intern_VPrintf_LogOnly (ConsoleOutMsgClass con, const char *arg, va_list args)
 Used to print things to the console.
static void SetMaximumOutputClassFile (ConsoleOutMsgClass con)
 Set the maximum message class that we want to show on the output file.
static void SetMaximumOutputClassStdout (ConsoleOutMsgClass con)
 Set the maximum message class that we want to show on standard output.
static void SetOutputFile (const char *filename, bool append)
 Setup the console to additionally write to some file instead of only stdout.
static void SetPrompt (const char *format,...)
 Set the prompt to be used for stdout.
static void SetStringBuffer (csString *buffer)
 Set or clear the string buffer.
static void Shift ()
static void Unshift ()

Static Public Attributes

static bool atStartOfLine
static bool promptDisplayed
static int shift
static csString * strBuffer

Detailed Description

Simple static class for controlled user output.

Definition at line 50 of file consoleout.h.


Member Function Documentation

static ConsoleOutMsgClass ConsoleOut::GetMaximumOutputClassFile ( ) [static]
static ConsoleOutMsgClass ConsoleOut::GetMaximumOutputClassStdout ( ) [static]
static void ConsoleOut::Intern_Printf ( ConsoleOutMsgClass  con,
const char *  arg,
  ... 
) [static]

Used to print things to the console.

static void ConsoleOut::Intern_Printf_LogOnly ( ConsoleOutMsgClass  con,
const char *  arg,
  ... 
) [static]

Used to print things to the console.

This version only does the log to the output file.

static void ConsoleOut::Intern_VPrintf ( ConsoleOutMsgClass  con,
const char *  arg,
va_list  ap 
) [static]

Used to print things to the console.

static void ConsoleOut::Intern_VPrintf_LogOnly ( ConsoleOutMsgClass  con,
const char *  arg,
va_list  args 
) [static]

Used to print things to the console.

This version only does the log to the output file.

static void ConsoleOut::SetMaximumOutputClassFile ( ConsoleOutMsgClass  con) [static]

Set the maximum message class that we want to show on the output file.

By default this is CON_SPAM. Set to CON_NONE to disable all output.

static void ConsoleOut::SetMaximumOutputClassStdout ( ConsoleOutMsgClass  con) [static]

Set the maximum message class that we want to show on standard output.

By default this is CON_SPAM. Set to CON_NONE to disable all output.

static void ConsoleOut::SetOutputFile ( const char *  filename,
bool  append 
) [static]

Setup the console to additionally write to some file instead of only stdout.

If append is true then append to the file.

static void ConsoleOut::SetPrompt ( const char *  format,
  ... 
) [static]

Set the prompt to be used for stdout.

static void ConsoleOut::SetStringBuffer ( csString *  buffer) [inline, static]

Set or clear the string buffer.

If a string buffer is specified then the console only prints to the string instead of to the console, so the output can be captured and re-used.

Definition at line 103 of file consoleout.h.

static void ConsoleOut::Shift ( ) [static]
static void ConsoleOut::Unshift ( ) [static]

Member Data Documentation

Definition at line 123 of file consoleout.h.

Definition at line 124 of file consoleout.h.

Definition at line 121 of file consoleout.h.

csString* ConsoleOut::strBuffer [static]

Definition at line 122 of file consoleout.h.


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