Mercurial > hg > octave-nkf
annotate src/ov-colon.h @ 10513:c5005bc2b7a9
implement working spalloc
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 13 Apr 2010 12:36:24 +0200 |
parents | cd96d29c5efa |
children | d9e57045b9e1 |
rev | line source |
---|---|
2376 | 1 /* |
2 | |
8920 | 3 Copyright (C) 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007, 2008 |
7017 | 4 John W. Eaton |
2376 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
2376 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
2376 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_magic_colon_h) | |
25 #define octave_magic_colon_h 1 | |
26 | |
27 #include <cstdlib> | |
28 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
29 #include <iosfwd> |
2376 | 30 #include <string> |
31 | |
32 #include "mx-base.h" | |
33 #include "str-vec.h" | |
34 | |
35 #include "error.h" | |
36 #include "ov-base.h" | |
37 #include "ov-typeinfo.h" | |
38 | |
39 class Octave_map; | |
40 class octave_value_list; | |
41 | |
42 class tree_walker; | |
43 | |
2477 | 44 // A type to represent `:' as used for indexing. |
2376 | 45 |
46 class | |
47 octave_magic_colon : public octave_base_value | |
48 { | |
49 public: | |
50 | |
51 octave_magic_colon (void) | |
52 : octave_base_value () { } | |
53 | |
54 octave_magic_colon (const octave_magic_colon&) | |
55 : octave_base_value () { } | |
56 | |
57 ~octave_magic_colon (void) { } | |
58 | |
5759 | 59 octave_base_value *clone (void) const { return new octave_magic_colon (*this); } |
60 octave_base_value *empty_clone (void) const { return new octave_magic_colon (); } | |
2376 | 61 |
62 idx_vector index_vector (void) const { return idx_vector (':'); } | |
63 | |
64 bool is_defined (void) const { return true; } | |
65 | |
2974 | 66 bool is_constant (void) const { return true; } |
67 | |
2376 | 68 bool is_magic_colon (void) const { return true; } |
69 | |
3523 | 70 void print (std::ostream& os, bool pr_as_read_syntax = false) const; |
2901 | 71 |
3523 | 72 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; |
2466 | 73 |
2376 | 74 private: |
75 | |
3219 | 76 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
2376 | 77 }; |
78 | |
79 #endif |