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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*
Copyright 1990-2008 Light Infocon Tecnologia S/A
Este arquivo é parte do programa LightBase - Banco de Dados Textual Documental
O LightBase é um software livre; você pode redistribui-lo e/ou modifica-lo dentro
dos termos da Licença Pública Geral GNU como publicada pela Fundação do Software
Livre (FSF); na versão 2 da Licença.
Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO
EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral GNU versao 2, sob o
título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do
Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* class ALMemory : public ALStorage
*
* DESCRIPTION
*
* Class ALMemory is an ALStorage class that stores its data in memory
* buffers. Under real mode MS-DOS, buffers are limited to 64Kbytes.
* Under Windows, they can get a lot bigger. There are slight
* differences in operations between the the Windows and MS-DOS
* versions, so you will see some #ifdefs here and there.
*
* You can use ALMemory to work with a buffer of your own, or you
* can ask the class to allocate the memory for you. You can
* also change the ownership of the buffer in midstream, allowing
* you to take control of a buffer that the class has generated.
*
* DATA MEMBERS
*
* mfUserOwnsBuffer : If this flag is set, it indicates that the user
* owns the buffer, not the class. This means
* the class can't grow the buffer if it runs out
* of space, and it can't delete it in the
* ALMemory destructor.
*
* mhUserMemoryHandle : Under Windows, this member contains the handle
* of the Windows memory block that has been
* allocated
*
* muUserBufferSize : The actual size of the buffer, whether it is
* owned by the user or not. This is a size_t
* member under real mode DOS, and a long under
* Windows.
*
* mpcUserBuffer : A pointer to the buffer the class is presently
* using. The name User Buffer was probably a bad
* choice, because this is the pointer we use
* regardless of whether or not the user owns the
* buffer.
*
* MEMBER FUNCTIONS
*
* ALMemory() : The constructor, slightly different between DOS
* and Windows.
* ~ALMemory() : The virtual destructor.
* operator new() : Memory allocation operator, only used when the
* library is in a DLL. Note that this isn't the
* operator used to allocate the buffer, just the
* one to allocate a class object.
* Open() : Open the storage object for reading and writing.
* Create() : Create a new buffer to write to.
* Close() : Close the existing memory object.
* LoadBuffer() : Load a new block from the memory object into
* the I/O buffer.
* FlushBuffer() : Flush the contents of the I/O buffer, sending
* the contents into the memory object.
* Seek() : Seek to a new location in the memory object.
* Rename() : Give the object a new name. Names are pretty
* irrelevant for memory objects, feel free to use
* whatever you want here.
* UnRename() : Restore the old name.
* Delete() : Delete the memory object. It is gone forever.
* RenameToBackup() : Give the memory object an arbitrary new name.
* GrowUserBuffer() : A private function used to give us more space
* when the memory object is owner of the buffer.
*
* REVISION HISTORY
*
* May 26, 1994 1.0A : First release
*
*/
class AL_CLASS_TYPE ALMemory : public ALStorage ;
/* #if defined( __cplusplus ) */
/* #ifndef _MEMSTORE_H */