GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pt-array-list.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2013-2024 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_array_list_h)
27 #define octave_pt_array_list_h 1
28 
29 #include "octave-config.h"
30 
31 #include "base-list.h"
32 #include "pt-arg-list.h"
33 #include "pt-exp.h"
34 
36 
37 class symbol_scope;
38 class tree_walker;
39 
40 // Base class for cell arrays and matrices.
41 
43  public base_list<tree_argument_list *>
44 {
45 public:
46 
49 
50 protected:
51 
52  tree_array_list (tree_argument_list *row = nullptr, int l = -1, int c = -1)
54  {
55  if (row)
56  append (row);
57  }
58 
59 public:
60 
61  OCTAVE_DISABLE_COPY_MOVE (tree_array_list)
62 
64 
65  bool all_elements_are_constant () const;
66 
67  // FIXME: should we import the functions from the base class and
68  // overload them here, or should we use a different name so we don't
69  // have to do this? Without the using declaration or a name change,
70  // the base class functions will be hidden. That may be OK, but it
71  // can also cause some confusion.
73 
74  void copy_base (const tree_array_list& array_list);
75 
76  void copy_base (const tree_array_list& array_list,
77  symbol_scope& scope);
78 
79  tree_expression * dup (symbol_scope& scope) const;
80 
81  void accept (tree_walker& tw);
82 };
83 
84 OCTAVE_END_NAMESPACE(octave)
85 
86 #endif
void append(const tree_argument_list * &s)
Definition: base-list.h:92
tree_expression * dup(symbol_scope &scope) const
void accept(tree_walker &tw)
base_list< tree_argument_list * >::const_iterator const_iterator
Definition: pt-array-list.h:48
virtual void copy_base(const tree_expression &e)
Definition: pt-exp.h:128
tree_array_list(tree_argument_list *row=nullptr, int l=-1, int c=-1)
Definition: pt-array-list.h:52
base_list< tree_argument_list * >::iterator iterator
Definition: pt-array-list.h:47
bool all_elements_are_constant() const
virtual void copy_base(const tree_expression &e)
Definition: pt-exp.h:128
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn