Mercurial > octave
annotate libinterp/corefcn/workspace-element.h @ 22323:bac0d6f07a3e
maint: Update copyright notices for 2016.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Aug 2016 01:05:19 -0400 |
parents | 1473547f50f5 |
children | 34ce5be04942 |
rev | line source |
---|---|
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 /* |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 |
22323
bac0d6f07a3e
maint: Update copyright notices for 2016.
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
3 Copyright (C) 2013-2016 John W. Eaton |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 This file is part of Octave. |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 Octave is free software; you can redistribute it and/or modify it |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 under the terms of the GNU General Public License as published by the |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 Free Software Foundation; either version 3 of the License, or (at your |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 option) any later version. |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 for more details. |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 along with Octave; see the file COPYING. If not, see |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 <http://www.gnu.org/licenses/>. |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 */ |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
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_workspace_element_h) |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
24 #define octave_workspace_element_h 1 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
27 |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 #include <string> |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 class workspace_element |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 { |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 public: |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 workspace_element (char scope_arg = 'l', |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 const std::string& symbol_arg = "<name>", |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 const std::string& class_name_arg = "<class>", |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 const std::string& value_arg = "<value>", |
17824
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
38 const std::string& dimension_arg = "<dimension>", |
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
39 bool complex_flag_arg = false) |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 : xscope (scope_arg), xsymbol (symbol_arg), |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 xclass_name (class_name_arg), xvalue (value_arg), |
17824
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
42 xdimension (dimension_arg), xcomplex_flag (complex_flag_arg) |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 { } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 workspace_element (const workspace_element& ws_elt) |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 : xscope (ws_elt.xscope), xsymbol (ws_elt.xsymbol), |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 xclass_name (ws_elt.xclass_name), xvalue (ws_elt.xvalue), |
17824
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
48 xdimension (ws_elt.xdimension), xcomplex_flag (ws_elt.xcomplex_flag) |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 { } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
51 workspace_element operator = (const workspace_element& ws_elt) |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
52 { |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
53 if (this != &ws_elt) |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 { |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 xscope = ws_elt.xscope; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 xsymbol = ws_elt.xsymbol; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 xclass_name = ws_elt.xclass_name; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 xvalue = ws_elt.xvalue; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 xdimension = ws_elt.xdimension; |
17824
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
60 xcomplex_flag = ws_elt.xcomplex_flag; |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 return *this; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 ~workspace_element (void) { } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 char scope (void) const { return xscope; } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 std::string symbol (void) const { return xsymbol; } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 std::string class_name (void) const { return xclass_name; } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 std::string value (void) const { return xvalue; } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 std::string dimension (void) const { return xdimension; } |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 |
17824
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
78 bool complex_flag (void) const { return xcomplex_flag; } |
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
79 |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 private: |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 // [g]lobal, [p]ersistent, [l]ocal |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
83 char xscope; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 std::string xsymbol; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
85 std::string xclass_name; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
86 std::string xvalue; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
87 std::string xdimension; |
17824
86e8dbccf7c7
show when variables are complex in workspace view (bug #40445)
John W. Eaton <jwe@octave.org>
parents:
16892
diff
changeset
|
88 bool xcomplex_flag; |
16473
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
89 }; |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
90 |
e16f209ed05b
* workspace-element.h: Commit file missing from previous change.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
91 #endif |