Mercurial > octave
annotate libinterp/octave-value/ov-dld-fcn.h @ 25054:6652d3823428 stable
maint: Update copyright dates in all source files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 30 Mar 2018 09:19:05 -0400 |
parents | 194eb4bd202b |
children | 078b795c5219 |
rev | line source |
---|---|
3329 | 1 /* |
2 | |
25054
6652d3823428
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
3 Copyright (C) 1996-2018 John W. Eaton |
3329 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23518
diff
changeset
|
7 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23518
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
3329 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
3329 | 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 |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23518
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
3329 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_ov_dld_fcn_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
24 #define octave_ov_dld_fcn_h 1 |
3329 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21017
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21017
diff
changeset
|
27 |
3329 | 28 #include <string> |
29 | |
30 #include "oct-shlib.h" | |
31 | |
32 #include "ov-fcn.h" | |
33 #include "ov-builtin.h" | |
34 #include "ov-typeinfo.h" | |
35 | |
36 class octave_value; | |
37 class octave_value_list; | |
38 | |
39 // Dynamically-linked functions. | |
40 | |
41 class | |
7349 | 42 OCTINTERP_API |
3329 | 43 octave_dld_function : public octave_builtin |
44 { | |
45 public: | |
46 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
47 octave_dld_function (void) |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
48 : sh_lib (), t_checked (), system_fcn_file () |
11584
cda4aa780d58
Another round of initialising members in the constructor initialisation list
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents:
11523
diff
changeset
|
49 { } |
4641 | 50 |
21750
6720e5a220ba
use namespace for octave_shlib class
John W. Eaton <jwe@octave.org>
parents:
21730
diff
changeset
|
51 octave_dld_function (octave_builtin::fcn ff, const octave::dynamic_library& shl, |
21017
93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
52 const std::string& nm = "", |
93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
53 const std::string& ds = ""); |
3329 | 54 |
23518 | 55 octave_dld_function (octave_builtin::meth mm, const octave::dynamic_library& shl, |
56 const std::string& nm = "", | |
57 const std::string& ds = ""); | |
58 | |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
59 // No copying! |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
60 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
61 octave_dld_function (const octave_dld_function& fn) = delete; |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
62 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
63 octave_dld_function& operator = (const octave_dld_function& fn) = delete; |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
64 |
3329 | 65 ~octave_dld_function (void); |
66 | |
21730
30c53770f47e
use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
67 void mark_fcn_file_up_to_date (const octave::sys::time& t) { t_checked = t; } |
3329 | 68 |
3523 | 69 std::string fcn_file_name (void) const; |
3329 | 70 |
21730
30c53770f47e
use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
71 octave::sys::time time_parsed (void) const; |
3329 | 72 |
21730
30c53770f47e
use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
73 octave::sys::time time_checked (void) const { return t_checked; } |
3329 | 74 |
75 bool is_system_fcn_file (void) const { return system_fcn_file; } | |
76 | |
77 bool is_builtin_function (void) const { return false; } | |
78 | |
79 bool is_dld_function (void) const { return true; } | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
80 |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
81 static octave_dld_function * create (octave_builtin::fcn ff, |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
82 const octave::dynamic_library& shl, |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
83 const std::string& nm = "", |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
84 const std::string& ds = ""); |
3329 | 85 |
23518 | 86 static octave_dld_function * create (octave_builtin::meth mm, |
87 const octave::dynamic_library& shl, | |
88 const std::string& nm = "", | |
89 const std::string& ds = ""); | |
90 | |
21750
6720e5a220ba
use namespace for octave_shlib class
John W. Eaton <jwe@octave.org>
parents:
21730
diff
changeset
|
91 octave::dynamic_library get_shlib (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
92 { return sh_lib; } |
9960
5f3c10ecb150
implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
93 |
3329 | 94 private: |
95 | |
21750
6720e5a220ba
use namespace for octave_shlib class
John W. Eaton <jwe@octave.org>
parents:
21730
diff
changeset
|
96 octave::dynamic_library sh_lib; |
3329 | 97 |
98 // The time the file was last checked to see if it needs to be | |
99 // parsed again. | |
21730
30c53770f47e
use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
100 mutable octave::sys::time t_checked; |
3329 | 101 |
102 // True if this function came from a file that is considered to be a | |
103 // system function. This affects whether we check the time stamp | |
104 // on the file to see if it has changed. | |
105 bool system_fcn_file; | |
106 | |
4612 | 107 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
3329 | 108 }; |
109 | |
110 #endif |