diff options
Diffstat (limited to 'ue3/mycpu/cdat.h')
| -rw-r--r-- | ue3/mycpu/cdat.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/ue3/mycpu/cdat.h b/ue3/mycpu/cdat.h index dc8a07c..365bd88 100644 --- a/ue3/mycpu/cdat.h +++ b/ue3/mycpu/cdat.h | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * @module cdat | 2 | * @module cdat |
| 3 | * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) | 3 | * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) |
| 4 | * @brief Datatype template for mycpu | 4 | * @brief Datatype template and datatype definition for CCPU and CMem |
| 5 | * @date 10.05.2009 | 5 | * @date 10.05.2009 |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #ifndef CDATT_H | 8 | #ifndef CDAT_H |
| 9 | #define CDATT_H | 9 | #define CDAT_H 1 |
| 10 | 10 | ||
| 11 | #include <boost/operators.hpp> | 11 | #include <boost/operators.hpp> |
| 12 | #include <iostream> | 12 | #include <iostream> |
| @@ -14,7 +14,7 @@ | |||
| 14 | /** | 14 | /** |
| 15 | * @class CDatT | 15 | * @class CDatT |
| 16 | * | 16 | * |
| 17 | * Datatype template for mycpu. | 17 | * Datatype template for CCPU and CMem. |
| 18 | */ | 18 | */ |
| 19 | template <class T> | 19 | template <class T> |
| 20 | class CDatT | 20 | class CDatT |
| @@ -86,6 +86,20 @@ class CDatT | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | /** | 88 | /** |
| 89 | * @method operator T | ||
| 90 | * @brief convert to T | ||
| 91 | * @param - | ||
| 92 | * @return T | ||
| 93 | * @globalvars none | ||
| 94 | * @exception none | ||
| 95 | * @conditions none | ||
| 96 | */ | ||
| 97 | operator T() | ||
| 98 | { | ||
| 99 | return m_value; | ||
| 100 | } | ||
| 101 | |||
| 102 | /** | ||
| 89 | * @method operator< | 103 | * @method operator< |
| 90 | * @brief implementation of operator < | 104 | * @brief implementation of operator < |
| 91 | * @param reference to CDatT | 105 | * @param reference to CDatT |
| @@ -300,8 +314,11 @@ class CDatT | |||
| 300 | T m_value; | 314 | T m_value; |
| 301 | }; | 315 | }; |
| 302 | 316 | ||
| 303 | 317 | /** | |
| 304 | /** define CDat */ | 318 | * @class CDat |
| 319 | * | ||
| 320 | * Datatype for CCPU and CMem | ||
| 321 | */ | ||
| 305 | typedef CDatT<int> CDat; | 322 | typedef CDatT<int> CDat; |
| 306 | 323 | ||
| 307 | #endif | 324 | #endif |
