Mercurial > hg > octave-nkf
annotate src/load-path.h @ 8586:31ab3b83bc8a
savepath: Respect cmd-line and env paths.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 24 Jan 2009 14:53:44 -0500 |
parents | c91b59532f32 |
children | eb63fbe60fab |
rev | line source |
---|---|
5832 | 1 /* |
2 | |
7017 | 3 Copyright (C) 2006, 2007 John W. Eaton |
5832 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
5832 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
5832 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_load_path_h) | |
24 #define octave_load_path_h 1 | |
25 | |
26 #include <iostream> | |
27 #include <list> | |
28 #include <map> | |
29 #include <string> | |
30 | |
5835 | 31 #include "pathsearch.h" |
5832 | 32 #include "str-vec.h" |
33 | |
34 class | |
6241 | 35 OCTINTERP_API |
5832 | 36 load_path |
37 { | |
38 protected: | |
39 | |
7336 | 40 load_path (void) : dir_info_list (), fcn_map (), method_map () { } |
5832 | 41 |
42 public: | |
43 | |
7336 | 44 typedef void (*hook_fcn_ptr) (const std::string& dir); |
5832 | 45 |
46 ~load_path (void) { } | |
47 | |
6365 | 48 static void initialize (bool set_initial_path = false) |
5832 | 49 { |
50 if (instance_ok ()) | |
6365 | 51 instance->do_initialize (set_initial_path); |
5832 | 52 } |
53 | |
54 static void clear (void) | |
55 { | |
56 if (instance_ok ()) | |
57 instance->do_clear (); | |
58 } | |
59 | |
5867 | 60 static void set (const std::string& p, bool warn = false) |
5832 | 61 { |
62 if (instance_ok ()) | |
5867 | 63 instance->do_set (p, warn); |
5832 | 64 } |
65 | |
5867 | 66 static void append (const std::string& dir, bool warn = false) |
5832 | 67 { |
68 if (instance_ok ()) | |
5867 | 69 instance->do_append (dir, warn); |
5832 | 70 } |
71 | |
5867 | 72 static void prepend (const std::string& dir, bool warn = false) |
5832 | 73 { |
74 if (instance_ok ()) | |
5867 | 75 instance->do_prepend (dir, warn); |
5832 | 76 } |
77 | |
78 static bool remove (const std::string& dir) | |
79 { | |
80 return instance_ok () ? instance->do_remove (dir) : false; | |
81 } | |
82 | |
83 static void update (void) | |
84 { | |
85 if (instance_ok ()) | |
86 instance->do_update (); | |
87 } | |
88 | |
7336 | 89 static std::string find_method (const std::string& class_name, |
90 const std::string& meth, | |
91 std::string& dir_name) | |
92 { | |
93 return instance_ok () | |
94 ? instance->do_find_method (class_name, meth, dir_name) : std::string (); | |
95 } | |
96 | |
97 static std::string find_method (const std::string& class_name, | |
98 const std::string& meth) | |
99 { | |
100 std::string dir_name; | |
101 return find_method (class_name, meth, dir_name); | |
102 } | |
103 | |
104 static std::list<std::string> methods (const std::string& class_name) | |
105 { | |
106 return instance_ok () | |
107 ? instance->do_methods (class_name) : std::list<std::string> (); | |
108 } | |
109 | |
110 static std::string find_fcn (const std::string& fcn, std::string& dir_name) | |
111 { | |
112 return instance_ok () | |
113 ? instance->do_find_fcn (fcn, dir_name) : std::string (); | |
114 } | |
115 | |
5832 | 116 static std::string find_fcn (const std::string& fcn) |
117 { | |
7336 | 118 std::string dir_name; |
119 return find_fcn (fcn, dir_name); | |
120 } | |
121 | |
122 static std::string find_private_fcn (const std::string& dir, | |
123 const std::string& fcn) | |
124 { | |
5832 | 125 return instance_ok () |
7336 | 126 ? instance->do_find_private_fcn (dir, fcn) : std::string (); |
5832 | 127 } |
128 | |
129 static std::string find_fcn_file (const std::string& fcn) | |
130 { | |
7336 | 131 std::string dir_name; |
132 | |
5832 | 133 return instance_ok () ? |
7336 | 134 instance->do_find_fcn (fcn, dir_name, M_FILE) : std::string (); |
5832 | 135 } |
136 | |
137 static std::string find_oct_file (const std::string& fcn) | |
138 { | |
7336 | 139 std::string dir_name; |
140 | |
5832 | 141 return instance_ok () ? |
7336 | 142 instance->do_find_fcn (fcn, dir_name, OCT_FILE) : std::string (); |
5832 | 143 } |
144 | |
5864 | 145 static std::string find_mex_file (const std::string& fcn) |
146 { | |
7336 | 147 std::string dir_name; |
148 | |
5864 | 149 return instance_ok () ? |
7336 | 150 instance->do_find_fcn (fcn, dir_name, MEX_FILE) : std::string (); |
5864 | 151 } |
152 | |
5832 | 153 static std::string find_file (const std::string& file) |
154 { | |
155 return instance_ok () | |
156 ? instance->do_find_file (file) : std::string (); | |
157 } | |
158 | |
8041
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
159 static std::string find_dir (const std::string& dir) |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
160 { |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
161 return instance_ok () |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
162 ? instance->do_find_dir (dir) : std::string (); |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
163 } |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
164 |
5832 | 165 static std::string find_first_of (const string_vector& files) |
166 { | |
167 return instance_ok () ? | |
168 instance->do_find_first_of (files) : std::string (); | |
169 } | |
170 | |
171 static string_vector find_all_first_of (const string_vector& files) | |
172 { | |
173 return instance_ok () ? | |
174 instance->do_find_all_first_of (files) : string_vector (); | |
175 } | |
176 | |
177 static string_vector dirs (void) | |
178 { | |
179 return instance_ok () ? instance->do_dirs () : string_vector (); | |
180 } | |
181 | |
182 static std::list<std::string> dir_list (void) | |
183 { | |
184 return instance_ok () | |
185 ? instance->do_dir_list () : std::list<std::string> (); | |
186 } | |
187 | |
188 static string_vector files (const std::string& dir) | |
189 { | |
190 return instance_ok () ? instance->do_files (dir) : string_vector (); | |
191 } | |
192 | |
193 static string_vector fcn_names (void) | |
194 { | |
195 return instance_ok () ? instance->do_fcn_names () : string_vector (); | |
196 } | |
197 | |
198 static std::string path (void) | |
199 { | |
200 return instance_ok () ? instance->do_path () : std::string (); | |
201 } | |
202 | |
203 static void display (std::ostream& os) | |
204 { | |
205 if (instance_ok ()) | |
206 instance->do_display (os); | |
207 } | |
208 | |
7336 | 209 static void set_add_hook (hook_fcn_ptr f) { add_hook = f; } |
5832 | 210 |
7336 | 211 static void set_remove_hook (hook_fcn_ptr f) { remove_hook = f; } |
5832 | 212 |
213 static void set_command_line_path (const std::string& p) | |
214 { | |
5835 | 215 if (command_line_path.empty ()) |
216 command_line_path = p; | |
217 else | |
8008
4d13a7a2f6ab
dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents:
7971
diff
changeset
|
218 command_line_path += dir_path::path_sep_str () + p; |
5832 | 219 } |
220 | |
8586
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
221 static std::string get_command_line_path (void) |
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
222 { |
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
223 return instance_ok () ? instance->do_get_command_line_path () : std::string (); |
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
224 } |
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
225 |
6626 | 226 static std::string system_path (void) |
227 { | |
6630 | 228 return instance_ok () ? instance->do_system_path () : std::string (); |
6626 | 229 } |
230 | |
5832 | 231 private: |
232 | |
233 static const int M_FILE = 1; | |
234 static const int OCT_FILE = 2; | |
5864 | 235 static const int MEX_FILE = 4; |
5832 | 236 |
237 class dir_info | |
238 { | |
239 public: | |
240 | |
7336 | 241 // <FCN_NAME, TYPE> |
242 typedef std::map<std::string, int> fcn_file_map_type; | |
243 | |
244 typedef fcn_file_map_type::const_iterator const_fcn_file_map_iterator; | |
245 typedef fcn_file_map_type::iterator fcn_file_map_iterator; | |
246 | |
7971
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
247 struct class_info |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
248 { |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
249 fcn_file_map_type method_file_map; |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
250 fcn_file_map_type private_file_map; |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
251 }; |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
252 |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
253 // <CLASS_NAME, CLASS_INFO> |
dd5cc5016487
handle private functions in class directories
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
254 typedef std::map<std::string, class_info> method_file_map_type; |
7336 | 255 |
256 typedef method_file_map_type::const_iterator const_method_file_map_iterator; | |
257 typedef method_file_map_type::iterator method_file_map_iterator; | |
258 | |
8329
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
259 // This default constructor is only provided so we can create a |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
260 // std::map of dir_info objects. You should not use this |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
261 // constructor for any other purpose. |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
262 dir_info (void) { } |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
263 |
5832 | 264 dir_info (const std::string& d) : dir_name (d) { initialize (); } |
265 | |
266 dir_info (const dir_info& di) | |
8329
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
267 : dir_name (di.dir_name), abs_dir_name (di.abs_dir_name), |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
268 is_relative (di.is_relative), |
5832 | 269 dir_mtime (di.dir_mtime), all_files (di.all_files), |
270 fcn_files (di.fcn_files), | |
7336 | 271 private_file_map (di.private_file_map), |
272 method_file_map (di.method_file_map) { } | |
5832 | 273 |
274 ~dir_info (void) { } | |
275 | |
276 dir_info& operator = (const dir_info& di) | |
277 { | |
278 if (&di != this) | |
279 { | |
280 dir_name = di.dir_name; | |
8329
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
281 abs_dir_name = di.abs_dir_name; |
5832 | 282 is_relative = di.is_relative; |
283 dir_mtime = di.dir_mtime; | |
284 all_files = di.all_files; | |
285 fcn_files = di.fcn_files; | |
7336 | 286 private_file_map = di.private_file_map; |
287 method_file_map = di.method_file_map; | |
5832 | 288 } |
289 | |
290 return *this; | |
291 } | |
292 | |
293 void update (void); | |
294 | |
295 std::string dir_name; | |
8329
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
296 std::string abs_dir_name; |
5832 | 297 bool is_relative; |
298 octave_time dir_mtime; | |
299 string_vector all_files; | |
300 string_vector fcn_files; | |
7336 | 301 fcn_file_map_type private_file_map; |
302 method_file_map_type method_file_map; | |
5832 | 303 |
304 private: | |
305 | |
306 void initialize (void); | |
307 | |
7336 | 308 void get_file_list (const std::string& d); |
309 | |
310 void get_private_file_map (const std::string& d); | |
5832 | 311 |
7336 | 312 void get_method_file_map (const std::string& d, |
313 const std::string& class_name); | |
314 | |
315 friend fcn_file_map_type get_fcn_files (const std::string& d); | |
5832 | 316 }; |
317 | |
318 class file_info | |
319 { | |
320 public: | |
321 | |
322 file_info (const std::string& d, int t) : dir_name (d), types (t) { } | |
323 | |
324 file_info (const file_info& fi) | |
325 : dir_name (fi.dir_name), types (fi.types) { } | |
326 | |
327 ~file_info (void) { } | |
328 | |
329 file_info& operator = (const file_info& fi) | |
330 { | |
331 if (&fi != this) | |
332 { | |
333 dir_name = fi.dir_name; | |
334 types = fi.types; | |
335 } | |
336 | |
337 return *this; | |
338 } | |
339 | |
340 std::string dir_name; | |
341 int types; | |
342 }; | |
343 | |
344 // We maintain two ways of looking at the same information. | |
345 // | |
346 // First, a list of directories and the set of "public" files and | |
347 // private files (those found in the special "private" subdirectory) | |
348 // in each directory. | |
349 // | |
350 // Second, a map from file names (the union of all "public" files for all | |
7336 | 351 // directories, but without filename extensions) to a list of |
5832 | 352 // corresponding information (directory name and file types). This |
353 // way, we can quickly find shadowed file names and look up all | |
354 // overloaded functions (in the "@" directories used to implement | |
355 // classes). | |
356 | |
7336 | 357 typedef std::list<dir_info> dir_info_list_type; |
358 | |
359 typedef dir_info_list_type::const_iterator const_dir_info_list_iterator; | |
360 typedef dir_info_list_type::iterator dir_info_list_iterator; | |
361 | |
8329
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
362 typedef std::map<std::string, dir_info> abs_dir_cache_type; |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
363 |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
364 typedef abs_dir_cache_type::const_iterator const_abs_dir_cache_iterator; |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
365 typedef abs_dir_cache_type::iterator abs_dir_cache_iterator; |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
366 |
7336 | 367 typedef std::list<file_info> file_info_list_type; |
368 | |
369 typedef file_info_list_type::const_iterator const_file_info_list_iterator; | |
370 typedef file_info_list_type::iterator file_info_list_iterator; | |
371 | |
372 // <FCN_NAME, FILE_INFO_LIST> | |
373 typedef std::map<std::string, file_info_list_type> fcn_map_type; | |
374 | |
375 typedef fcn_map_type::const_iterator const_fcn_map_iterator; | |
376 typedef fcn_map_type::iterator fcn_map_iterator; | |
5832 | 377 |
7336 | 378 // <DIR_NAME, <FCN_NAME, TYPE>> |
379 typedef std::map<std::string, dir_info::fcn_file_map_type> private_fcn_map_type; | |
380 | |
381 typedef private_fcn_map_type::const_iterator const_private_fcn_map_iterator; | |
382 typedef private_fcn_map_type::iterator private_fcn_map_iterator; | |
383 | |
384 // <CLASS_NAME, <FCN_NAME, FILE_INFO_LIST>> | |
385 typedef std::map<std::string, fcn_map_type> method_map_type; | |
386 | |
387 typedef method_map_type::const_iterator const_method_map_iterator; | |
388 typedef method_map_type::iterator method_map_iterator; | |
389 | |
390 mutable dir_info_list_type dir_info_list; | |
391 | |
392 mutable fcn_map_type fcn_map; | |
393 | |
394 mutable private_fcn_map_type private_fcn_map; | |
395 | |
396 mutable method_map_type method_map; | |
5832 | 397 |
398 static load_path *instance; | |
399 | |
7336 | 400 static hook_fcn_ptr add_hook; |
5832 | 401 |
7336 | 402 static hook_fcn_ptr remove_hook; |
5832 | 403 |
404 static std::string command_line_path; | |
405 | |
6626 | 406 static std::string sys_path; |
407 | |
8329
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
408 static abs_dir_cache_type abs_dir_cache; |
c91b59532f32
load-path.cc (load_path::dir_info::update): smarter handling of relative names
John W. Eaton <jwe@octave.org>
parents:
8041
diff
changeset
|
409 |
5832 | 410 static bool instance_ok (void); |
411 | |
412 const_dir_info_list_iterator find_dir_info (const std::string& dir) const; | |
413 dir_info_list_iterator find_dir_info (const std::string& dir); | |
414 | |
415 bool contains (const std::string& dir) const; | |
416 | |
7336 | 417 void move_fcn_map (const std::string& dir, |
418 const string_vector& fcn_files, bool at_end); | |
419 | |
420 void move_method_map (const std::string& dir, bool at_end); | |
421 | |
5832 | 422 void move (std::list<dir_info>::iterator i, bool at_end); |
423 | |
6365 | 424 void do_initialize (bool set_initial_path); |
5832 | 425 |
426 void do_clear (void); | |
427 | |
5867 | 428 void do_set (const std::string& p, bool warn); |
429 | |
430 void do_append (const std::string& dir, bool warn); | |
5832 | 431 |
5867 | 432 void do_prepend (const std::string& dir, bool warn); |
5832 | 433 |
5867 | 434 void do_add (const std::string& dir, bool at_end, bool warn); |
5832 | 435 |
7336 | 436 void remove_fcn_map (const std::string& dir, const string_vector& fcn_files); |
437 | |
438 void remove_private_fcn_map (const std::string& dir); | |
439 | |
440 void remove_method_map (const std::string& dir); | |
441 | |
5832 | 442 bool do_remove (const std::string& dir); |
443 | |
444 void do_update (void) const; | |
445 | |
7336 | 446 static bool |
447 check_file_type (std::string& fname, int type, int possible_types, | |
448 const std::string& fcn, const char *who); | |
449 | |
5832 | 450 std::string do_find_fcn (const std::string& fcn, |
7336 | 451 std::string& dir_name, |
5864 | 452 int type = M_FILE | OCT_FILE | MEX_FILE) const; |
5832 | 453 |
7336 | 454 std::string do_find_private_fcn (const std::string& dir, |
455 const std::string& fcn, | |
456 int type = M_FILE | OCT_FILE | MEX_FILE) const; | |
457 | |
458 std::string do_find_method (const std::string& class_name, | |
459 const std::string& meth, | |
460 std::string& dir_name, | |
461 int type = M_FILE | OCT_FILE | MEX_FILE) const; | |
462 | |
463 std::list<std::string> do_methods (const std::string& class_name) const; | |
464 | |
5832 | 465 std::string do_find_file (const std::string& file) const; |
466 | |
8041
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
467 std::string do_find_dir (const std::string& dir) const; |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
8008
diff
changeset
|
468 |
5832 | 469 std::string do_find_first_of (const string_vector& files) const; |
470 | |
471 string_vector do_find_all_first_of (const string_vector& files) const; | |
472 | |
473 string_vector do_dirs (void) const; | |
474 | |
475 std::list<std::string> do_dir_list (void) const; | |
476 | |
477 string_vector do_files (const std::string& dir) const; | |
478 | |
479 string_vector do_fcn_names (void) const; | |
480 | |
481 std::string do_path (void) const; | |
482 | |
7336 | 483 friend void print_types (std::ostream& os, int types); |
484 | |
485 friend string_vector get_file_list (const dir_info::fcn_file_map_type& lst); | |
486 | |
487 friend void | |
488 print_fcn_list (std::ostream& os, const dir_info::fcn_file_map_type& lst); | |
489 | |
5832 | 490 void do_display (std::ostream& os) const; |
491 | |
6629 | 492 std::string do_system_path (void) const { return sys_path; } |
6626 | 493 |
8586
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
494 std::string do_get_command_line_path (void) const { return command_line_path; } |
31ab3b83bc8a
savepath: Respect cmd-line and env paths.
Ben Abbott <bpabbott@mac.com>
parents:
8329
diff
changeset
|
495 |
5832 | 496 void add_to_fcn_map (const dir_info& di, bool at_end) const; |
7336 | 497 |
498 void add_to_private_fcn_map (const dir_info& di) const; | |
499 | |
500 void add_to_method_map (const dir_info& di, bool at_end) const; | |
501 | |
502 friend dir_info::fcn_file_map_type get_fcn_files (const std::string& d); | |
5832 | 503 }; |
504 | |
505 extern std::string | |
506 genpath (const std::string& dir, const string_vector& skip = "private"); | |
507 | |
508 extern void execute_pkg_add (const std::string& dir); | |
509 extern void execute_pkg_del (const std::string& dir); | |
510 | |
511 #endif | |
512 | |
513 /* | |
514 ;;; Local Variables: *** | |
515 ;;; mode: C++ *** | |
516 ;;; page-delimiter: "^/\\*" *** | |
517 ;;; End: *** | |
518 */ |