From 45581d3d376e8deed84952cb838ae330549e5241 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 12 May 2009 23:18:17 +0200 Subject: my cpu design --- ue3/mycpu/cdisplay.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 ue3/mycpu/cdisplay.h (limited to 'ue3/mycpu/cdisplay.h') diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h new file mode 100644 index 0000000..629ec88 --- /dev/null +++ b/ue3/mycpu/cdisplay.h @@ -0,0 +1,48 @@ +/** + * @module cdisplay + * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) + * @brief TODO + * @date 10.05.2009 + */ + +#ifndef CDISPLAY_H +#define CDISPLAY_H #1 + +/** + * @class CDisplay + * + * TODO + */ +class CDisplay +{ + public: + /** + * @method CDisplay + * @brief Default ctor + * @param - + * @return - + * @globalvars none + * @exception none + * @conditions none + */ + CDisplay() + {}; + + /** + * @method ~CDisplay + * @brief Default dtor + * @param - + * @return - + * @globalvars none + * @exception none + * @conditions none + */ + ~CDisplay(); + + private: + /* members */ +}; + +#endif + +/* vim: set et sw=2 ts=2: */ -- cgit v1.2.3 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/cdisplay.h | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'ue3/mycpu/cdisplay.h') diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h index 629ec88..ed9b84d 100644 --- a/ue3/mycpu/cdisplay.h +++ b/ue3/mycpu/cdisplay.h @@ -6,7 +6,7 @@ */ #ifndef CDISPLAY_H -#define CDISPLAY_H #1 +#define CDISPLAY_H 1 /** * @class CDisplay @@ -19,14 +19,16 @@ class CDisplay /** * @method CDisplay * @brief Default ctor - * @param - + * @param name name of display * @return - * @globalvars none * @exception none * @conditions none */ - CDisplay() - {}; + CDisplay(std::string name) + { + m_name = name; + } /** * @method ~CDisplay @@ -37,10 +39,37 @@ class CDisplay * @exception none * @conditions none */ - ~CDisplay(); + virtual ~CDisplay() + {} + + /** + * @method getName + * @brief returns name of display + * @param - + * @return name of display + * @globalvars none + * @exception none + * @conditions none + */ + virtual const std::string& getName() + { + return m_name; + } + + /** + * @method getName + * @brief prints value to display + * @param value value to display + * @return - + * @globalvars none + * @exception none + * @conditions none + */ + virtual void display(const CDat &value) = 0; - private: + protected: /* members */ + std::string m_name; }; #endif -- 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/cdisplay.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ue3/mycpu/cdisplay.h') diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h index ed9b84d..c2a84a6 100644 --- a/ue3/mycpu/cdisplay.h +++ b/ue3/mycpu/cdisplay.h @@ -1,7 +1,7 @@ /** * @module cdisplay * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) - * @brief TODO + * @brief Abstract class for displays * @date 10.05.2009 */ @@ -11,7 +11,7 @@ /** * @class CDisplay * - * TODO + * Abstract class for displays */ class CDisplay { @@ -26,9 +26,8 @@ class CDisplay * @conditions none */ CDisplay(std::string name) - { - m_name = name; - } + : m_name(name) + {} /** * @method ~CDisplay -- cgit v1.2.3 From 67e99a217bd88a289d997b73f3e7cae6019bc22f Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 May 2009 17:01:15 +0200 Subject: fixing doxygen documentation --- ue3/mycpu/cdisplay.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ue3/mycpu/cdisplay.h') diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h index c2a84a6..0a0a723 100644 --- a/ue3/mycpu/cdisplay.h +++ b/ue3/mycpu/cdisplay.h @@ -68,6 +68,7 @@ class CDisplay protected: /* members */ + /** name of display */ std::string m_name; }; -- cgit v1.2.3 From ad6ca84f6e93f983de926ae71f31f42325986f61 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 14 May 2009 18:15:28 +0200 Subject: * making cdisplay a template * adding some asserts * adding classdiagramm and protokoll * fixing protokoll.pdf in ue1 --- ue3/mycpu/cdisplay.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'ue3/mycpu/cdisplay.h') diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h index 0a0a723..1523f68 100644 --- a/ue3/mycpu/cdisplay.h +++ b/ue3/mycpu/cdisplay.h @@ -1,7 +1,7 @@ /** * @module cdisplay * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) - * @brief Abstract class for displays + * @brief Abstract template class for displays * @date 10.05.2009 */ @@ -9,15 +9,16 @@ #define CDISPLAY_H 1 /** - * @class CDisplay + * @class CDisplayT * - * Abstract class for displays + * Abstract template class for displays */ -class CDisplay +template +class CDisplayT { public: /** - * @method CDisplay + * @method CDisplayT * @brief Default ctor * @param name name of display * @return - @@ -25,12 +26,12 @@ class CDisplay * @exception none * @conditions none */ - CDisplay(std::string name) + CDisplayT(std::string name) : m_name(name) {} /** - * @method ~CDisplay + * @method ~CDisplayT * @brief Default dtor * @param - * @return - @@ -38,7 +39,7 @@ class CDisplay * @exception none * @conditions none */ - virtual ~CDisplay() + virtual ~CDisplayT() {} /** @@ -64,7 +65,7 @@ class CDisplay * @exception none * @conditions none */ - virtual void display(const CDat &value) = 0; + virtual void display(const T &value) = 0; protected: /* members */ @@ -72,6 +73,13 @@ class CDisplay std::string m_name; }; +/** + * @class CDisplay + * + * Memory definition for CCPU + */ +typedef CDisplayT CDisplay; + #endif /* vim: set et sw=2 ts=2: */ -- 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/cdisplay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ue3/mycpu/cdisplay.h') diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h index 1523f68..82776ee 100644 --- a/ue3/mycpu/cdisplay.h +++ b/ue3/mycpu/cdisplay.h @@ -57,7 +57,7 @@ class CDisplayT } /** - * @method getName + * @method display * @brief prints value to display * @param value value to display * @return - -- cgit v1.2.3