summaryrefslogtreecommitdiff
path: root/Source/Library/Common/IStream.proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Library/Common/IStream.proto.h')
-rw-r--r--Source/Library/Common/IStream.proto.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Library/Common/IStream.proto.h b/Source/Library/Common/IStream.proto.h
new file mode 100644
index 0000000..f689a22
--- /dev/null
+++ b/Source/Library/Common/IStream.proto.h
@@ -0,0 +1,29 @@
+#ifndef DEF_ISTREAM_PROTO_h
+#define DEF_ISTREAM_PROTO_h
+
+#include <String.class.h>
+#include <SimpleList.class.h>
+#include <Mutex.class.h>
+
+class IStream : private Mutex {
+ private:
+ SimpleList<String> *m_buffer;
+ int m_ptr;
+ void operator =(IStream& other);
+
+ bool populate();
+
+ protected:
+ virtual String read() = 0;
+
+ public:
+ IStream();
+ IStream(const IStream& other);
+ virtual ~IStream();
+
+ WChar getChar();
+ String get(WChar delimiter = "\n");
+ String getWord() { return get(" "); }
+};
+
+#endif