Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 00004 2007, 2008, 2009 John W. Eaton 00005 00006 This file is part of Octave. 00007 00008 Octave is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU General Public License as published by the 00010 Free Software Foundation; either version 3 of the License, or (at your 00011 option) any later version. 00012 00013 Octave is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00015 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00016 for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with Octave; see the file COPYING. If not, see 00020 <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #if !defined (octave_tree_mat_h) 00025 #define octave_tree_mat_h 1 00026 00027 #include <iosfwd> 00028 00029 class octave_value; 00030 class octave_value_list; 00031 class tree_argument_list; 00032 00033 class tree_walker; 00034 00035 #include "base-list.h" 00036 #include "pt-exp.h" 00037 #include "symtab.h" 00038 00039 // General matrices. This allows us to construct matrices from 00040 // other matrices, variables, and functions. 00041 00042 class 00043 tree_matrix : public tree_expression, 00044 public octave_base_list<tree_argument_list *> 00045 { 00046 public: 00047 00048 tree_matrix (tree_argument_list *row = 0, int l = -1, int c = -1) 00049 : tree_expression (l, c) 00050 { 00051 if (row) 00052 append (row); 00053 } 00054 00055 ~tree_matrix (void); 00056 00057 bool has_magic_end (void) const; 00058 00059 bool all_elements_are_constant (void) const; 00060 00061 bool rvalue_ok (void) const { return true; } 00062 00063 octave_value rvalue1 (int nargout = 1); 00064 00065 octave_value_list rvalue (int nargout); 00066 00067 tree_expression *dup (symbol_table::scope_id scope, 00068 symbol_table::context_id context) const; 00069 00070 void accept (tree_walker& tw); 00071 00072 private: 00073 00074 // No copying! 00075 00076 tree_matrix (const tree_matrix&); 00077 00078 tree_matrix& operator = (const tree_matrix&); 00079 }; 00080 00081 // The character to fill with when creating string arrays. 00082 extern char Vstring_fill_char; 00083 00084 extern std::string 00085 get_concat_class (const std::string& c1, const std::string& c2); 00086 00087 extern void 00088 maybe_warn_string_concat (bool all_dq_strings_p, bool all_sq_strings_p); 00089 00090 extern std::string 00091 get_concat_class (const std::string& c1, const std::string& c2); 00092 00093 extern void 00094 maybe_warn_string_concat (bool all_dq_strings_p, bool all_sq_strings_p); 00095 00096 #endif 00097 00098 /* 00099 ;;; Local Variables: *** 00100 ;;; mode: C++ *** 00101 ;;; End: *** 00102 */