forked from dolphinsmalltalk/DolphinVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
STStream.h
68 lines (49 loc) · 1.55 KB
/
STStream.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/******************************************************************************
File: STStream.h
Description:
VM representation of Smalltalk Stream classes. VM requires knowledge of
these in order to implement the stream primitives.
N.B. The classes here defined are well known to the VM, and must not
be modified in the image. Note also that these classes may also have
a representation in the assembler modules (so see istasm.inc)
******************************************************************************/
#ifndef _IST_STSTREAM_H_
#define _IST_STSTREAM_H_
#include "STObject.h"
class Stream // : public Object
{
public:
enum { FixedSize = 0 };
};
class PositionableStream : public Stream
{
public:
OTE* m_array;
Oop m_index;
Oop m_readLimit;
enum { StreamArrayIndex= Stream::FixedSize, StreamIndexIndex , StreamReadLimitIndex, FixedSize };
};
typedef TOTE<PositionableStream> PosStreamOTE;
class WriteStream : public PositionableStream
{
public:
Oop m_writeLimit;
enum { StreamWriteLimitIndex=PositionableStream::FixedSize, FixedSize };
};
typedef TOTE<WriteStream> WriteStreamOTE;
#ifdef _AFX
class ReadWriteStream : public WriteStream
{
public:
};
class FileStream : public ReadWriteStream
{
public:
Oop m_file;
Oop m_flags; // In the old FileStream this is the name instance var.
Oop m_pageBase; // not present in old FileStream.
Oop m_logicalFileSize; // not present in old FileStream.
enum { FileIndex=ReadWriteStream::FixedSize, FlagsIndex, PageBaseIndex, LogicalFileSizeIndex, FixedSize };
};
#endif
#endif // EOF