annotate libinterp/octave-value/ov-dld-fcn.h @ 22865:89756f2f085b

use c++11 style for deleting default copy constructor and assignment operator * octave-gui.h, resource-manager.h, shortcut-manager.h, base-text-renderer.h, c-file-ptr-stream.h, dynamic-ld.cc, dynamic-ld.h, event-queue.h, ft-text-renderer.cc, gl-render.cc, gl-render.h, graphics.cc, graphics.in.h, interpreter.h, mex.cc, mxarray.in.h, oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-procbuf.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h, octave-link.h, pager.h, profiler.h, sighandlers.cc, symtab.h, text-renderer.h, zfstream.h, __init_fltk__.cc, ov-builtin.h, ov-dld-fcn.h, ov-fcn.h, ov-mex-fcn.h, ov-typeinfo.h, ov-usr-fcn.h, octave.h, lex.h, parse.h, pt-arg-list.h, pt-array-list.h, pt-assign.h, pt-binop.h, pt-bp.h, pt-cbinop.h, pt-cell.h, pt-check.h, pt-classdef.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.h, pt-eval.h, pt-except.h, pt-exp.h, pt-fcn-handle.h, pt-funcall.h, pt-id.h, pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h, pt-select.h, pt-stmt.h, pt-unop.h, pt-walk.h, pt.h, token.h, Array.cc, idx-vector.h, oct-fftw.h, sparse-chol.cc, sparse-qr.cc, file-ops.h, mach-info.h, oct-env.h, action-container.h, cmd-edit.cc, cmd-edit.h, cmd-hist.h, oct-locbuf.h, oct-mutex.h, oct-shlib.cc, oct-sort.h, pathsearch.h, singleton-cleanup.h, unwind-prot.h, url-transfer.cc, url-transfer.h: Use C++11 style "= delete" declaration to declare copy constructors and assignment operators for classes that should not be copied.
author John W. Eaton <jwe@octave.org>
date Mon, 05 Dec 2016 22:59:37 -0500
parents 3a2b891d0b33
children f75d289645ec
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
22323
bac0d6f07a3e maint: Update copyright notices for 2016.
John W. Eaton <jwe@octave.org>
parents: 22022
diff changeset
3 Copyright (C) 1996-2016 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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
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
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
9 the Free Software Foundation; either version 3 of the License, or
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
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
19 <http://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
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
55 ~octave_dld_function (void);
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
56
21730
30c53770f47e use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
57 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
58
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3329
diff changeset
59 std::string fcn_file_name (void) const;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
60
21730
30c53770f47e use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
61 octave::sys::time time_parsed (void) const;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
62
21730
30c53770f47e use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
63 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
64
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
65 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
66
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
67 bool is_builtin_function (void) const { return false; }
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
68
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
69 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
70
7349
a1ab9dbc9622 [project @ 2008-01-07 14:40:23 by jwe]
jwe
parents: 7017
diff changeset
71 static octave_dld_function* create (octave_builtin::fcn ff,
21750
6720e5a220ba use namespace for octave_shlib class
John W. Eaton <jwe@octave.org>
parents: 21730
diff changeset
72 const octave::dynamic_library& shl,
21017
93748bcaec17 maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents: 20791
diff changeset
73 const std::string& nm = "",
93748bcaec17 maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents: 20791
diff changeset
74 const std::string& ds = "");
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
75
21750
6720e5a220ba use namespace for octave_shlib class
John W. Eaton <jwe@octave.org>
parents: 21730
diff changeset
76 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
77 { return sh_lib; }
9960
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
78
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
79 private:
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
80
21750
6720e5a220ba use namespace for octave_shlib class
John W. Eaton <jwe@octave.org>
parents: 21730
diff changeset
81 octave::dynamic_library sh_lib;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
82
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
83 // 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
84 // parsed again.
21730
30c53770f47e use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
85 mutable octave::sys::time t_checked;
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
86
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
87 // 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
88 // system function. This affects whether we check the time stamp
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
89 // on the file to see if it has changed.
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
90 bool system_fcn_file;
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
91
4645
bd2067547b40 [project @ 2003-11-23 08:07:52 by jwe]
jwe
parents: 4642
diff changeset
92 // No copying!
bd2067547b40 [project @ 2003-11-23 08:07:52 by jwe]
jwe
parents: 4642
diff changeset
93
22865
89756f2f085b use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
94 octave_dld_function (const octave_dld_function& fn) = delete;
4645
bd2067547b40 [project @ 2003-11-23 08:07:52 by jwe]
jwe
parents: 4642
diff changeset
95
22865
89756f2f085b use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
96 octave_dld_function& operator = (const octave_dld_function& fn) = delete;
4645
bd2067547b40 [project @ 2003-11-23 08:07:52 by jwe]
jwe
parents: 4642
diff changeset
97
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4192
diff changeset
98 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
3329
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
99 };
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
100
e84e324db1de [project @ 1999-11-01 21:58:57 by jwe]
jwe
parents:
diff changeset
101 #endif
22407
34ce5be04942 maint: Style check C++ code in libinterp/.
Rik <rik@octave.org>
parents: 22323
diff changeset
102