summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/cdatset.h
diff options
context:
space:
mode:
authorGünther Neuwirth <e0626638@student.tuwien.ac.at>2009-05-27 16:43:43 +0200
committerGünther Neuwirth <e0626638@student.tuwien.ac.at>2009-05-27 16:43:43 +0200
commit064eaaed391835d0e0d057466f6f552e43e79bd8 (patch)
tree9dd40d61761624f10a83f001425bc35a1dfdfd00 /ue4/mycpu/cdatset.h
parent26a97259f5a7b066cff2927e88c867fac2aaad87 (diff)
downloadooprog-064eaaed391835d0e0d057466f6f552e43e79bd8.tar.gz
ooprog-064eaaed391835d0e0d057466f6f552e43e79bd8.tar.bz2
ooprog-064eaaed391835d0e0d057466f6f552e43e79bd8.zip
add cdatset
Diffstat (limited to 'ue4/mycpu/cdatset.h')
-rw-r--r--ue4/mycpu/cdatset.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/ue4/mycpu/cdatset.h b/ue4/mycpu/cdatset.h
new file mode 100644
index 0000000..03e71f4
--- /dev/null
+++ b/ue4/mycpu/cdatset.h
@@ -0,0 +1,49 @@
1/**
2 * @module cdat
3 * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348)
4 * @brief Datatype template and datatype definition for CCPU and CMem
5 * @date 26.05.2009
6 */
7
8#ifndef CDATSET_H
9#define CDATSET_H 1
10
11#include <boost/operators.hpp>
12#include <iostream>
13
14/**
15 * @class CDat
16 *
17 * Datatype template for CCPU and CMem.
18 */
19template <class T>
20class CDatSet
21 : public CDat<T>
22{
23 public:
24 /**
25 * @method operator>>
26 * @brief Shift/read operator for inputstream
27 * @param stream reference to inputstream
28 * @param cdat reference to object which will be read from stream
29 * @return reference to inputstream
30 * @globalvars none
31 * @exception none
32 * @conditions none
33 */
34 friend std::istream& operator>>(std::istream & stream, CDatSet& cdat)
35 {
36 std::string s;
37 stream >> s;
38 cdat.m_value = s.size();
39 return stream;
40 }
41
42 private:
43 /* members */
44 T m_value;
45};
46
47#endif
48
49/* vim: set et sw=2 ts=2: */