annotate libinterp/octave-value/ov-dld-fcn.h @ 30864:5fa3d8f0dcb3 stable

don't use mutable keyword for dld_function and mex_function data members * ov-dld-fcn.h (octave_dld_function::m_time_checked): Rename from m_t_checked. Change all uses. Don't declare as mutable. * ov-mex-fcn.h (octave_mex_function::m_time_checked): Don't declare as mutable.
author John W. Eaton <jwe@octave.org>
date Thu, 24 Mar 2022 12:09:12 -0400
parents 796f54d4ddbf
children 4026b5fbc67d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30077
diff changeset
3 // Copyright (C) 1996-2022 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
25
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
26 #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
27 #define octave_ov_dld_fcn_h 1
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
28
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21017
diff changeset
29 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21017
diff changeset
30
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
31 #include <string>
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
32
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
33 #include "oct-shlib.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
34
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
35 #include "ov-fcn.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
36 #include "ov-builtin.h"
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
37 #include "ov-typeinfo.h"
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 class octave_value;
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
40 class octave_value_list;
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
41
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
42 // Dynamically-linked functions.
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
43
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
44 class
7349
a1ab9dbc9622 [project @ 2008-01-07 14:40:23 by jwe]
jwe
parents: 7017
diff changeset
45 OCTINTERP_API
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
46 octave_dld_function : public octave_builtin
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
47 {
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
48 public:
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
49
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11584
diff changeset
50 octave_dld_function (void)
30864
5fa3d8f0dcb3 don't use mutable keyword for dld_function and mex_function data members
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
51 : m_sh_lib (), m_time_checked (), m_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
52 { }
4641
7604168d3e2a [project @ 2003-11-22 12:19:27 by jwe]
jwe
parents: 4612
diff changeset
53
25103
078b795c5219 maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents: 25054
diff changeset
54 octave_dld_function (octave_builtin::fcn ff,
078b795c5219 maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents: 25054
diff changeset
55 const octave::dynamic_library& shl,
21017
93748bcaec17 maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents: 20791
diff changeset
56 const std::string& nm = "",
93748bcaec17 maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents: 20791
diff changeset
57 const std::string& ds = "");
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
58
25103
078b795c5219 maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents: 25054
diff changeset
59 octave_dld_function (octave_builtin::meth mm,
078b795c5219 maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents: 25054
diff changeset
60 const octave::dynamic_library& shl,
23518
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
61 const std::string& nm = "",
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
62 const std::string& ds = "");
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
63
22869
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22865
diff changeset
64 // No copying!
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22865
diff changeset
65
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22865
diff changeset
66 octave_dld_function (const octave_dld_function& fn) = delete;
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22865
diff changeset
67
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22865
diff changeset
68 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
69
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
70 ~octave_dld_function (void);
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
71
30864
5fa3d8f0dcb3 don't use mutable keyword for dld_function and mex_function data members
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
72 void mark_fcn_file_up_to_date (const octave::sys::time& t) { m_time_checked = t; }
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
73
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3329
diff changeset
74 std::string fcn_file_name (void) const;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
75
21730
30c53770f47e use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
76 octave::sys::time time_parsed (void) const;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
77
30864
5fa3d8f0dcb3 don't use mutable keyword for dld_function and mex_function data members
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
78 octave::sys::time time_checked (void) const { return m_time_checked; }
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
79
30077
b16e0d357437 maint: use "m_" prefix for member variables in some octave-value classes.
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
80 bool is_system_fcn_file (void) const { return m_system_fcn_file; }
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
81
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
82 bool is_builtin_function (void) const { return false; }
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
83
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
84 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
85
23449
c763214a8260 maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents: 23220
diff changeset
86 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
87 const octave::dynamic_library& shl,
c763214a8260 maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents: 23220
diff changeset
88 const std::string& nm = "",
c763214a8260 maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents: 23220
diff changeset
89 const std::string& ds = "");
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
90
23518
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
91 static octave_dld_function * create (octave_builtin::meth mm,
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
92 const octave::dynamic_library& shl,
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
93 const std::string& nm = "",
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
diff changeset
94 const std::string& ds = "");
8744d4ed8fb4 provide DEFMETHOD macros
John W. Eaton <jwe@octave.org>
parents: 23449
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 get_shlib (void) const
30077
b16e0d357437 maint: use "m_" prefix for member variables in some octave-value classes.
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
97 { return m_sh_lib; }
9960
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
98
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
99 private:
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
100
30077
b16e0d357437 maint: use "m_" prefix for member variables in some octave-value classes.
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
101 octave::dynamic_library m_sh_lib;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
102
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
103 // 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
104 // parsed again.
30864
5fa3d8f0dcb3 don't use mutable keyword for dld_function and mex_function data members
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
105 octave::sys::time m_time_checked;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
106
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
107 // 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
108 // system function. This affects whether we check the time stamp
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
109 // on the file to see if it has changed.
30077
b16e0d357437 maint: use "m_" prefix for member variables in some octave-value classes.
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
110 bool m_system_fcn_file;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
111
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4192
diff changeset
112 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
113 };
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
114
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
115 #endif