GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
pt-cell.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1999-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_pt_cell_h)
27#define octave_pt_cell_h 1
28
29#include "octave-config.h"
30
31#include <iosfwd>
32
33class octave_value;
35
36#include "pt-mat.h"
37#include "pt-walk.h"
38
40
41class symbol_scope;
43
44// General cells.
45
47{
48public:
49
51 : tree_array_list (row)
52 { }
53
54 OCTAVE_DISABLE_COPY_MOVE (tree_cell)
55
56 ~tree_cell () = default;
57
58 bool iscell () const { return true; }
59
60 bool rvalue_ok () const { return true; }
61
62 tree_expression * dup (symbol_scope& scope) const;
63
64 octave_value evaluate (tree_evaluator&, int nargout = 1);
65
67 {
68 return ovl (evaluate (tw, nargout));
69 }
70
72 {
73 tw.visit_cell (*this);
74 }
75};
76
77OCTAVE_END_NAMESPACE(octave)
78
79#endif
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
Definition pt-cell.h:66
bool rvalue_ok() const
Definition pt-cell.h:60
tree_expression * dup(symbol_scope &scope) const
Definition pt-cell.cc:42
~tree_cell()=default
void accept(tree_walker &tw)
Definition pt-cell.h:71
bool iscell() const
Definition pt-cell.h:58
tree_cell(tree_argument_list *row=nullptr)
Definition pt-cell.h:50
octave_value evaluate(tree_evaluator &, int nargout=1)
Definition pt-cell.cc:52
virtual void visit_cell(tree_cell &)
Definition pt-walk.cc:469
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
Definition ovl.h:217