Adds support for pointer types to console.
This commit is contained in:
parent
b7d4e633be
commit
a39395cd12
2 changed files with 19 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "screen.hpp"
|
#include "screen.hpp"
|
||||||
|
#include "pointer.hpp"
|
||||||
|
|
||||||
struct FColor
|
struct FColor
|
||||||
{
|
{
|
||||||
|
@ -119,4 +120,7 @@ public:
|
||||||
Console & operator << (void *value);
|
Console & operator << (void *value);
|
||||||
|
|
||||||
Console & operator << (bool value);
|
Console & operator << (bool value);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
Console & operator << (pointer<T> ptr);
|
||||||
};
|
};
|
|
@ -141,4 +141,19 @@ Console & Console::operator << (bool value)
|
||||||
*this << "false";
|
*this << "false";
|
||||||
}
|
}
|
||||||
return *this;
|
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;
|
||||||
}
|
}
|
Loading…
Reference in a new issue