Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields  

clawsoft::TextOutput Class Reference

#include <TextOutput.h>

Inheritance diagram for clawsoft::TextOutput:

Inheritance graph
[legend]
Collaboration diagram for clawsoft::TextOutput:

Collaboration graph
[legend]

Detailed Description

This class is like a PIPE, it holds a method for outputing text to a receiving object, this object \ can be a file a stream or any other thing, please note that this class is just an interface, for every text ouput subsystem that may exist in a future.

STATUS: READY TO TEST


Public Methods

 TextOutput ()
 Default constructor, it does some local initialization but nothing more.

void write (const void *text, Uint32 siz)
 This method will write the textbuffer up to siz bytes to the current TextOuput object.

void write (const String &text)
 This method will write the text String to the current TextOuput object.

void writeLine (const void *text, Uint32 siz)
 This method will write the textbuffer up to siz bytes to the current TextOuput object plus the newline character.

void writeLine (const String &text)
 This method will write the text String to the current TextOuput object plus the newline character.


Protected Methods

virtual void outputMethod (const void *buf, Uint32 size)
 This is the current output method, it will determine how the data is going to be phisically outputed, you are encouraged to overload this method in every implementation of the TextOutput class.

void setClassName (const char *n)
 Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.

const char * getClassName ()
 Returns the name of the current class.


Static Protected Methods

int installedCPUs ()
 This will return how many CPUs are installed in the system.

double cpuSpeed ()
 This will return the CPU speed in megahertz.

int totalMemory ()
 Will return the total amount of system memory.

int freeMemory ()
 Will return the total amount of free system memory.

void usleep (Uint32 usec)
 Will freeze the software for usec microseconds.


Constructor & Destructor Documentation

clawsoft::TextOutput::TextOutput  
 

Default constructor, it does some local initialization but nothing more.


Member Function Documentation

double clawsoft::System::cpuSpeed   [static, inherited]
 

This will return the CPU speed in megahertz.

int clawsoft::System::freeMemory   [static, inherited]
 

Will return the total amount of free system memory.

const char * clawsoft::Object::getClassName   [inherited]
 

Returns the name of the current class.

int clawsoft::System::installedCPUs   [static, inherited]
 

This will return how many CPUs are installed in the system.

void clawsoft::TextOutput::outputMethod const void *    buf,
Uint32    size
[protected, virtual]
 

This is the current output method, it will determine how the data is going to be phisically outputed, you are encouraged to overload this method in every implementation of the TextOutput class.

Reimplemented in clawsoft::StandardError, and clawsoft::StandardOutput.

void clawsoft::Object::setClassName const char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.

int clawsoft::System::totalMemory   [static, inherited]
 

Will return the total amount of system memory.

void clawsoft::System::usleep Uint32    usec [static, inherited]
 

Will freeze the software for usec microseconds.

void clawsoft::TextOutput::write const String   text
 

This method will write the text String to the current TextOuput object.

void clawsoft::TextOutput::write const void *    text,
Uint32    siz
 

This method will write the textbuffer up to siz bytes to the current TextOuput object.

void clawsoft::TextOutput::writeLine const String   text
 

This method will write the text String to the current TextOuput object plus the newline character.

void clawsoft::TextOutput::writeLine const void *    text,
Uint32    siz
 

This method will write the textbuffer up to siz bytes to the current TextOuput object plus the newline character.


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

Authors:

Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara

Powered by:

SourceForgeLogo