3978
|
1 /* |
|
2 |
|
3 Copyright (C) 2002 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_cs_list_h) |
|
24 #define octave_cs_list_h 1 |
|
25 |
4192
|
26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) |
3978
|
27 #pragma interface |
|
28 #endif |
|
29 |
|
30 #include <cstdlib> |
|
31 |
|
32 #include <iostream> |
|
33 #include <string> |
|
34 |
|
35 #include "mx-base.h" |
|
36 #include "str-vec.h" |
|
37 |
|
38 #include "error.h" |
|
39 #include "oct-alloc.h" |
|
40 #include "oct-obj.h" |
|
41 #include "ov-list.h" |
|
42 #include "ov-typeinfo.h" |
|
43 |
|
44 class tree_walker; |
|
45 |
|
46 // Lists. |
|
47 |
|
48 class |
|
49 octave_cs_list : public octave_list |
|
50 { |
|
51 public: |
|
52 |
|
53 octave_cs_list (void) |
|
54 : octave_list () { } |
|
55 |
|
56 octave_cs_list (const octave_value_list& l) |
|
57 : octave_list (l) { } |
|
58 |
4513
|
59 octave_cs_list (const Cell& c) |
|
60 : octave_list (c) { } |
|
61 |
3978
|
62 octave_cs_list (const octave_cs_list& l) |
|
63 : octave_list (l) { } |
|
64 |
|
65 ~octave_cs_list (void) { } |
|
66 |
|
67 octave_value *clone (void) const { return new octave_cs_list (*this); } |
|
68 octave_value *empty_clone (void) const { return new octave_cs_list (); } |
|
69 |
|
70 #if 0 |
4247
|
71 octave_value subsref (const std::string& type, |
4219
|
72 const std::list<octave_value_list>& idx); |
3978
|
73 |
|
74 octave_value do_index_op (const octave_value_list& idx, int resize_ok); |
|
75 |
4247
|
76 octave_value subsasgn (const std::string& type, |
4219
|
77 const std::list<octave_value_list>& idx, |
3978
|
78 const octave_value& rhs); |
|
79 |
|
80 void assign (const octave_value_list& idx, const octave_value& rhs); |
|
81 |
|
82 int length (void) const { return lst.length (); } |
|
83 |
|
84 bool is_defined (void) const { return true; } |
|
85 |
|
86 bool is_constant (void) const { return true; } |
|
87 |
|
88 #endif |
|
89 |
|
90 bool is_cs_list (void) const { return true; } |
|
91 |
|
92 #if 0 |
|
93 |
|
94 bool is_list (void) const { return true; } |
|
95 |
|
96 octave_value_list list_value (void) const { return lst; } |
|
97 |
|
98 void print (std::ostream& os, bool pr_as_read_syntax = false) const; |
|
99 |
4499
|
100 #endif |
|
101 |
3978
|
102 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; |
|
103 |
4499
|
104 #if 0 |
|
105 |
3978
|
106 bool print_name_tag (std::ostream& os, const std::string& name) const; |
4499
|
107 |
3978
|
108 #endif |
|
109 |
|
110 private: |
|
111 |
|
112 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
|
113 |
|
114 DECLARE_OCTAVE_ALLOCATOR |
|
115 }; |
|
116 |
|
117 #endif |
|
118 |
|
119 /* |
|
120 ;;; Local Variables: *** |
|
121 ;;; mode: C++ *** |
|
122 ;;; End: *** |
|
123 */ |