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
/*
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 ALWildCardExpander
*
* DESCRIPTION
*
* This class is used to expand wild card specifications on a DOS
* or NT file system. Note that you can do exciting things with this, like
* traversing through subdirectories, and separate various specs using
* commas or white space.
*
* DATA MEMBERS
*
* mState : The current state of the expander. This is a value
* from ALExpander state that lets use keep track
* of where we are between calls to the expander.
*
* mpNextExpander : If we are traversing subdirectories, we will
* open a new expander for each subdirectory. This
* is a pointer to any subdirectory we might already
* have open for a search in progress.
*
* mInputLine : The list of wildcard filespecs passed in as an
* argument. This gets whittled away, and will be
* smaller and smaller as all the names are parsed out.
*
* mFullWildName : The current wild card file spec that is being
* expanded.
*
* mWildNameOnly : The current wild name that is being expanded,
* stripped of its drive and path information.
*
* mWildPathOnly : The current drive and path being expanded, stripped
* of its filename and extension.
*
* mResultFileName : The file name that is returned to the calling
* program.
*
* mpDirectory : Under UNIX, directories are scanned using the
* the opendir()/readdir() commands. The value
* returned by opendir() gets stored here so it can
* be reused in subsequent calls.
*
* mFindFileData : Under Win32s, this holds data about the file we
* found.
*
* mFindFileHandle : Under Win32s, this is a handle used during the
* wildcard expansion.
*
* mpFfblk : Under MS-DOS, this structure holds the state of
* the wildcard expansion in progress.
*
* miTraverseFlag : This flag indicates whether the search should traverse
* traverse through subdirectories or just search
* in the current directory.
*
* mCase : Indicates whether file names should always be forced
* to upper case, forced to lower case, or left mixed.
*
* MEMBER FUNCTIONS
*
* ALWildCardExpander() : Constructor, everything we need to know to
* perform the search is defined here.
* ~ALWildCardExpander() : Destructor.
* operator new() : Memory allocation function, used when the
* library is in a DLL.
* GetNextWildName() : Protected routine to get the next wild name
* from the input line.
* GetNextFile() : The function to get the next expanded file
* name. It keeps chunking out names until
* the search is complete.
*
* REVISION HISTORY
*
* May 26, 1994 1.0A : First release
*
*/
class AL_CLASS_TYPE ALWildCardExpander ||
void AL_DLL_FAR * AL_PROTO operator ;
/*
* Disable copy constructor and assignment operator
*/
protected :
ALWildCardExpander AL_DLL_FAR & AL_PROTO operator=;
AL_PROTO ;
/*
* Member functions
*/
protected :
int AL_PROTO ;
public :
char AL_DLL_FAR * AL_PROTO ;
/*
* Data members
*/
protected :
ALExpanderState mState;
ALWildCardExpander AL_DLL_FAR *mpNextExpander;
ALName mInputLine;
ALName mFullWildName;
ALName mWildNameOnly;
ALName mWildPathOnly;
ALName mResultFileName;
DIR *mpDirectory;
WIN32_FIND_DATA mFindFileData;
HANDLE mFindFileHandle;
struct find_t AL_DLL_FAR *mpFfblk;
int miTraverseFlag;
public :
const ALCase mCase;
;
};
/* #if defined( __cplusplus ) */
/* #ifdef _WINMON_H */