From 89e202f49b9857dcd3627fbc4e0262125d729bbc Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 May 2009 04:09:39 +0200 Subject: adding all instructions and displays --- ue3/mycpu/displays.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ue3/mycpu/displays.h (limited to 'ue3/mycpu/displays.h') diff --git a/ue3/mycpu/displays.h b/ue3/mycpu/displays.h new file mode 100644 index 0000000..f7adbdb --- /dev/null +++ b/ue3/mycpu/displays.h @@ -0,0 +1,56 @@ +/** + * @module displays + * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) + * @brief TODO + * @date 10.05.2009 + */ + +#ifndef DISPLAYS_H +#define DISPLAYS_H 1 + +#include +#include "cdisplay.h" + +/** + * @class CDisplayWDEZ + * + * TODO + */ +class CDisplayWDEZ + : public CDisplay +{ + public: + CDisplayWDEZ() + : CDisplay("wdez") + {} + + void display(const CDat &value) + { + std::cout << std::dec << value << std::endl; + } +}; + +/*============================================================================*/ + +/** + * @class CDisplayWHEX + * + * TODO + */ +class CDisplayWHEX + : public CDisplay +{ + public: + CDisplayWHEX() + : CDisplay("whex") + {} + + void display(const CDat &value) + { + std::cout << std::hex << value << std::endl; + } +}; + +#endif + +/* vim: set et sw=2 ts=2: */ -- cgit v1.2.3 From 3c6f886d5a8bfd36c796b963d6e3178ad9577742 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 May 2009 16:55:17 +0200 Subject: * added documentation (no more TODOs) * added testsuite + testcase * used copyctor instead of assign operator more often --- ue3/mycpu/displays.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ue3/mycpu/displays.h') diff --git a/ue3/mycpu/displays.h b/ue3/mycpu/displays.h index f7adbdb..87b9408 100644 --- a/ue3/mycpu/displays.h +++ b/ue3/mycpu/displays.h @@ -1,7 +1,7 @@ /** * @module displays * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) - * @brief TODO + * @brief Implementations of CDisplay * @date 10.05.2009 */ @@ -14,7 +14,8 @@ /** * @class CDisplayWDEZ * - * TODO + * Implementation of CDisplay + * Prints CDat to stdout as decimal */ class CDisplayWDEZ : public CDisplay @@ -35,7 +36,8 @@ class CDisplayWDEZ /** * @class CDisplayWHEX * - * TODO + * Implementation of CDisplay + * Prints CDat to stdout as decimal */ class CDisplayWHEX : public CDisplay -- cgit v1.2.3 From 3563c6dfd0f5f102cb748ecc6ad318601990515e Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 14 May 2009 18:21:15 +0200 Subject: adding doxygen docs --- ue3/mycpu/displays.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ue3/mycpu/displays.h') diff --git a/ue3/mycpu/displays.h b/ue3/mycpu/displays.h index 87b9408..d4f3f36 100644 --- a/ue3/mycpu/displays.h +++ b/ue3/mycpu/displays.h @@ -25,6 +25,15 @@ class CDisplayWDEZ : CDisplay("wdez") {} + /** + * @method display + * @brief prints value to display + * @param value value to display + * @return - + * @globalvars none + * @exception none + * @conditions none + */ void display(const CDat &value) { std::cout << std::dec << value << std::endl; @@ -47,6 +56,15 @@ class CDisplayWHEX : CDisplay("whex") {} + /** + * @method display + * @brief prints value to display + * @param value value to display + * @return - + * @globalvars none + * @exception none + * @conditions none + */ void display(const CDat &value) { std::cout << std::hex << value << std::endl; -- cgit v1.2.3