GNU Octave  4.4.1
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-2018 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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_pt_array_list_h)
24 #define octave_pt_array_list_h 1
25 
26 #include "octave-config.h"
27 
28 #include "base-list.h"
29 #include "pt-arg-list.h"
30 #include "pt-exp.h"
31 
32 namespace octave
33 {
34  class symbol_scope;
35  class tree_walker;
36 
37  // Base class for cell arrays and matrices.
38 
40  public base_list<tree_argument_list *>
41  {
42  public:
43 
46 
47  protected:
48 
49  tree_array_list (tree_argument_list *row = nullptr, int l = -1, int c = -1)
51  {
52  if (row)
53  append (row);
54  }
55 
56  public:
57 
58  // No copying!
59 
60  tree_array_list (const tree_array_list&) = delete;
61 
63 
64  ~tree_array_list (void);
65 
66  bool all_elements_are_constant (void) const;
67 
68  bool has_magic_end (void) const;
69 
70  // FIXME: should we import the functions from the base class and
71  // overload them here, or should we use a different name so we don't
72  // have to do this? Without the using declaration or a name change,
73  // the base class functions will be hidden. That may be OK, but it
74  // can also cause some confusion.
76 
77  void copy_base (const tree_array_list& array_list);
78 
79  void copy_base (const tree_array_list& array_list,
80  symbol_scope& scope);
81 
82  tree_expression * dup (symbol_scope& scope) const;
83 
84  void accept (tree_walker& tw);
85  };
86 }
87 
88 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
89 
90 OCTAVE_DEPRECATED (4.4, "use 'octave::tree_array_list' instead")
91 typedef octave::tree_array_list tree_array_list;
92 
93 #endif
94 
95 #endif
void copy_base(const tree_array_list &array_list)
std::list< elt_type >::iterator iterator
Definition: base-list.h:40
tree_array_list & operator=(const tree_array_list &)=delete
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
base_list< tree_argument_list * >::const_iterator const_iterator
Definition: pt-array-list.h:45
virtual void copy_base(const tree_expression &e)
Definition: pt-exp.h:130
bool has_magic_end(void) const
base_list< tree_argument_list * >::iterator iterator
Definition: pt-array-list.h:44
bool all_elements_are_constant(void) const
std::list< elt_type >::const_iterator const_iterator
Definition: base-list.h:41
tree_array_list(tree_argument_list *row=nullptr, int l=-1, int c=-1)
Definition: pt-array-list.h:49
tree_expression * dup(symbol_scope &scope) const
void append(const tree_argument_list * &s)
Definition: base-list.h:110
void accept(tree_walker &tw)
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
Definition: str2double.cc:342