2982
|
1 /* |
|
2 |
|
3 Copyright (C) 1996, 1997 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_tree_arg_list_h) |
|
24 #define octave_tree_arg_list_h 1 |
|
25 |
4192
|
26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) |
2982
|
27 #pragma interface |
|
28 #endif |
|
29 |
|
30 class octave_value_list; |
|
31 |
|
32 class tree_expression; |
|
33 |
|
34 class tree_walker; |
|
35 |
|
36 #include "str-vec.h" |
|
37 |
4219
|
38 #include "base-list.h" |
|
39 |
2982
|
40 // Argument lists. Used to hold the list of expressions that are the |
|
41 // arguments in a function call or index expression. |
|
42 |
|
43 class |
4219
|
44 tree_argument_list : public octave_base_list<tree_expression *> |
2982
|
45 { |
|
46 public: |
|
47 |
4219
|
48 tree_argument_list (void) { } |
2982
|
49 |
4219
|
50 tree_argument_list (tree_expression *t) { append (t); } |
2982
|
51 |
|
52 ~tree_argument_list (void); |
|
53 |
4219
|
54 tree_expression *remove_front (void) |
|
55 { |
|
56 iterator p = begin (); |
|
57 tree_expression *retval = *p; |
|
58 erase (p); |
|
59 return retval; |
|
60 } |
4212
|
61 |
3977
|
62 int nargout_count (void) const; |
|
63 |
2982
|
64 bool all_elements_are_constant (void) const; |
|
65 |
4234
|
66 octave_value_list convert_to_const_vector (const octave_value *object = 0); |
2982
|
67 |
|
68 string_vector get_arg_names (void) const; |
|
69 |
|
70 void accept (tree_walker& tw); |
2988
|
71 |
|
72 private: |
|
73 |
|
74 // No copying! |
|
75 |
|
76 tree_argument_list (const tree_argument_list&); |
|
77 |
|
78 tree_argument_list& operator = (const tree_argument_list&); |
2982
|
79 }; |
|
80 |
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; End: *** |
|
87 */ |