Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007, 2008 00004 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_magic_colon_h) 00025 #define octave_magic_colon_h 1 00026 00027 #include <cstdlib> 00028 00029 #include <iosfwd> 00030 #include <string> 00031 00032 #include "mx-base.h" 00033 #include "str-vec.h" 00034 00035 #include "error.h" 00036 #include "ov-base.h" 00037 #include "ov-typeinfo.h" 00038 00039 class Octave_map; 00040 class octave_value_list; 00041 00042 class tree_walker; 00043 00044 // A type to represent `:' as used for indexing. 00045 00046 class 00047 octave_magic_colon : public octave_base_value 00048 { 00049 public: 00050 00051 octave_magic_colon (void) 00052 : octave_base_value () { } 00053 00054 octave_magic_colon (const octave_magic_colon&) 00055 : octave_base_value () { } 00056 00057 ~octave_magic_colon (void) { } 00058 00059 octave_base_value *clone (void) const { return new octave_magic_colon (*this); } 00060 octave_base_value *empty_clone (void) const { return new octave_magic_colon (); } 00061 00062 idx_vector index_vector (void) const { return idx_vector (':'); } 00063 00064 bool is_defined (void) const { return true; } 00065 00066 bool is_constant (void) const { return true; } 00067 00068 bool is_magic_colon (void) const { return true; } 00069 00070 void print (std::ostream& os, bool pr_as_read_syntax = false) const; 00071 00072 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; 00073 00074 private: 00075 00076 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA 00077 }; 00078 00079 #endif 00080 00081 /* 00082 ;;; Local Variables: *** 00083 ;;; mode: C++ *** 00084 ;;; End: *** 00085 */