Mercurial > hg > octave-nkf
annotate src/ov-dld-fcn.h @ 10784:ca2df6737d6b
generalize cell2mat optimization to n dimensions
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 12 Jul 2010 21:32:18 +0200 |
parents | f3b65e1ae355 |
children | fd0a3ac60b0e |
rev | line source |
---|---|
3329 | 1 /* |
2 | |
8920 | 3 Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2007, 2008 |
7017 | 4 John W. Eaton |
3329 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
3329 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
3329 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_dld_function_h) | |
25 #define octave_dld_function_h 1 | |
26 | |
27 #include <string> | |
28 | |
29 #include "oct-shlib.h" | |
30 | |
31 #include "ov-fcn.h" | |
32 #include "ov-builtin.h" | |
33 #include "ov-typeinfo.h" | |
34 | |
35 class octave_shlib; | |
36 | |
37 class octave_value; | |
38 class octave_value_list; | |
39 | |
40 // Dynamically-linked functions. | |
41 | |
42 class | |
7349 | 43 OCTINTERP_API |
3329 | 44 octave_dld_function : public octave_builtin |
45 { | |
46 public: | |
47 | |
4645 | 48 octave_dld_function (void) { } |
4641 | 49 |
3329 | 50 octave_dld_function (octave_builtin::fcn ff, const octave_shlib& shl, |
10313 | 51 const std::string& nm = std::string (), |
52 const std::string& ds = std::string ()); | |
3329 | 53 |
54 ~octave_dld_function (void); | |
55 | |
56 void mark_fcn_file_up_to_date (const octave_time& t) { t_checked = t; } | |
57 | |
3523 | 58 std::string fcn_file_name (void) const; |
3329 | 59 |
60 octave_time time_parsed (void) const; | |
61 | |
62 octave_time time_checked (void) const { return t_checked; } | |
63 | |
64 bool is_system_fcn_file (void) const { return system_fcn_file; } | |
65 | |
66 bool is_builtin_function (void) const { return false; } | |
67 | |
68 bool is_dld_function (void) const { return true; } | |
7349 | 69 |
70 static octave_dld_function* create (octave_builtin::fcn ff, | |
71 const octave_shlib& shl, | |
72 const std::string& nm = std::string (), | |
73 const std::string& ds = std::string ()); | |
3329 | 74 |
9960
5f3c10ecb150
implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
75 octave_shlib get_shlib (void) const |
5f3c10ecb150
implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
76 { return sh_lib; } |
5f3c10ecb150
implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
77 |
3329 | 78 private: |
79 | |
80 octave_shlib sh_lib; | |
81 | |
82 // The time the file was last checked to see if it needs to be | |
83 // parsed again. | |
84 mutable octave_time t_checked; | |
85 | |
86 // True if this function came from a file that is considered to be a | |
87 // system function. This affects whether we check the time stamp | |
88 // on the file to see if it has changed. | |
89 bool system_fcn_file; | |
90 | |
4645 | 91 // No copying! |
92 | |
93 octave_dld_function (const octave_dld_function& fn); | |
94 | |
95 octave_dld_function& operator = (const octave_dld_function& fn); | |
96 | |
4612 | 97 DECLARE_OCTAVE_ALLOCATOR |
3329 | 98 |
4612 | 99 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
3329 | 100 }; |
101 | |
102 #endif |