#include <DebugConsole.h>
Definition at line 21 of file DebugConsole.h.
Public Member Functions | |
DebugConsole () | |
void | setOutput (TextOutput *to=0) |
This will reset the standard output to stdout by default or to to. | |
const DebugConsole & | operator<< (const String &s) const |
void | enable () |
void | disable () |
bool | enabled () |
Protected Member Functions | |
void | setInput (TextInput *ti=0) |
This will reset the standard input to stdin by default or to ti. | |
void | setErrorOutput (TextOutput *te=0) |
This will reset the standard error to stderr by default or to te. | |
void | outWrite (const void *buf, UInt32 siz) |
This will write siz bytes of buf buffer to the current out TextOutput. | |
void | outWrite (const String &text) const |
This will write the contents of text to the current out TextOutput. | |
void | outWriteLine (const void *buf, UInt32 siz) |
This will write siz bytes of buf buffer to the current out TextOutput plus a newline character. | |
void | outWriteLine (const String &text) |
This will write the contents of text to the current out TextOutput plus a newline. | |
void | errWrite (const void *buf, UInt32 siz) |
This will write siz bytes of buf buffer to the current err TextOutput. | |
void | errWrite (const String &text) const |
This will write the contents of text to the current err TextOutput. | |
void | errWriteLine (const void *buf, UInt32 siz) |
This will write siz bytes of buf buffer to the current err TextOutput plus a newline character. | |
void | errWriteLine (const String &text) |
This will write the contents of text to the current err TextOutput plus a newline. | |
void | read (void *buf, UInt32 size) |
This will read size bytes from the current in and will store them on buf. | |
void | readLine (String &line) |
This will read a line of text, a line is a string terminated by \n or \0 the result will be stored on line. | |
const Console & | operator<< (const Object &s) const |
void | destroyAll () |
Internal destructor function DONT USE IT. | |
void | getKernelInfo () |
This method will update the name and information about the current running kernel. | |
const char * | getUnixName () |
Use this method to retreives the name of the UNIX version you are currently using. | |
const char * | getNodeName () |
This method will give you the nodename of your current host machine. | |
const char * | getKernelRelease () |
This will return your current kernel release string. | |
const char * | getKernelReleaseVersion () |
This will return your current kernel release version string. | |
const char * | getHostMachine () |
This will return your current architecture description. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
virtual std::string | toString () |
Static Protected Member Functions | |
static int | getuid () |
Obtains the current (running) user id. | |
static int | getuid (const String &username) |
Obtain uid from username. | |
static int | getgid () |
Obtain username from uid TODO: You must create the memory allocation classes if you want to implement the new version of getuid(); DONT FORGET IT!!!! | |
static int | getgid (const String &groupname) |
Obtain uid from username. | |
static int | chown (const String &fname, int userid, int groupid=-1) |
Obtain username from uid TODO: You must create the memory allocation classes if you want to implement the new version of getgid(); DONT FORGET IT!!!! | |
static int | chown (const String &fname, const String &owner) |
Changes the owner of the file by its username. | |
static int | chgrp (const String &fname, int userid) |
Changes the group owner of the file by its numeric userid. | |
static int | chgrp (const String &fname, const String &groupname) |
Changes the group owner of the file by its groupname. | |
static void | usleep (UInt32 usec) |
This will return how many CPUs are installed in the system. | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Attributes | |
bool | _enabled |
TextOutput * | err |
This will represent the stderr. | |
TextOutput * | out |
This will represent the stdout. | |
TextInput * | in |
This will represent the stdin. | |
bool | using_builtin_out |
This flag will say if you are using the builtin TextOutput object or a user-defined one for stdout. | |
bool | using_builtin_err |
This flag will say if you are using the builtin TextOutput object or a user-defined one for stderr. | |
bool | using_builtin_in |
This flag will say if you are using the builtin TextInput object or a user-defined one for stdin. | |
char * | sysname |
Pointer to system name. | |
char * | nodename |
char * | release |
char * | k_version |
char * | machine |
Mutex | OSMutex |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::DebugConsole::DebugConsole | ( | ) |
void xvr2::DebugConsole::setOutput | ( | TextOutput * | to = 0 |
) |
This will reset the standard output to stdout by default or to to.
Reimplemented from xvr2::Console.
const DebugConsole& xvr2::DebugConsole::operator<< | ( | const String & | s | ) | const |
Reimplemented from xvr2::Console.
void xvr2::DebugConsole::enable | ( | ) |
void xvr2::DebugConsole::disable | ( | ) |
bool xvr2::DebugConsole::enabled | ( | ) |
void xvr2::Console::setInput | ( | TextInput * | ti = 0 |
) | [inherited] |
This will reset the standard input to stdin by default or to ti.
void xvr2::Console::setErrorOutput | ( | TextOutput * | te = 0 |
) | [inherited] |
This will reset the standard error to stderr by default or to te.
void xvr2::Console::outWrite | ( | const void * | buf, | |
UInt32 | siz | |||
) | [inherited] |
This will write siz bytes of buf buffer to the current out TextOutput.
void xvr2::Console::outWrite | ( | const String & | text | ) | const [inherited] |
This will write the contents of text to the current out TextOutput.
void xvr2::Console::outWriteLine | ( | const void * | buf, | |
UInt32 | siz | |||
) | [inherited] |
This will write siz bytes of buf buffer to the current out TextOutput plus a newline character.
void xvr2::Console::outWriteLine | ( | const String & | text | ) | [inherited] |
This will write the contents of text to the current out TextOutput plus a newline.
void xvr2::Console::errWrite | ( | const void * | buf, | |
UInt32 | siz | |||
) | [inherited] |
This will write siz bytes of buf buffer to the current err TextOutput.
void xvr2::Console::errWrite | ( | const String & | text | ) | const [inherited] |
This will write the contents of text to the current err TextOutput.
void xvr2::Console::errWriteLine | ( | const void * | buf, | |
UInt32 | siz | |||
) | [inherited] |
This will write siz bytes of buf buffer to the current err TextOutput plus a newline character.
void xvr2::Console::errWriteLine | ( | const String & | text | ) | [inherited] |
This will write the contents of text to the current err TextOutput plus a newline.
void xvr2::Console::read | ( | void * | buf, | |
UInt32 | size | |||
) | [inherited] |
This will read size bytes from the current in and will store them on buf.
void xvr2::Console::readLine | ( | String & | line | ) | [inherited] |
This will read a line of text, a line is a string terminated by \n or \0 the result will be stored on line.
void xvr2::Unix::destroyAll | ( | ) | [protected, inherited] |
Internal destructor function DONT USE IT.
static int xvr2::Unix::getuid | ( | ) | [static, inherited] |
Obtains the current (running) user id.
static int xvr2::Unix::getuid | ( | const String & | username | ) | [static, inherited] |
Obtain uid from username.
static int xvr2::Unix::getgid | ( | ) | [static, inherited] |
Obtain username from uid TODO: You must create the memory allocation classes if you want to implement the new version of getuid(); DONT FORGET IT!!!!
Obtains the current (running) user id
static int xvr2::Unix::getgid | ( | const String & | groupname | ) | [static, inherited] |
Obtain uid from username.
static int xvr2::Unix::chown | ( | const String & | fname, | |
int | userid, | |||
int | groupid = -1 | |||
) | [static, inherited] |
Obtain username from uid TODO: You must create the memory allocation classes if you want to implement the new version of getgid(); DONT FORGET IT!!!!
Changes the owner of the file by its numeric userid
Changes the owner of the file by its username.
static int xvr2::Unix::chgrp | ( | const String & | fname, | |
int | userid | |||
) | [static, inherited] |
Changes the group owner of the file by its numeric userid.
Changes the group owner of the file by its groupname.
void xvr2::Unix::getKernelInfo | ( | ) | [inherited] |
This method will update the name and information about the current running kernel.
const char* xvr2::Unix::getUnixName | ( | ) | [inherited] |
Use this method to retreives the name of the UNIX version you are currently using.
const char* xvr2::Unix::getNodeName | ( | ) | [inherited] |
This method will give you the nodename of your current host machine.
const char* xvr2::Unix::getKernelRelease | ( | ) | [inherited] |
This will return your current kernel release string.
const char* xvr2::Unix::getKernelReleaseVersion | ( | ) | [inherited] |
This will return your current kernel release version string.
const char* xvr2::Unix::getHostMachine | ( | ) | [inherited] |
This will return your current architecture description.
static void xvr2::System::usleep | ( | UInt32 | usec | ) | [static, inherited] |
This will return how many CPUs are installed in the system.
This will return the CPU speed in megahertz Will return the total amount of system memory Will return the total amount of free system memory Will freeze the software for usec microseconds
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
bool xvr2::DebugConsole::_enabled [protected] |
Definition at line 23 of file DebugConsole.h.
TextOutput* xvr2::Console::err [protected, inherited] |
TextOutput* xvr2::Console::out [protected, inherited] |
TextInput* xvr2::Console::in [protected, inherited] |
bool xvr2::Console::using_builtin_out [protected, inherited] |
This flag will say if you are using the builtin TextOutput object or a user-defined one for stdout.
bool xvr2::Console::using_builtin_err [protected, inherited] |
This flag will say if you are using the builtin TextOutput object or a user-defined one for stderr.
bool xvr2::Console::using_builtin_in [protected, inherited] |
char* xvr2::Unix::sysname [protected, inherited] |
char* xvr2::Unix::nodename [protected, inherited] |
char* xvr2::Unix::release [protected, inherited] |
char* xvr2::Unix::k_version [protected, inherited] |
char* xvr2::Unix::machine [protected, inherited] |
Mutex xvr2::Unix::OSMutex [protected, inherited] |
std::string xvr2::Object::__cls_name [protected, inherited] |