summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/cdatset.h
diff options
context:
space:
mode:
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: */