• 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
      • Eingebettete Systemsoftware
      • 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 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Aufgabe 3: Pro-/Epilog
              • Aufgabe 4: Kontextwechsel
                • Aufgabe 5: Zeitscheiben
                  • Aufgabe 6: Synchronisation
                    • Aufgabe 7: Anwendung
                      • Assembler Crashkurs
                        • C++ Crashkurs
                          • Entwicklungsumgebung
                            • FAQ
                              • Ruhmeshalle
                              • Evaluation

                              Aufgabe 0: C++ Streams

                              • object
                              Classes | Functions
                              outputstream.h File Reference

                              This file contains the OutputStream. More...

                              #include "stringbuffer.h"
                              + Include dependency graph for outputstream.h:
                              + This graph shows which files directly or indirectly include this file:

                              Classes

                              class  OutputStream
                               The class OutputStream corresponds, essentially, to the class ostream from the C++ IO-Stream library. More...
                               

                              Functions

                              OutputStream & flush (OutputStream &os)
                               Enforces a buffer flush. More...
                               
                              OutputStream & endl (OutputStream &os)
                               Prints a newline character to the stream and issues a buffer flush. More...
                               
                              OutputStream & bin (OutputStream &os)
                               Print subsequent numbers in binary form. More...
                               
                              OutputStream & oct (OutputStream &os)
                               Print subsequent numbers in octal form. More...
                               
                              OutputStream & dec (OutputStream &os)
                               Print subsequent numbers in decimal form. More...
                               
                              OutputStream & hex (OutputStream &os)
                               Print subsequent numbers in hex form. More...
                               

                              Detailed Description

                              This file contains the OutputStream.

                              Along with the class OutputStream itself, this file contains definitions for the manipulators hex, dec, oct, and bin, which are used for changing the radix, and endl for signaling the end of the current line.

                              Manipulators
                              To simplify formatting text and numbers using the class OutputStream, we define so-called manipulators. For example, the expression kout << "a = " << dec << a << " is hexadecimal " << hex << a << endl; should, at first, print the value stored in decimal and then in hexadecimal form, followed by a line break. The intended properties can be realized by implementing hex, dec, oct, bin, and endl as functions (i.e., they are, in particular, not methods of OutputStream) that take (as first parameter) and return a reference to an OutputStream object. When compiling the expression show above, the method OutputStream& OutputStream::operator<< ((f) (OutputStream&)) is chosen when one of the functions hex, dec, oct, bin, or endl is streamed an OutputStream, which finally will execute the passed function.
                              Note
                              The term manipulator originates from the book The C++ Programming Language by Bjarne Stroustrup. Refer to this book for further explanations.

                              Function Documentation

                              OutputStream & flush ( OutputStream &  os)

                              Enforces a buffer flush.

                              Todo:
                              Implement Manipulator
                              Parameters
                              osReference to stream to be flushed.
                              Returns
                              Reference to OutputStream os; allows operator chaining.
                              OutputStream & endl ( OutputStream &  os)

                              Prints a newline character to the stream and issues a buffer flush.

                              Todo:
                              Implement Manipulator
                              Parameters
                              osReference to stream to be modified.
                              Returns
                              Reference to OutputStream os; allows operator chaining.
                              OutputStream & bin ( OutputStream &  os)

                              Print subsequent numbers in binary form.

                              Todo:
                              Implement Manipulator
                              Parameters
                              osReference to stream to be modified.
                              Returns
                              Reference to OutputStream os; allows operator chaining.
                              OutputStream & oct ( OutputStream &  os)

                              Print subsequent numbers in octal form.

                              Todo:
                              Implement Manipulator
                              Parameters
                              osReference to stream to be modified.
                              Returns
                              Reference to OutputStream os; allows operator chaining.
                              OutputStream & dec ( OutputStream &  os)

                              Print subsequent numbers in decimal form.

                              Todo:
                              Implement Manipulator
                              Parameters
                              osReference to stream to be modified.
                              Returns
                              Reference to OutputStream os; allows operator chaining.
                              OutputStream & hex ( OutputStream &  os)

                              Print subsequent numbers in hex form.

                              Todo:
                              Implement Manipulator
                              Parameters
                              osReference to stream to be modified.
                              Returns
                              Reference to OutputStream os; allows operator chaining.
                              Friedrich-Alexander-Universität
                              Erlangen-Nürnberg

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