From 26a97259f5a7b066cff2927e88c867fac2aaad87 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 26 May 2009 23:10:13 +0200 Subject: template FTW!!!!!11 --- ue4/mycpu/displays.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'ue4/mycpu/displays.h') diff --git a/ue4/mycpu/displays.h b/ue4/mycpu/displays.h index d4f3f36..33d81bb 100644 --- a/ue4/mycpu/displays.h +++ b/ue4/mycpu/displays.h @@ -2,7 +2,7 @@ * @module displays * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) * @brief Implementations of CDisplay - * @date 10.05.2009 + * @date 26.05.2009 */ #ifndef DISPLAYS_H @@ -15,14 +15,15 @@ * @class CDisplayWDEZ * * Implementation of CDisplay - * Prints CDat to stdout as decimal + * Prints T to stdout as decimal */ +template class CDisplayWDEZ - : public CDisplay + : public CDisplay { public: CDisplayWDEZ() - : CDisplay("wdez") + : CDisplay("wdez") {} /** @@ -34,7 +35,7 @@ class CDisplayWDEZ * @exception none * @conditions none */ - void display(const CDat &value) + void display(const T &value) { std::cout << std::dec << value << std::endl; } @@ -46,14 +47,15 @@ class CDisplayWDEZ * @class CDisplayWHEX * * Implementation of CDisplay - * Prints CDat to stdout as decimal + * Prints T to stdout as decimal */ +template class CDisplayWHEX - : public CDisplay + : public CDisplay { public: CDisplayWHEX() - : CDisplay("whex") + : CDisplay("whex") {} /** @@ -65,7 +67,7 @@ class CDisplayWHEX * @exception none * @conditions none */ - void display(const CDat &value) + void display(const T &value) { std::cout << std::hex << value << std::endl; } -- cgit v1.2.3