summaryrefslogtreecommitdiff
path: root/Source/Library/Common/StringStream.class.h
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-12-20 20:03:22 +0100
committerAlexis211 <alexis211@gmail.com>2009-12-20 20:03:22 +0100
commit09353da6e91a0968ae24d4b4d97ed434520e6217 (patch)
tree016694d12e9dfebc773cef629eb56556d0024b22 /Source/Library/Common/StringStream.class.h
parent247070cc7e5ae117fd0d1b551fafdf5c13f0dd6b (diff)
parent18454dc8be12827a84c2ebc58aa5d31bb44e1e6a (diff)
downloadMelon-09353da6e91a0968ae24d4b4d97ed434520e6217.tar.gz
Melon-09353da6e91a0968ae24d4b4d97ed434520e6217.zip
Merge branch 'framework'
Conflicts: .gitignore
Diffstat (limited to 'Source/Library/Common/StringStream.class.h')
-rw-r--r--Source/Library/Common/StringStream.class.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/Library/Common/StringStream.class.h b/Source/Library/Common/StringStream.class.h
new file mode 100644
index 0000000..814b539
--- /dev/null
+++ b/Source/Library/Common/StringStream.class.h
@@ -0,0 +1,35 @@
+#ifndef DEF_STRINGSTREAM_CLASS_H
+#define DEF_STRINGSTREAM_CLASS_H
+
+#include <IStream.proto.h>
+#include <OStream.proto.h>
+
+class StringIStream : public IStream {
+ private:
+ SimpleList<String> *m_elements;
+
+ String read();
+
+ public:
+ StringIStream(const String &e);
+ StringIStream();
+ ~StringIStream();
+
+ void append(const String &e);
+};
+
+class StringOStream : public OStream {
+ private:
+ String m_str;
+
+ void write(const String& s) { m_str += s; }
+
+ public:
+
+ const String &str() const { return m_str; }
+ void clear() { m_str = ""; }
+};
+
+
+#endif
+