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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
1 /*
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
4
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
16
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
20
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
21 */
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
28 #include <string>
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
29
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
30 #include "oct-shlib.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
31
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
32 #include "ov-fcn.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
33 #include "ov-builtin.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
34 #include "ov-typeinfo.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
35
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
36 class octave_value;
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
37 class octave_value_list;
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
38
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
39 // Dynamically-linked functions.
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
40
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
41 class
7349
a1ab9dbc9622 [project @ 2008-01-07 14:40:23 by jwe]
jwe
parents: 7017
diff changeset
42 OCTINTERP_API
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
43 octave_dld_function : public octave_builtin
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
44 {
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
45 public:
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
7604168d3e2a [project @ 2003-11-22 12:19:27 by jwe]
jwe
parents: 4612
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
54
23518
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
55 octave_dld_function (octave_builtin::meth mm, const octave::dynamic_library& shl,
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
56 const std::string& nm = "",
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
57 const std::string& ds = "");
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
65 ~octave_dld_function (void);
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
68
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3329
diff changeset
69 std::string fcn_file_name (void) const;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
74
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
75 bool is_system_fcn_file (void) const { return system_fcn_file; }
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
76
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
77 bool is_builtin_function (void) const { return false; }
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
78
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
85
23518
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
86 static octave_dld_function * create (octave_builtin::meth mm,
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
87 const octave::dynamic_library& shl,
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
88 const std::string& nm = "",
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
89 const std::string& ds = "");
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
94 private:
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
97
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
98 // The time the file was last checked to see if it needs to be
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
101
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
102 // True if this function came from a file that is considered to be a
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
103 // system function. This affects whether we check the time stamp
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
104 // on the file to see if it has changed.
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
105 bool system_fcn_file;
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
106
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4192
diff changeset
107 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
108 };
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
109
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
110 #endif