OOStuBS - Technische Informatik II (TI-II)  2.4
Öffentliche Typen | Öffentliche Methoden | Öffentliche Attribute | Geschützte Methoden | Geschützte Attribute | Freundbeziehungen | Aufstellung aller Elemente
O_Stream Klassenreferenz

Manipulation class providing formatted output support. Mehr ...

#include <o_stream.h>

Klassendiagramm für O_Stream:
Inheritance graph
[Legende]
Zusammengehörigkeiten von O_Stream:
Collaboration graph
[Legende]

Öffentliche Typen

enum  Base { bin = 2, oct = 8, dec = 10, hex = 16 }
 basis for display of digits eg. 2, 8, 10 or 16 Mehr ...

Öffentliche Methoden

 O_Stream ()
 Default constructor initialising with dezimal system.
O_Streamoperator<< (char value)
 overloded output operator
O_Streamoperator<< (unsigned char value)
 overloded output operator
O_Streamoperator<< (char *value)
 overloded output operator
O_Streamoperator<< (const char *value)
 overloded output operator
O_Streamoperator<< (unsigned short value)
 overloded output operator
O_Streamoperator<< (short value)
 overloded output operator
O_Streamoperator<< (unsigned int value)
 overloded output operator
O_Streamoperator<< (int value)
 overloded output operator
O_Streamoperator<< (unsigned long value)
 overloded output operator
O_Streamoperator<< (long value)
 overloded output operator
O_Streamoperator<< (void *value)
 overloded output operator
O_Streamoperator<< (FGColor fgColor)
 overloded output manipulator
O_Streamoperator<< (BGColor bgColor)
 overloded output manipulator
O_Streamoperator<< (Blink blink)
 overloded output manipulator
O_Streamoperator<< (O_Stream &(*f)(O_Stream &))
 overloaded output operator for manipulator functions
virtual ~O_Stream ()
 Default Destructor.

Öffentliche Attribute

Base base
 current selected base

Geschützte Methoden

virtual void setAttributes (int fgColor, int bgColor, bool blink)=0
 ermöglicht dem O_Stream das setzen der Attribute
- Geschützte Methoden geerbt von Stringbuffer
virtual void flush ()=0
 flush the content of the buffer to the screen
void put (char c)
 insert a character into the buffer
 Stringbuffer ()
 Default constructor setting the buffer empty.
virtual ~Stringbuffer ()
 Default destructor of Stringbuffer.

Geschützte Attribute

int bgColor
bool blink
int fgColor
- Geschützte Attribute geerbt von Stringbuffer
char buffer [BUFFERSIZE]
 buffer containing the characters
short pos
 buffer pointer saving the position of the next insertion

Freundbeziehungen

O_Streambin (O_Stream &)
 switch basis of o_stream to binary
O_Streamdec (O_Stream &)
 switch basis of o_stream to decimal
O_Streamendl (O_Stream &)
 print buffer after adding a newline
O_Streamhex (O_Stream &)
 switch basis of o_stream to hexadecimal
O_Streamoct (O_Stream &)
 switch basis of o_stream to octal

Ausführliche Beschreibung

Manipulation class providing formatted output support.

O_Stream extends the Stringbuffer and contains the definitions of the << operator of the most important predefined datatypes. It is used to implement the known usability of the C++ io_stream library. At the moment the display of characters, strings and digits is supported. Besides the operator definition contained in O_Stream several auxiliary manipulators are defined. These manipulators are used to choose the basis for display of digits and to print the buffer after an endl.

Definiert in Zeile 102 der Datei o_stream.h.

Dokumentation der Aufzählungstypen

basis for display of digits eg. 2, 8, 10 or 16

Aufzählungswerte:
bin 
oct 
dec 
hex 

Definiert in Zeile 154 der Datei o_stream.h.

Beschreibung der Konstruktoren und Destruktoren

O_Stream::O_Stream ( )

Default constructor initialising with dezimal system.

Definiert in Zeile 11 der Datei o_stream.cc.

O_Stream::~O_Stream ( )
virtual

Default Destructor.

Definiert in Zeile 14 der Datei o_stream.cc.

Dokumentation der Elementfunktionen

O_Stream & O_Stream::operator<< ( char  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 17 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( unsigned char  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 22 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( char *  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 26 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( const char *  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 30 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( unsigned short  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 40 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( short  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 36 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( unsigned int  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 50 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( int  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 45 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( unsigned long  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 65 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( long  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 55 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( void *  value)

overloded output operator

Operator << overloading the default operator. Is used to convert the given datatype into a string that can be printed on an output device. This operator has to be implemented for every standard data type (char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, void*, char*).

Parameter
valuevalue of datatype (has the type of datatype)
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 92 der Datei o_stream.cc.

O_Stream & O_Stream::operator<< ( FGColor  fgColor)

overloded output manipulator

Operator << overloading the default operator. It is used to change the way the characters are printed on the screen.

Parameter
fgColornew foreground color
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 100 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( BGColor  bgColor)

overloded output manipulator

Operator << overloading the default operator. It is used to change the way the characters are printed on the screen.

Parameter
bgColornew background color
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 108 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( Blink  blink)

overloded output manipulator

Operator << overloading the default operator. It is used to change the way the characters are printed on the screen.

Parameter
blinknew blinking state
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 116 der Datei o_stream.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

O_Stream & O_Stream::operator<< ( O_Stream &(*)(O_Stream &)  f)

overloaded output operator for manipulator functions

Operator << overloading the default operator is used to call defined manipulators.

Parameter
fmainpulator function to be applied to the ostream
Rückgabe
reference to the current O_Stream object.

Definiert in Zeile 153 der Datei o_stream.cc.

virtual void O_Stream::setAttributes ( int  fgColor,
int  bgColor,
bool  blink 
)
protectedpure virtual

ermöglicht dem O_Stream das setzen der Attribute

Dem Stream können Attributwerte wie Farbe übergeben werden. Aufgrund der Kapselung kann die Klasse aber die Attribute nicht setzen. Deshalb wird die abstrakte Funktion deklariert, die in einer abgeleiteten Klasse implementiert werden muss.

Parameter
fgColorVordergrundfarbe
bgColorHintergrundfarbe
blinkSoll es blinken?

Implementiert in CGA_Stream und Log.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Freundbeziehungen und Funktionsdokumentation

O_Stream& bin ( O_Stream out)
friend

switch basis of o_stream to binary

Definiert in Zeile 130 der Datei o_stream.cc.

O_Stream& dec ( O_Stream out)
friend

switch basis of o_stream to decimal

Definiert in Zeile 142 der Datei o_stream.cc.

O_Stream& endl ( O_Stream out)
friend

print buffer after adding a newline

Definiert in Zeile 123 der Datei o_stream.cc.

O_Stream& hex ( O_Stream out)
friend

switch basis of o_stream to hexadecimal

Definiert in Zeile 148 der Datei o_stream.cc.

O_Stream& oct ( O_Stream out)
friend

switch basis of o_stream to octal

Definiert in Zeile 136 der Datei o_stream.cc.

Dokumentation der Datenelemente

Base O_Stream::base

current selected base

Definiert in Zeile 164 der Datei o_stream.h.

int O_Stream::bgColor
protected

intern gespeicherte Hintergrundfarbe

Definiert in Zeile 109 der Datei o_stream.h.

bool O_Stream::blink
protected

intern gespeicherte Blinkverhalten

Definiert in Zeile 112 der Datei o_stream.h.

int O_Stream::fgColor
protected

intern gespeicherte Vordergrundfarbe

Definiert in Zeile 106 der Datei o_stream.h.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: