diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 15:21:26 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 15:21:26 +0100 |
commit | cab353cbb21c142ac1e227d42338fa587e1a7f24 (patch) | |
tree | 618c50ba58cc3186b3b82a3df2561063d4aaee85 /Source/Library/Common/IStream.proto.h | |
parent | 07a73aea7acbf0d9f9182bc3557583aa17af0000 (diff) | |
download | Melon-cab353cbb21c142ac1e227d42338fa587e1a7f24.tar.gz Melon-cab353cbb21c142ac1e227d42338fa587e1a7f24.zip |
Worked on IStream. Seems to work
Diffstat (limited to 'Source/Library/Common/IStream.proto.h')
-rw-r--r-- | Source/Library/Common/IStream.proto.h | 29 |
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 |