![]() |
Octave-Forge - Extra packages for GNU Octave |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 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_cs_list_h) 00024 #define octave_cs_list_h 1 00025 00026 #include <cstdlib> 00027 00028 #include <iosfwd> 00029 #include <string> 00030 00031 #include "mx-base.h" 00032 #include "str-vec.h" 00033 00034 #include "Cell.h" 00035 #include "error.h" 00036 #include "oct-alloc.h" 00037 #include "oct-obj.h" 00038 #include "ov-list.h" 00039 #include "ov-typeinfo.h" 00040 00041 class tree_walker; 00042 00043 // Lists. 00044 00045 class 00046 octave_cs_list : public octave_base_value 00047 { 00048 public: 00049 00050 octave_cs_list (void) 00051 : octave_base_value (), lst () { } 00052 00053 octave_cs_list (const octave_value_list& l) 00054 : octave_base_value (), lst (l) { } 00055 00056 octave_cs_list (const Cell& c); 00057 00058 octave_cs_list (const octave_cs_list& l) 00059 : octave_base_value (), lst (l.lst) { } 00060 00061 ~octave_cs_list (void) { } 00062 00063 octave_base_value *clone (void) const { return new octave_cs_list (*this); } 00064 octave_base_value *empty_clone (void) const { return new octave_cs_list (); } 00065 00066 dim_vector dims (void) const { return dim_vector (1, lst.length ()); } 00067 00068 bool is_defined (void) const { return true; } 00069 00070 bool is_constant (void) const { return true; } 00071 00072 bool is_cs_list (void) const { return true; } 00073 00074 octave_value_list list_value (void) const { return lst; } 00075 00076 private: 00077 00078 // The list of Octave values. 00079 octave_value_list lst; 00080 00081 DECLARE_OCTAVE_ALLOCATOR 00082 00083 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA 00084 }; 00085 00086 #endif 00087 00088 /* 00089 ;;; Local Variables: *** 00090 ;;; mode: C++ *** 00091 ;;; End: *** 00092 */