The Pedigree Project 0.1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BootIO Class Reference

#include <BootIO.h>

+ Collaboration diagram for BootIO:

Public Types

enum  Colour {
  Black = 0 , Blue = 1 , Green = 2 , Cyan = 3 ,
  Red = 4 , Magenta = 5 , Orange = 6 , LightGrey = 7 ,
  DarkGrey = 8 , LightBlue = 9 , LightGreen = 10 , LightCyan = 11 ,
  LightRed = 12 , LightMagenta = 13 , Yellow = 14 , White = 15
}
 

Public Member Functions

 BootIO () NOTHROW
 
 ~BootIO ()
 
void initialise ()
 
template<class T >
EXPORTED_PUBLIC void write (T &str, Colour foreColour, Colour backColour)
 
template<class T >
void write (T &str, Colour foreColour, Colour backColour)
 

Private Member Functions

void putCharVga (const char c, Colour foreColour, Colour backColour)
 
void startColour (Serial *pSerial, Colour foreColour, Colour backColour)
 
void endColour (Serial *pSerial)
 

Private Attributes

size_t m_CursorX
 
size_t m_CursorY
 

Detailed Description

A class which provides extremely simple output to both the Vga class and Serial classes, intended to be used for displaying messages during bootup.

Definition at line 36 of file BootIO.h.

Member Enumeration Documentation

◆ Colour

Enumeration of all possible foreground and background colours.

Definition at line 41 of file BootIO.h.

Constructor & Destructor Documentation

◆ BootIO()

BootIO::BootIO ( )

Constructor. I hope you knew that already.

Definition at line 28 of file BootIO.cc.

◆ ~BootIO()

BootIO::~BootIO ( )

Destructor. Let's hope you knew that too.

Definition at line 30 of file BootIO.cc.

Member Function Documentation

◆ endColour()

void BootIO::endColour ( Serial pSerial)
private

Definition at line 216 of file BootIO.cc.

◆ initialise()

void BootIO::initialise ( )

Initialise the BootIO - If we have a VGA device this clears the screen.

Definition at line 32 of file BootIO.cc.

References Vga::getNumCols(), Vga::getNumRows(), Machine::getVga(), Vga::setLargestTextMode(), and write().

◆ putCharVga()

void BootIO::putCharVga ( const char  c,
Colour  foreColour,
Colour  backColour 
)
private

Definition at line 66 of file BootIO.cc.

◆ startColour()

void BootIO::startColour ( Serial pSerial,
Colour  foreColour,
Colour  backColour 
)
private

Definition at line 133 of file BootIO.cc.

◆ write() [1/2]

template<class T >
template EXPORTED_PUBLIC void BootIO::write< HugeStaticString > ( T &  str,
Colour  foreColour,
Colour  backColour 
)

Write a string out to each output device.

Parameters
strThe string to write
foreColourThe foreground colour
backColourThe background colour

Referenced by initialise().

+ Here is the caller graph for this function:

◆ write() [2/2]

template<class T >
void BootIO::write ( T &  str,
Colour  foreColour,
Colour  backColour 
)

Definition at line 48 of file BootIO.cc.

Member Data Documentation

◆ m_CursorX

size_t BootIO::m_CursorX
private

Current cursor position for VGA.

Definition at line 84 of file BootIO.h.

◆ m_CursorY

size_t BootIO::m_CursorY
private

Definition at line 84 of file BootIO.h.


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