1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1
|
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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
383
|
23 #if !defined (octave_dynamic_ld_h) |
|
24 #define octave_dynamic_ld_h 1 |
1
|
25 |
2862
|
26 #include <string> |
|
27 |
2894
|
28 class octave_builtin; |
|
29 |
|
30 class |
|
31 octave_dynamic_loader |
|
32 { |
|
33 protected: |
|
34 |
|
35 octave_dynamic_loader (void); |
|
36 |
|
37 public: |
|
38 |
|
39 typedef octave_builtin * (*builtin_fcn) (void); |
|
40 |
|
41 virtual ~octave_dynamic_loader (void); |
1
|
42 |
2894
|
43 static int load_fcn_from_dot_oct_file (const string& fcn_name); |
|
44 |
|
45 private: |
|
46 |
|
47 static octave_dynamic_loader *instance; |
|
48 |
|
49 virtual builtin_fcn |
|
50 resolve_reference (const string& mangled_name, const string& oct_file); |
|
51 |
|
52 string mangle_name (const string& name); |
|
53 |
|
54 // No copying! |
|
55 |
|
56 octave_dynamic_loader (const octave_dynamic_loader&); |
|
57 |
|
58 octave_dynamic_loader& operator = (const octave_dynamic_loader&); |
|
59 }; |
1
|
60 |
|
61 #endif |
|
62 |
|
63 /* |
|
64 ;;; Local Variables: *** |
|
65 ;;; mode: C++ *** |
|
66 ;;; End: *** |
|
67 */ |