• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Embedded Systems Software
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2025/26
      • Systemprogrammierung 2
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
      • Projekt angewandte Systemsoftwaretechnik
      • Aktuelle Entwicklung in Verteilten und Objektorientierten Betriebssystemen (für Bachelor-/Masterarbeit)
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme

    Aufgabe 7: Anwendung

    Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
    GraphicsStream Class Reference
    Graphics | I/O subsystem

    Output text (form different data type sources) on screen in graphic mode (similar to TextStream) More...

    #include <device/graphicsstream.h>

    + Inheritance diagram for GraphicsStream:
    [legend]
    + Collaboration diagram for GraphicsStream:
    [legend]

    Public Member Functions

     GraphicsStream (Graphics &graphics, const Point &start, unsigned width, unsigned height, Font *font=nullptr)
     Constructor. More...
     
    void setPos (int x, int y)
     Set the cursor position. More...
     
    void getPos (int &x, int &y) const
     Read the current cursor position. More...
     
    void print (char *str, int length, const Color &color=LIGHT_GREY)
     Display multiple characters in the window starting at the current cursor position. More...
     
    void reset (char character=' ', const Color &color=LIGHT_GREY)
     Clear window and reset cursor. More...
     
    void show (int x, int y, char character, const Color &color=LIGHT_GREY)
     Basic output of a (colored) character at a certain position on the screen. More...
     
    void draw ()
     Draw using the Graphics device.
     
    - Public Member Functions inherited from OutputStream
     OutputStream ()
     Default constructor. Initial number system is decimal.
     
    virtual ~OutputStream ()
     Destructor.
     
    virtual void flush ()=0
     Clears the buffer. More...
     
    OutputStream & operator<< (char c)
     Print a single character. More...
     
    OutputStream & operator<< (unsigned char c)
     Print a single character. More...
     
    OutputStream & operator<< (const char *string)
     Printing a null-terminated string. More...
     
    OutputStream & operator<< (bool b)
     Print a boolean value. More...
     
    OutputStream & operator<< (short ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (unsigned short ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (int ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (unsigned int ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (long ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (unsigned long ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (long long ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (unsigned long long ival)
     Print an integral number in radix base More...
     
    OutputStream & operator<< (const void *ptr)
     Print a pointer as hexadecimal number. More...
     
    OutputStream & operator<< (OutputStream &(*f)(OutputStream &))
     Calls one of the manipulator functions. More...
     
    - Public Member Functions inherited from Stringbuffer
    virtual ~Stringbuffer ()
     Destructor (nothing to do here)
     

    Public Attributes

    Font *const FONT
     Default font.
     
    const Point START
     Upper left corner of the window.
     
    const unsigned ROWS
     Number of rows in the window.
     
    const unsigned COLUMNS
     Number of columns in the window.
     
    - Public Attributes inherited from OutputStream
    int base
     Number system used for printing integral numbers (one of 2, 8, 10, or 16)
     

    Static Public Attributes

    static const Color BLACK
     CGA color palette.
     
    static const Color BLUE
     
    static const Color GREEN
     
    static const Color CYAN
     
    static const Color RED
     
    static const Color MAGENTA
     
    static const Color BROWN
     
    static const Color LIGHT_GREY
     
    static const Color DARK_GREY
     
    static const Color LIGHT_BLUE
     
    static const Color LIGHT_GREEN
     
    static const Color LIGHT_CYAN
     
    static const Color LIGHT_RED
     
    static const Color LIGHT_MAGENTA
     
    static const Color YELLOW
     
    static const Color WHITE
     

    Protected Member Functions

    void flush ()
     Output the buffer contents of the base class Stringbuffer. More...
     
    - Protected Member Functions inherited from Stringbuffer
     Stringbuffer ()
     Constructor; Marks the buffer as empty.
     
    void put (char c)
     Inserts a character into the buffer. More...
     
    virtual void flush ()=0
     Flush the buffer contents. More...
     

    Additional Inherited Members

    - Protected Attributes inherited from Stringbuffer
    char buffer [80]
     buffer containing characters that will be printed upon flush()
     
    long unsigned pos
     current position in the buffer
     

    Detailed Description

    Output text (form different data type sources) on screen in graphic mode (similar to TextStream)

    Enables output of different data types using a monospaced font on a predefined area of the screen with activated graphics mode.

    Constructor & Destructor Documentation

    GraphicsStream::GraphicsStream ( Graphics &  graphics,
    const Point &  start,
    unsigned  width,
    unsigned  height,
    Font *  font = nullptr 
    )

    Constructor.

    Creates a window (= area on the screen) for text output. Within the window text uses a virtual (invisible) cursor to offer a very similar behavior to TextStream – including automatic scrolling and column/row based positioning.

    Parameters
    graphicsGraphics device for output
    startCoordinate of the upper left corner for the output window
    widthWidth of the output window
    heightHeight of the output window
    fontFont used for output text (or nullptr for default font)

    Member Function Documentation

    void GraphicsStream::flush ( )
    protectedvirtual

    Output the buffer contents of the base class Stringbuffer.

    The method is automatically called when the buffer is full, but can also be called explicitly to force output of the current buffer.

    Implements OutputStream.

    void GraphicsStream::setPos ( int  x,
    int  y 
    )

    Set the cursor position.

    Parameters
    xColumn in window
    yRow in window
    void GraphicsStream::getPos ( int &  x,
    int &  y 
    ) const

    Read the current cursor position.

    Parameters
    xColumn in window
    yRow in window
    void GraphicsStream::print ( char *  str,
    int  length,
    const Color &  color = LIGHT_GREY 
    )

    Display multiple characters in the window starting at the current cursor position.

    This method can be used to output a string, starting at the current cursor position. Since the string does not need to contain a '\0' termination (as it is usually the case in C), the parameter length is required to specify the number of characters in the string. When the output is complete, the cursor will be positioned after the last character printed. The entire text uniformly has the color color

    If there is not enough space left at the end of the line, the output will be continued on the following line. As soon as the last window line is filled, the entire window area will be moved up one line. The first line disappears and the last line is blank, continuing output there.

    A line break will also occurs wherever the character \\n is inserted in the text to be output.

    Parameters
    strString to output
    lengthlength of string
    colorForeground color of string
    void GraphicsStream::reset ( char  character = ' ',
    const Color &  color = LIGHT_GREY 
    )

    Clear window and reset cursor.

    Parameters
    characterFilling character
    colorForeground color
    void GraphicsStream::show ( int  x,
    int  y,
    char  character,
    const Color &  color = LIGHT_GREY 
    )

    Basic output of a (colored) character at a certain position on the screen.

    Outputs character at the absolute position (x, y) with the specified color: x specifies the column and y the row of the desired position, with 0 ≤ x < COLUMNS and 0 ≤ y < ROWS. The position (0,0) indicates the upper left corner of the window (at the coordinates START).

    Parameters
    xColumn for output of the character
    yRow for output of the character
    characterCharacter to be output
    colorForeground color

    The documentation for this class was generated from the following files:
    • device/graphicsstream.h
    • device/graphicsstream.cc
    Friedrich-Alexander-Universität
    Erlangen-Nürnberg

    Schlossplatz 4
    91054 Erlangen
    • Impressum
    • Datenschutz
    • Barrierefreiheit
    • Facebook
    • RSS Feed
    • Xing
    Nach oben