Mercurial > octave
annotate libinterp/octave-value/ov-fcn-inline.h @ 21017:93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
* Backend.cc, comment-list.h, debug.cc, defaults.in.h, dynamic-ld.h, error.cc,
graphics.cc, graphics.in.h, help.cc, hook-fcn.h, load-path.cc, load-path.h,
ls-ascii-helper.cc, ls-mat-ascii.cc, ls-mat5.cc, ls-mat5.h, ls-oct-text.cc,
oct-iostrm.h, oct-lvalue.h, oct-stream.cc, oct-stream.h, oct-strstrm.h,
regexp.cc, schur.cc, sqrtm.cc, strfns.cc, symtab.cc, symtab.h, sysdep.cc,
toplev.cc, urlwrite.cc, variables.cc, variables.h, ov-builtin.h, ov-cell.cc,
ov-class.cc, ov-classdef.cc, ov-classdef.h, ov-dld-fcn.h, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-fcn-inline.h, ov-fcn.h, ov-lazy-idx.cc, ov-mex-fcn.h,
ov-struct.cc, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.h,
ovl.h, octave.cc, lex.h, parse.h, pt-classdef.h, pt-exp.cc, pt-pr-code.h,
token.h, version.cc, version.in.h, oct-rand.h, dir-ops.h, file-ops.cc,
file-ops.h, file-stat.h, oct-env.cc, oct-group.cc, oct-passwd.cc,
oct-syscalls.cc, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, kpse.cc,
lo-array-gripes.h, pathsearch.cc, pathsearch.h, str-vec.h, url-transfer.h:
Replace emtpy 'std::string ()' calls with "".
author | Rik <rik@octave.org> |
---|---|
date | Wed, 30 Dec 2015 12:33:33 -0800 |
parents | f7084eae3318 |
children | 1473547f50f5 |
rev | line source |
---|---|
4933 | 1 /* |
2 | |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19598
diff
changeset
|
3 Copyright (C) 2004-2015 David Bateman |
4933 | 4 |
7016 | 5 This file is part of Octave. |
4933 | 6 |
7016 | 7 Octave is free software; you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 3 of the License, or (at your | |
10 option) any later version. | |
11 | |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
4933 | 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 |
19 <http://www.gnu.org/licenses/>. | |
4933 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19863
diff
changeset
|
23 #if ! defined (octave_ov_fcn_inline_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_fcn_inline_h 1 |
4933 | 25 |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
26 #include <iosfwd> |
4933 | 27 #include <string> |
28 | |
29 | |
30 #include "ov-base.h" | |
31 #include "ov-base-mat.h" | |
32 #include "ov-fcn.h" | |
33 #include "ov-typeinfo.h" | |
34 #include "symtab.h" | |
35 #include "ov-fcn-handle.h" | |
36 | |
37 // Inline functions. | |
38 | |
39 class | |
7867
f6fffa74b9b5
Export additional symbols: octave_fcn_inline, octave_fcn_handle, read_binary_data, save_binary_data.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7017
diff
changeset
|
40 OCTINTERP_API |
4933 | 41 octave_fcn_inline : public octave_fcn_handle |
42 { | |
43 public: | |
44 | |
45 octave_fcn_inline (void) | |
4967 | 46 : octave_fcn_handle (), iftext (), ifargs () { } |
4933 | 47 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
48 octave_fcn_inline (const std::string& f, const string_vector& a, |
21017
93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
49 const std::string& n = ""); |
4933 | 50 |
4967 | 51 octave_fcn_inline (const octave_fcn_inline& fi) |
52 : octave_fcn_handle (fi), iftext (fi.iftext), ifargs (fi.ifargs) { } | |
53 | |
4933 | 54 ~octave_fcn_inline (void) { } |
55 | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
56 octave_base_value *clone (void) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
57 { return new octave_fcn_inline (*this); } |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
58 octave_base_value *empty_clone (void) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
59 { return new octave_fcn_inline (); } |
4967 | 60 |
4954 | 61 bool is_inline_function (void) const { return true; } |
62 | |
4933 | 63 octave_fcn_inline *fcn_inline_value (bool = false) { return this; } |
64 | |
65 std::string fcn_text (void) const { return iftext; } | |
66 | |
67 string_vector fcn_arg_names (void) const { return ifargs; } | |
68 | |
5279 | 69 octave_value convert_to_str_internal (bool, bool, char) const; |
4933 | 70 |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10313
diff
changeset
|
71 octave_map map_value (void) const; |
6625 | 72 |
6974 | 73 bool save_ascii (std::ostream& os); |
4972 | 74 |
75 bool load_ascii (std::istream& is); | |
76 | |
77 bool save_binary (std::ostream& os, bool& save_as_floats); | |
78 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
79 bool load_binary (std::istream& is, bool swap, |
10313 | 80 oct_mach_info::float_format fmt); |
4972 | 81 |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
82 bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats); |
4972 | 83 |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
84 bool load_hdf5 (octave_hdf5_id loc_id, const char *name); |
4972 | 85 |
18416
bcd71a2531d3
Support disp/display overloading in classdef
Michael Goffioul <michael.goffioul@gmail.com>
parents:
17822
diff
changeset
|
86 void print (std::ostream& os, bool pr_as_read_syntax = false); |
4933 | 87 |
88 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; | |
89 | |
90 private: | |
91 | |
92 | |
93 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA | |
94 | |
95 // The expression of an inline function. | |
96 std::string iftext; | |
97 | |
98 // The args of an inline function. | |
99 string_vector ifargs; | |
100 }; | |
101 | |
102 #endif |