GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
libinterp
corefcn
workspace-element.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2013-2017 John W. Eaton
4
5
This file is part of Octave.
6
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.
16
17
You should have received a copy of the GNU General Public License
18
along with Octave; see the file COPYING. If not, see
19
<http://www.gnu.org/licenses/>.
20
21
*/
22
23
#if ! defined (octave_workspace_element_h)
24
#define octave_workspace_element_h 1
25
26
#include "octave-config.h"
27
28
#include <string>
29
30
class
workspace_element
31
{
32
public
:
33
34
workspace_element
(
char
scope_arg =
'l'
,
35
const
std::string
& symbol_arg =
"<name>"
,
36
const
std::string
& class_name_arg =
"<class>"
,
37
const
std::string
& value_arg =
"<value>"
,
38
const
std::string
& dimension_arg =
"<dimension>"
,
39
bool
complex_flag_arg =
false
)
40
:
xscope
(scope_arg),
xsymbol
(symbol_arg),
41
xclass_name
(class_name_arg),
xvalue
(value_arg),
42
xdimension
(dimension_arg),
xcomplex_flag
(complex_flag_arg)
43
{ }
44
45
workspace_element
(
const
workspace_element
& ws_elt)
46
:
xscope
(ws_elt.
xscope
),
xsymbol
(ws_elt.
xsymbol
),
47
xclass_name
(ws_elt.
xclass_name
),
xvalue
(ws_elt.
xvalue
),
48
xdimension
(ws_elt.
xdimension
),
xcomplex_flag
(ws_elt.
xcomplex_flag
)
49
{ }
50
51
workspace_element
operator =
(
const
workspace_element
& ws_elt)
52
{
53
if
(
this
!= &ws_elt)
54
{
55
xscope
= ws_elt.
xscope
;
56
xsymbol
= ws_elt.
xsymbol
;
57
xclass_name
= ws_elt.
xclass_name
;
58
xvalue
= ws_elt.
xvalue
;
59
xdimension
= ws_elt.
xdimension
;
60
xcomplex_flag
= ws_elt.
xcomplex_flag
;
61
}
62
63
return
*
this
;
64
}
65
66
~workspace_element
(
void
) { }
67
68
char
scope
(
void
)
const
{
return
xscope
; }
69
70
std::string
symbol
(
void
)
const
{
return
xsymbol
; }
71
72
std::string
class_name
(
void
)
const
{
return
xclass_name
; }
73
74
std::string
value
(
void
)
const
{
return
xvalue
; }
75
76
std::string
dimension
(
void
)
const
{
return
xdimension
; }
77
78
bool
complex_flag
(
void
)
const
{
return
xcomplex_flag
; }
79
80
private
:
81
82
// [g]lobal, [p]ersistent, [l]ocal
83
char
xscope
;
84
std::string
xsymbol
;
85
std::string
xclass_name
;
86
std::string
xvalue
;
87
std::string
xdimension
;
88
bool
xcomplex_flag
;
89
};
90
91
#endif
workspace_element::dimension
std::string dimension(void) const
Definition:
workspace-element.h:76
workspace_element::xcomplex_flag
bool xcomplex_flag
Definition:
workspace-element.h:88
workspace_element::xvalue
std::string xvalue
Definition:
workspace-element.h:86
workspace_element::operator=
workspace_element operator=(const workspace_element &ws_elt)
Definition:
workspace-element.h:51
workspace_element::complex_flag
bool complex_flag(void) const
Definition:
workspace-element.h:78
workspace_element::value
std::string value(void) const
Definition:
workspace-element.h:74
workspace_element::~workspace_element
~workspace_element(void)
Definition:
workspace-element.h:66
workspace_element::xdimension
std::string xdimension
Definition:
workspace-element.h:87
workspace_element::xsymbol
std::string xsymbol
Definition:
workspace-element.h:84
workspace_element
Definition:
workspace-element.h:30
workspace_element::scope
char scope(void) const
Definition:
workspace-element.h:68
workspace_element::symbol
std::string symbol(void) const
Definition:
workspace-element.h:70
workspace_element::xscope
char xscope
Definition:
workspace-element.h:83
workspace_element::class_name
std::string class_name(void) const
Definition:
workspace-element.h:72
workspace_element::xclass_name
std::string xclass_name
Definition:
workspace-element.h:85
string
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition:
utils.cc:854
workspace_element::workspace_element
workspace_element(char scope_arg= 'l', const std::string &symbol_arg="<name>", const std::string &class_name_arg="<class>", const std::string &value_arg="<value>", const std::string &dimension_arg="<dimension>", bool complex_flag_arg=false)
Definition:
workspace-element.h:34
workspace_element::workspace_element
workspace_element(const workspace_element &ws_elt)
Definition:
workspace-element.h:45
Generated on Wed May 10 2017 15:42:50 for GNU Octave by
1.8.8