GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pt-cell.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1999-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_cell_h)
24 #define octave_pt_cell_h 1
25 
26 #include "octave-config.h"
27 
28 #include <iosfwd>
29 
30 class octave_value;
31 class octave_value_list;
32 
33 #include "pt-mat.h"
34 #include "pt-walk.h"
35 
36 namespace octave
37 {
38  class symbol_scope;
39  class tree_argument_list;
40 
41  // General cells.
42 
43  class tree_cell : public tree_array_list
44  {
45  public:
46 
47  tree_cell (tree_argument_list *row = nullptr, int l = -1, int c = -1)
48  : tree_array_list (row, l, c)
49  { }
50 
51  // No copying!
52 
53  tree_cell (const tree_cell&) = delete;
54 
55  tree_cell& operator = (const tree_cell&) = delete;
56 
57  ~tree_cell (void) = default;
58 
59  bool iscell (void) const { return true; }
60 
61  bool rvalue_ok (void) const { return true; }
62 
63  tree_expression * dup (symbol_scope& scope) const;
64 
65  void accept (tree_walker& tw)
66  {
67  tw.visit_cell (*this);
68  }
69  };
70 }
71 
72 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
73 
74 OCTAVE_DEPRECATED (4.4, "use 'octave::tree_cell' instead")
75 typedef octave::tree_cell tree_cell;
76 
77 #endif
78 
79 #endif
void accept(tree_walker &tw)
Definition: pt-cell.h:65
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
~tree_cell(void)=default
virtual void visit_cell(tree_cell &)=0
bool iscell(void) const
Definition: pt-cell.h:59
bool rvalue_ok(void) const
Definition: pt-cell.h:61
tree_expression * dup(symbol_scope &scope) const
Definition: pt-cell.cc:40
tree_cell(tree_argument_list *row=nullptr, int l=-1, int c=-1)
Definition: pt-cell.h:47
tree_cell & operator=(const tree_cell &)=delete
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