Skip to content

Commit

Permalink
Move display classes from header to source file
Browse files Browse the repository at this point in the history
  • Loading branch information
djphoenix committed Nov 14, 2016
1 parent 18418fa commit 9d40249
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 20 additions & 0 deletions src/kernlib/display.cpp
Expand Up @@ -17,6 +17,26 @@
#include "kernlib.hpp"
#include "efi.hpp"

class ConsoleDisplay: public Display {
private:
static char *const base;
static char *const top;
static const size_t size;
char *display;
void putc(const char c);
public:
ConsoleDisplay();
void write(const char *str);
void clean();
};

class EFIDisplay: public Display {
public:
EFIDisplay();
void write(const char *str);
void clean();
};

char *const ConsoleDisplay::base = reinterpret_cast<char*>(0xB8000);
char *const ConsoleDisplay::top = reinterpret_cast<char*>(0xB8FA0);
const size_t ConsoleDisplay::size = ConsoleDisplay::top - ConsoleDisplay::base;
Expand Down
20 changes: 0 additions & 20 deletions src/kernlib/include/kernlib/display.hpp
Expand Up @@ -30,23 +30,3 @@ class Display {
virtual void write(const char*) = 0;
virtual ~Display() = 0;
};

class ConsoleDisplay: public Display {
private:
static char *const base;
static char *const top;
static const size_t size;
char *display;
void putc(const char c);
public:
ConsoleDisplay();
void write(const char *str);
void clean();
};

class EFIDisplay: public Display {
public:
EFIDisplay();
void write(const char *str);
void clean();
};

0 comments on commit 9d40249

Please sign in to comment.