comparison src/ov-cell.h @ 3353:6b36317855ff

[project @ 1999-11-16 16:13:49 by jwe]
author jwe
date Tue, 16 Nov 1999 16:13:51 +0000
parents
children d14c483b3c12
comparison
equal deleted inserted replaced
3352:0ddc382c245c 3353:6b36317855ff
1 /*
2
3 Copyright (C) 1999 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 the
9 Free Software Foundation; either version 2, or (at your option) any
10 later version.
11
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 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, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 */
22
23 #if !defined (octave_cell_h)
24 #define octave_cell_h 1
25
26 #if defined (__GNUG__)
27 #pragma interface
28 #endif
29
30 #include <cstdlib>
31
32 #include <string>
33
34 class ostream;
35
36 #include "mx-base.h"
37 #include "oct-alloc.h"
38 #include "str-vec.h"
39
40 #include "Cell.h"
41 #include "error.h"
42 #include "ov-base.h"
43 #include "ov-typeinfo.h"
44
45 class Octave_map;
46 class octave_value_list;
47
48 class tree_walker;
49
50 // Cells.
51
52 class
53 octave_cell : public octave_base_value
54 {
55 public:
56
57 octave_cell (void)
58 : octave_base_value () { }
59
60 octave_cell (const Cell& c)
61 : octave_base_value (), cell_val (c) { }
62
63 octave_cell (const octave_cell& c)
64 : octave_base_value (), cell_val (c.cell_val) { }
65
66 ~octave_cell (void) { }
67
68 octave_value *clone (void) { return new octave_cell (*this); }
69
70 octave_value do_index_op (const octave_value_list& idx);
71
72 void assign (const octave_value_list& idx, const octave_value& rhs);
73
74 bool is_defined (void) const { return true; }
75
76 bool is_constant (void) const { return true; }
77
78 void print (ostream& os, bool pr_as_read_syntax = false) const;
79
80 void print_raw (ostream& os, bool pr_as_read_syntax = false) const;
81
82 bool print_name_tag (ostream& os, const string& name) const;
83
84 private:
85
86 Cell cell_val;
87
88 DECLARE_OCTAVE_ALLOCATOR
89
90 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
91 };
92
93 #endif
94
95 /*
96 ;;; Local Variables: ***
97 ;;; mode: C++ ***
98 ;;; End: ***
99 */