diff options
| author | manuel <manuel@nc8430.lan> | 2009-05-14 18:58:48 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-05-14 18:58:48 +0200 |
| commit | 53b68ac658569dea3f5a26745dacf2a9aca0b266 (patch) | |
| tree | 269af83394e84e2a7142dde87fb15dce413aa5c9 /ue3/mycpu/cdisplay.h | |
| parent | ddf63e2765a6b225d18c59321595e69e1a126e0c (diff) | |
| parent | 3563c6dfd0f5f102cb748ecc6ad318601990515e (diff) | |
| download | ooprog-53b68ac658569dea3f5a26745dacf2a9aca0b266.tar.gz ooprog-53b68ac658569dea3f5a26745dacf2a9aca0b266.tar.bz2 ooprog-53b68ac658569dea3f5a26745dacf2a9aca0b266.zip | |
trying merging cpu-mm with default branch
Diffstat (limited to 'ue3/mycpu/cdisplay.h')
| -rw-r--r-- | ue3/mycpu/cdisplay.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/ue3/mycpu/cdisplay.h b/ue3/mycpu/cdisplay.h new file mode 100644 index 0000000..82776ee --- /dev/null +++ b/ue3/mycpu/cdisplay.h | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /** | ||
| 2 | * @module cdisplay | ||
| 3 | * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) | ||
| 4 | * @brief Abstract template class for displays | ||
| 5 | * @date 10.05.2009 | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef CDISPLAY_H | ||
| 9 | #define CDISPLAY_H 1 | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @class CDisplayT | ||
| 13 | * | ||
| 14 | * Abstract template class for displays | ||
| 15 | */ | ||
| 16 | template <class T> | ||
| 17 | class CDisplayT | ||
| 18 | { | ||
| 19 | public: | ||
| 20 | /** | ||
| 21 | * @method CDisplayT | ||
| 22 | * @brief Default ctor | ||
| 23 | * @param name name of display | ||
| 24 | * @return - | ||
| 25 | * @globalvars none | ||
| 26 | * @exception none | ||
| 27 | * @conditions none | ||
| 28 | */ | ||
| 29 | CDisplayT(std::string name) | ||
| 30 | : m_name(name) | ||
| 31 | {} | ||
| 32 | |||
| 33 | /** | ||
| 34 | * @method ~CDisplayT | ||
| 35 | * @brief Default dtor | ||
| 36 | * @param - | ||
| 37 | * @return - | ||
| 38 | * @globalvars none | ||
| 39 | * @exception none | ||
| 40 | * @conditions none | ||
| 41 | */ | ||
| 42 | virtual ~CDisplayT() | ||
| 43 | {} | ||
| 44 | |||
| 45 | /** | ||
| 46 | * @method getName | ||
| 47 | * @brief returns name of display | ||
| 48 | * @param - | ||
| 49 | * @return name of display | ||
| 50 | * @globalvars none | ||
| 51 | * @exception none | ||
| 52 | * @conditions none | ||
| 53 | */ | ||
| 54 | virtual const std::string& getName() | ||
| 55 | { | ||
| 56 | return m_name; | ||
| 57 | } | ||
| 58 | |||
| 59 | /** | ||
| 60 | * @method display | ||
| 61 | * @brief prints value to display | ||
| 62 | * @param value value to display | ||
| 63 | * @return - | ||
| 64 | * @globalvars none | ||
| 65 | * @exception none | ||
| 66 | * @conditions none | ||
| 67 | */ | ||
| 68 | virtual void display(const T &value) = 0; | ||
| 69 | |||
| 70 | protected: | ||
| 71 | /* members */ | ||
| 72 | /** name of display */ | ||
| 73 | std::string m_name; | ||
| 74 | }; | ||
| 75 | |||
| 76 | /** | ||
| 77 | * @class CDisplay | ||
| 78 | * | ||
| 79 | * Memory definition for CCPU | ||
| 80 | */ | ||
| 81 | typedef CDisplayT<CDat> CDisplay; | ||
| 82 | |||
| 83 | #endif | ||
| 84 | |||
| 85 | /* vim: set et sw=2 ts=2: */ | ||
