Adds support for pointer types to console.

This commit is contained in:
Felix Queißner 2016-05-04 15:49:55 +02:00
parent b7d4e633be
commit a39395cd12
2 changed files with 19 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include "screen.hpp"
#include "pointer.hpp"
struct FColor
{
@ -119,4 +120,7 @@ public:
Console & operator << (void *value);
Console & operator << (bool value);
template<typename T>
Console & operator << (pointer<T> ptr);
};

View file

@ -142,3 +142,18 @@ Console & Console::operator << (bool value)
}
return *this;
}
template<>
Console & Console::operator << <physical_t_ident>(physical_t ptr)
{
*this << "physical(0x" << ptr.data() << ")";
return *this;
}
template<>
Console & Console::operator << <virtual_t_ident>(virtual_t ptr)
{
*this << "virtual(0x" << ptr.data() << ")";
return *this;
}