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
/*
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 ALStatus
*
* DESCRIPTION
*
* ALStatus is a utility class that is used as a data member of several
* other classes. It provides an integer member that keeps track
* of the current status of the object, with AL_SUCCESS meaning
* everything is okay, and a code < 0 meaning the object has
* experienced an error.
*
* The object also contains a character pointer to a detailed error
* message. Usually when an error occurs in ArchiveLib, the
* routine that detects the error generates a detailed message that
* can be stored to provide additional information.
*
* Error states in ArchiveLib are "sticky". Once an object is flagged
* as being in error, it will stay that way until the programmer
* resets it, which means it will fail most ordinary operations.
* When you want to clear the error statue of an object, call
* SetError() with AL_SUCCESS as the error code.
*
* DATA MEMBERS
*
* miStatus : The current status of the object, with AL_SUCCESS
* being a good value. You can get at this easily
* by casting ALStatus to type int.
*
* miStatusDetailLength : This member keeps track of the length of the
* status detail. The status detail buffer
* is dynamically allocated when it is needed.
* Keeping this member is really kind of dumb, I
* need to just allocate as much space as necessary
* when the error detail is created. Look for this
* data member to go away in an upcoming release.
*
* mszStatusDetail : The detailed error message. It will be set to
* 0 until a message is generated, when it
* is dynamically allocated. Cleaned up if necessary
* in the destructor.
*
* MEMBER FUNCTIONS
*
* ALStatus() : The default and only constructor.
* ~ALStatus() : The destructor, has to clean up detail string.
* operator new() : Memory allocation operator, allocates space
* for the class object when the library is in
* the DLL.
* SetError() : Sets the error code to a value, and writes
* new data into the detail string.
* GetStatusCode() : Returns the current integer status code,
* just like operator int().
* GetStatusString() : Returns the short string translation.
* GetStatusDetail() : Returns the detailed status message, created
* at the point the error took place.
* operator int() : The casting operator, used all over ArchiveLib
* when testing a status for a value < AL_SUCCESS.
* operator=() : Assignment operator, easy here.
*
* REVISION HISTORY
*
* May 26, 1994 1.0A : First release
*
*/
class AL_CLASS_TYPE ALStatus ;
inline std::ostream& operator <<
/* #if defined( __cplusplus ) */
/* #ifdef _STATUS_H */