OOStuBS - Technische Informatik II (TI-II)
2.4
|
Manipulation class providing formatted output support. Mehr ...
#include <o_stream.h>
Ö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_Stream & | operator<< (char value) |
overloded output operator | |
O_Stream & | operator<< (unsigned char value) |
overloded output operator | |
O_Stream & | operator<< (char *value) |
overloded output operator | |
O_Stream & | operator<< (const char *value) |
overloded output operator | |
O_Stream & | operator<< (unsigned short value) |
overloded output operator | |
O_Stream & | operator<< (short value) |
overloded output operator | |
O_Stream & | operator<< (unsigned int value) |
overloded output operator | |
O_Stream & | operator<< (int value) |
overloded output operator | |
O_Stream & | operator<< (unsigned long value) |
overloded output operator | |
O_Stream & | operator<< (long value) |
overloded output operator | |
O_Stream & | operator<< (void *value) |
overloded output operator | |
O_Stream & | operator<< (FGColor fgColor) |
overloded output manipulator | |
O_Stream & | operator<< (BGColor bgColor) |
overloded output manipulator | |
O_Stream & | operator<< (Blink blink) |
overloded output manipulator | |
O_Stream & | operator<< (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 | |
![]() | |
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 |
![]() | |
char | buffer [BUFFERSIZE] |
buffer containing the characters | |
short | pos |
buffer pointer saving the position of the next insertion |
Freundbeziehungen | |
O_Stream & | bin (O_Stream &) |
switch basis of o_stream to binary | |
O_Stream & | dec (O_Stream &) |
switch basis of o_stream to decimal | |
O_Stream & | endl (O_Stream &) |
print buffer after adding a newline | |
O_Stream & | hex (O_Stream &) |
switch basis of o_stream to hexadecimal | |
O_Stream & | oct (O_Stream &) |
switch basis of o_stream to octal |
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.
enum O_Stream::Base |
basis for display of digits eg. 2, 8, 10 or 16
Definiert in Zeile 154 der Datei o_stream.h.
O_Stream::O_Stream | ( | ) |
Default constructor initialising with dezimal system.
Definiert in Zeile 11 der Datei o_stream.cc.
|
virtual |
Default Destructor.
Definiert in Zeile 14 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*).
value | value of datatype (has the type of datatype) |
Definiert in Zeile 17 der Datei o_stream.cc.
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*).
value | value of datatype (has the type of datatype) |
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*).
value | value of datatype (has the type of datatype) |
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*).
value | value of datatype (has the type of datatype) |
Definiert in Zeile 30 der Datei o_stream.cc.
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*).
value | value of datatype (has the type of datatype) |
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*).
value | value of datatype (has the type of datatype) |
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*).
value | value of datatype (has the type of datatype) |
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*).
value | value of datatype (has the type of datatype) |
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*).
value | value of datatype (has the type of datatype) |
Definiert in Zeile 65 der Datei o_stream.cc.
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*).
value | value of datatype (has the type of datatype) |
Definiert in Zeile 55 der Datei o_stream.cc.
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*).
value | value of datatype (has the type of datatype) |
Definiert in Zeile 92 der Datei o_stream.cc.
overloded output manipulator
Operator << overloading the default operator. It is used to change the way the characters are printed on the screen.
fgColor | new foreground color |
Definiert in Zeile 100 der Datei o_stream.cc.
overloded output manipulator
Operator << overloading the default operator. It is used to change the way the characters are printed on the screen.
bgColor | new background color |
Definiert in Zeile 108 der Datei o_stream.cc.
overloded output manipulator
Operator << overloading the default operator. It is used to change the way the characters are printed on the screen.
blink | new blinking state |
Definiert in Zeile 116 der Datei o_stream.cc.
overloaded output operator for manipulator functions
Operator << overloading the default operator is used to call defined manipulators.
f | mainpulator function to be applied to the ostream |
Definiert in Zeile 153 der Datei o_stream.cc.
|
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.
fgColor | Vordergrundfarbe |
bgColor | Hintergrundfarbe |
blink | Soll es blinken? |
Implementiert in CGA_Stream und Log.
switch basis of o_stream to binary
Definiert in Zeile 130 der Datei o_stream.cc.
switch basis of o_stream to decimal
Definiert in Zeile 142 der Datei o_stream.cc.
print buffer after adding a newline
Definiert in Zeile 123 der Datei o_stream.cc.
switch basis of o_stream to hexadecimal
Definiert in Zeile 148 der Datei o_stream.cc.
switch basis of o_stream to octal
Definiert in Zeile 136 der Datei o_stream.cc.
Base O_Stream::base |
current selected base
Definiert in Zeile 164 der Datei o_stream.h.
|
protected |
intern gespeicherte Hintergrundfarbe
Definiert in Zeile 109 der Datei o_stream.h.
|
protected |
intern gespeicherte Blinkverhalten
Definiert in Zeile 112 der Datei o_stream.h.
|
protected |
intern gespeicherte Vordergrundfarbe
Definiert in Zeile 106 der Datei o_stream.h.