pt-mat.h

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