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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/*
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 ALName
*
* DESCRIPTION
*
* Object names are mostly used for names of storage objects.
* There are enough things that I do with these guys to justify
* a class of their own. Having all the object name functions in their
* own class also cuts back on the number of functions in ALStorage,
* which is already cluttered.
*
* Besides serving as the mName member in ALStorage, this class is
* also pressed into service in ALWildCardExpander, where it is very
* handy.
*
* DATA MEMBERS
*
* mszName : A pointer to the name associated with this object.
* This pointer can be a null pointer. The object is
* responsible for deleting this guy in the ALName
* destructor, along with the next member, mszOldName.
*
* mszOldName : A pointer to the last name associated with this
* object. When you assign a new name to one of these
* objects, the old name gets stored here. This makes
* it easy to revert to the old name in case of trouble.
*
* mCase : One of AL_UPPER, AL_LOWER, or AL_MIXED. If the value
* is AL_UPPER or AL_LOWER, the name is forced to all
* upper or lower case whenever it is assigned to the
* object.
*
* MEMBER FUNCTIONS
*
* ALName(const ALName &) : The copy constructor.
* ALName(const char *) : Constructor that initializes with a char *.
* operator=(const ALName&) : Assignment operator.
* operator=(const char *) : Assignment operator for char *.
* ~ALName() : Destructor, has to clean up dynamic storage.
* operator new() : Memory allocation operatory, only used
* when the library is inside the DLL. Be
* aware that this operator allocates space for
* the object itself, not the strings that it
* will contain.
* Strcpy() : A protected member function, copies and
* converts to the appropriate case if necessary.
* GetName() : Returns a pointer to the name string, might
* be 0.
* GetOldName() : Returns a pointer to the previous name
* string, might be 0.
* GetSafeName() : Returns a pointer to the name string, but
* is guaranteed not to return 0.
* GetSafeOldName() : Returns a pointer to the old name string, but
* is guaranteed not to return 0.
* ChangeExtension() : Change a filename extension to a new one.
* ChangeTrailingChar() : Change the trailing character in the filename.
* StripFileName() : Remove the filename, leaving the path and drive.
* StripPath() : Remove path and drive, leaving the filename.
* WildCardMatch() : Test for a match against a regular expression.
* operator const char *() : Return a char *.
* operator+() : Append a string to this string.
*
* REVISION HISTORY
*
* May 26, 1994 1.0A : First release
*
*/
/*
* Microsoft won't let me create a cast operator for char _far *.
* But they will let me cast to this typedef. Ugly, but it works.
*/
typedef char AL_DLL_FAR * STRINGF;
class AL_CLASS_TYPE ALName ;
/*
* std::ostream& operator << ( std::ostream& stream, const ALName &object )
*
* ARGUMENTS:
*
* stream : An I/O stream.
*
* object : A reference to an ALName object.
*
* RETURNS
*
* A reference to the stream provided as an operator.
*
* DESCRIPTION
*
* This stream operator makes it easy to send ALName objects
* to an output stream. I need to define this function as inline,
* because it is tough to use far references to ostreams from a DLL.
* There are other problems associated with using this function
* in a DLL, and I don't understand them all.
*
* REVISION HISTORY
*
* May 26, 1994 1.0A : First release
*
*/
inline std::ostream& operator <<
/* #if defined( __cplusplus ) */
/* #ifndef _OBJNAME_H */