StuBS
ConsoleOut Class Reference

Write text on console (STDOUT) More...

#include <test-stream/console_out.h>

Inheritance diagram for ConsoleOut:
[legend]
Collaboration diagram for ConsoleOut:
[legend]

Public Member Functions

 ConsoleOut ()
 Constructor.
 
virtual void flush () override
 Output the string on the screen.
 
- Public Member Functions inherited from OutputStream
 OutputStream ()
 Default constructor. Initial number system is decimal.
 
virtual ~OutputStream ()
 Destructor.
 
OutputStreamoperator<< (char c)
 Print a single character.
 
OutputStreamoperator<< (unsigned char c)
 Print a single character.
 
OutputStreamoperator<< (const char *string)
 Printing a null-terminated string.
 
OutputStreamoperator<< (bool b)
 Print a boolean value.
 
OutputStreamoperator<< (short ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (unsigned short ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (int ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (unsigned int ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (long ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (unsigned long ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (long long ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (unsigned long long ival)
 Print an integral number in radix base
 
OutputStreamoperator<< (const void *ptr)
 Print a pointer as hexadecimal number.
 
OutputStreamoperator<< (OutputStream &(*f)(OutputStream &))
 Calls one of the manipulator functions.
 
- Public Member Functions inherited from Stringbuffer
virtual ~Stringbuffer ()
 Destructor (nothing to do here)
 

Private Member Functions

 ConsoleOut (const ConsoleOut &)=delete
 
ConsoleOutoperator= (const ConsoleOut &)=delete
 

Additional Inherited Members

- Public Attributes inherited from OutputStream
int base
 Number system used for printing integral numbers (one of 2, 8, 10, or 16)
 
- Protected Member Functions inherited from Stringbuffer
 Stringbuffer ()
 Constructor; Marks the buffer as empty.
 
void put (char c)
 Inserts a character into the buffer.
 
- 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

Write text on console (STDOUT)

This class allows writing to the console similar to std::cout from the standard C++ library. The class is derived from OutputStream.

Constructor & Destructor Documentation

◆ ConsoleOut() [1/2]

ConsoleOut::ConsoleOut ( const ConsoleOut )
privatedelete

◆ ConsoleOut() [2/2]

ConsoleOut::ConsoleOut ( )

Constructor.

Todo:
Implement constructor

Member Function Documentation

◆ operator=()

ConsoleOut & ConsoleOut::operator= ( const ConsoleOut )
privatedelete

◆ flush()

void ConsoleOut::flush ( )
overridevirtual

Output the string on the screen.

The implementation should solely use putchar()

Todo:
Implement virtual method

Implements OutputStream.


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