GNU Octave
10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Loading...
Searching...
No Matches
oct-lvalue.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 1996-2025 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_oct_lvalue_h)
27
#define octave_oct_lvalue_h 1
28
29
#include "octave-config.h"
30
31
#include <string>
32
33
#include "
ovl.h
"
34
#include "
stack-frame.h
"
35
#include "
symrec.h
"
36
37
OCTAVE_BEGIN_NAMESPACE
(octave)
38
39
class
octave_lvalue
40
{
41
public
:
42
43
octave_lvalue
(
const
symbol_record
& sr,
44
const
std::shared_ptr<stack_frame>& frame)
45
: m_sym (sr), m_frame (frame), m_black_hole (false),
46
m_type (), m_idx ()
47
{ }
48
49
OCTAVE_DEFAULT_CONSTRUCT_COPY_MOVE_DELETE (
octave_lvalue
)
50
51
bool
is_black_hole ()
const
{
return
m_black_hole; }
52
53
void
mark_black_hole
() { m_black_hole =
true
; }
54
55
bool
is_defined ()
const
;
56
57
bool
is_undefined ()
const
;
58
59
bool
isstruct
()
const
{
return
value().isstruct (); }
60
61
void
define (
const
octave_value
& v);
62
63
void
assign (
octave_value::assign_op
,
const
octave_value
&);
64
65
octave_idx_type
numel
()
const
;
66
67
void
set_index (
const
std::string& t,
68
const
std::list<octave_value_list>& i);
69
70
void
clear_index
() { m_type =
""
; m_idx.clear (); }
71
72
std::string
index_type
()
const
{
return
m_type; }
73
74
bool
index_is_empty ()
const
;
75
76
bool
index_is_colon ()
const
;
77
78
void
unary_op
(
octave_value::unary_op
op);
79
80
octave_value
value ()
const
;
81
82
private
:
83
84
octave_value
85
eval_for_numel (
const
std::string& type,
86
const
std::list<octave_value_list>& idx)
const
;
87
88
symbol_record
m_sym;
89
90
std::shared_ptr<stack_frame> m_frame;
91
92
bool
m_black_hole;
93
94
std::string m_type;
95
96
std::list<octave_value_list> m_idx;
97
};
98
99
OCTAVE_END_NAMESPACE(octave)
100
101
#endif
bool
octave_idx_type
octave_lvalue
Definition
oct-lvalue.h:40
octave_lvalue::mark_black_hole
void mark_black_hole()
Definition
oct-lvalue.h:53
octave_lvalue::clear_index
void clear_index()
Definition
oct-lvalue.h:70
octave_lvalue::isstruct
bool isstruct() const
Definition
oct-lvalue.h:59
octave_lvalue::octave_lvalue
octave_lvalue(const symbol_record &sr, const std::shared_ptr< stack_frame > &frame)
Definition
oct-lvalue.h:43
octave_lvalue::index_type
std::string index_type() const
Definition
oct-lvalue.h:72
octave_value
Definition
ov.h:75
octave_value::unary_op
unary_op
Definition
ov.h:79
octave_value::assign_op
assign_op
Definition
ov.h:134
symbol_record
Definition
symrec.h:44
OCTAVE_BEGIN_NAMESPACE
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
numel
T::size_type numel(const T &str)
Definition
oct-string.cc:74
unary_op
octave_value unary_op(type_info &ti, octave_value::unary_op op, const octave_value &a)
ovl.h
stack-frame.h
symrec.h
libinterp
parse-tree
oct-lvalue.h
Generated on Sat Aug 2 2025 06:52:13 for GNU Octave by
1.9.8