blob: 814b53986018d920f7b77104df759b3c3ae14929 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
|