1739
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1739
|
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_tree_mat_h) |
|
24 #define octave_tree_mat_h 1 |
|
25 |
4066
|
26 #if defined (__GNUG__) && ! defined (NO_PRAGMA_INTERFACE_IMPLEMENTATION) |
1739
|
27 #pragma interface |
|
28 #endif |
|
29 |
3523
|
30 #include <iostream> |
1739
|
31 |
2086
|
32 class octave_value; |
2982
|
33 class octave_value_list; |
|
34 class tree_argument_list; |
1739
|
35 |
2124
|
36 class tree_walker; |
|
37 |
1827
|
38 #include <SLList.h> |
|
39 |
1739
|
40 #include "pt-exp.h" |
|
41 |
|
42 // General matrices. This allows us to construct matrices from |
|
43 // other matrices, variables, and functions. |
|
44 |
|
45 class |
2971
|
46 tree_matrix : public tree_expression, public SLList<tree_argument_list *> |
1739
|
47 { |
|
48 public: |
|
49 |
3805
|
50 tree_matrix (tree_argument_list *row = 0, int line = -1, int column = -1) |
|
51 : tree_expression (line, column), SLList<tree_argument_list *> () |
2990
|
52 { |
|
53 if (row) |
|
54 append (row); |
|
55 } |
1827
|
56 |
2990
|
57 ~tree_matrix (void); |
1827
|
58 |
2529
|
59 bool all_elements_are_constant (void) const; |
1827
|
60 |
3933
|
61 bool rvalue_ok (void) const { return true; } |
2971
|
62 |
|
63 octave_value rvalue (void); |
|
64 |
|
65 octave_value_list rvalue (int nargout); |
1739
|
66 |
2124
|
67 void accept (tree_walker& tw); |
2988
|
68 |
|
69 private: |
|
70 |
|
71 // No copying! |
|
72 |
|
73 tree_matrix (const tree_matrix&); |
|
74 |
|
75 tree_matrix& operator = (const tree_matrix&); |
1739
|
76 }; |
|
77 |
3836
|
78 // The character to fill with when creating string arrays. |
|
79 extern char Vstring_fill_char; |
|
80 |
1739
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; End: *** |
|
87 */ |