summaryrefslogtreecommitdiffstats
path: root/ue3/mycpu/cdat.h
diff options
context:
space:
mode:
authormanuel <manuel@nc8430.lan>2009-05-14 18:58:48 +0200
committermanuel <manuel@nc8430.lan>2009-05-14 18:58:48 +0200
commit53b68ac658569dea3f5a26745dacf2a9aca0b266 (patch)
tree269af83394e84e2a7142dde87fb15dce413aa5c9 /ue3/mycpu/cdat.h
parentddf63e2765a6b225d18c59321595e69e1a126e0c (diff)
parent3563c6dfd0f5f102cb748ecc6ad318601990515e (diff)
downloadooprog-53b68ac658569dea3f5a26745dacf2a9aca0b266.tar.gz
ooprog-53b68ac658569dea3f5a26745dacf2a9aca0b266.tar.bz2
ooprog-53b68ac658569dea3f5a26745dacf2a9aca0b266.zip
trying merging cpu-mm with default branch
Diffstat (limited to 'ue3/mycpu/cdat.h')
-rw-r--r--ue3/mycpu/cdat.h67
1 files changed, 35 insertions, 32 deletions
diff --git a/ue3/mycpu/cdat.h b/ue3/mycpu/cdat.h
index 3fda572..a533fae 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 */
19template <class T> 19template <class T>
20class CDatT 20class CDatT
@@ -72,7 +72,7 @@ class CDatT
72 {} 72 {}
73 73
74 /** 74 /**
75 * @method value 75 * @method getValue
76 * @brief returns value of CDatT 76 * @brief returns value of CDatT
77 * @param - 77 * @param -
78 * @return value of CDatT 78 * @return value of CDatT
@@ -80,7 +80,21 @@ class CDatT
80 * @exception none 80 * @exception none
81 * @conditions none 81 * @conditions none
82 */ 82 */
83 T value() const 83 T getValue() const
84 {
85 return m_value;
86 }
87
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()
84 { 98 {
85 return m_value; 99 return m_value;
86 } 100 }
@@ -88,7 +102,7 @@ class CDatT
88 /** 102 /**
89 * @method operator< 103 * @method operator<
90 * @brief implementation of operator < 104 * @brief implementation of operator <
91 * @param reference to CDatT 105 * @param x reference to CDatT
92 * @return true if cdat is less than object x 106 * @return true if cdat is less than object x
93 * @globalvars none 107 * @globalvars none
94 * @exception none 108 * @exception none
@@ -102,7 +116,7 @@ class CDatT
102 /** 116 /**
103 * @method operator== 117 * @method operator==
104 * @brief implementation of operator == 118 * @brief implementation of operator ==
105 * @param reference to CDatT 119 * @param x reference to CDatT
106 * @return true if cdat equals object x 120 * @return true if cdat equals object x
107 * @globalvars none 121 * @globalvars none
108 * @exception none 122 * @exception none
@@ -116,7 +130,7 @@ class CDatT
116 /** 130 /**
117 * @method operator+= 131 * @method operator+=
118 * @brief implementation of operator += 132 * @brief implementation of operator +=
119 * @param reference to CDatT 133 * @param x reference to CDatT
120 * @return refecence to CDatT 134 * @return refecence to CDatT
121 * @globalvars none 135 * @globalvars none
122 * @exception none 136 * @exception none
@@ -131,7 +145,7 @@ class CDatT
131 /** 145 /**
132 * @method operator-= 146 * @method operator-=
133 * @brief implementation of operator -= 147 * @brief implementation of operator -=
134 * @param reference to CDatT 148 * @param x reference to CDatT
135 * @return refecence to CDatT 149 * @return refecence to CDatT
136 * @globalvars none 150 * @globalvars none
137 * @exception none 151 * @exception none
@@ -146,7 +160,7 @@ class CDatT
146 /** 160 /**
147 * @method operator*= 161 * @method operator*=
148 * @brief implementation of operator *= 162 * @brief implementation of operator *=
149 * @param reference to CDatT 163 * @param x reference to CDatT
150 * @return refecence to CDatT 164 * @return refecence to CDatT
151 * @globalvars none 165 * @globalvars none
152 * @exception none 166 * @exception none
@@ -161,7 +175,7 @@ class CDatT
161 /** 175 /**
162 * @method operator/= 176 * @method operator/=
163 * @brief implementation of operator /= 177 * @brief implementation of operator /=
164 * @param reference to CDatT 178 * @param x reference to CDatT
165 * @return refecence to CDatT 179 * @return refecence to CDatT
166 * @globalvars none 180 * @globalvars none
167 * @exception none 181 * @exception none
@@ -176,7 +190,7 @@ class CDatT
176 /** 190 /**
177 * @method operator%= 191 * @method operator%=
178 * @brief implementation of operator %= 192 * @brief implementation of operator %=
179 * @param reference to CDatT 193 * @param x reference to CDatT
180 * @return refecence to CDatT 194 * @return refecence to CDatT
181 * @globalvars none 195 * @globalvars none
182 * @exception none 196 * @exception none
@@ -191,7 +205,7 @@ class CDatT
191 /** 205 /**
192 * @method operator|= 206 * @method operator|=
193 * @brief implementation of operator |= 207 * @brief implementation of operator |=
194 * @param reference to CDatT 208 * @param x reference to CDatT
195 * @return refecence to CDatT 209 * @return refecence to CDatT
196 * @globalvars none 210 * @globalvars none
197 * @exception none 211 * @exception none
@@ -206,7 +220,7 @@ class CDatT
206 /** 220 /**
207 * @method operator&= 221 * @method operator&=
208 * @brief implementation of operator &= 222 * @brief implementation of operator &=
209 * @param reference to CDatT 223 * @param x reference to CDatT
210 * @return refecence to CDatT 224 * @return refecence to CDatT
211 * @globalvars none 225 * @globalvars none
212 * @exception none 226 * @exception none
@@ -221,7 +235,7 @@ class CDatT
221 /** 235 /**
222 * @method operator^= 236 * @method operator^=
223 * @brief implementation of operator ^= 237 * @brief implementation of operator ^=
224 * @param reference to CDatT 238 * @param x reference to CDatT
225 * @return refecence to CDatT 239 * @return refecence to CDatT
226 * @globalvars none 240 * @globalvars none
227 * @exception none 241 * @exception none
@@ -295,27 +309,16 @@ class CDatT
295 return stream; 309 return stream;
296 } 310 }
297 311
298 /**
299 * @method getTypeValue
300 * @brief returns value as type T
301 * @param -
302 * @return m_value
303 * @globalvars none
304 * @exception none
305 * @conditions none
306 */
307 T& getTypeValue()
308 {
309 return m_value;
310 }
311
312 private: 312 private:
313 /* members */ 313 /* members */
314 T m_value; 314 T m_value;
315}; 315};
316 316
317 317/**
318/** define CDat */ 318 * @class CDat
319 *
320 * Datatype for CCPU and CMem
321 */
319typedef CDatT<int> CDat; 322typedef CDatT<int> CDat;
320 323
321#endif 324#endif