4904
|
1 /* |
|
2 |
|
3 Copyright (C) 2004 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #include <cstdlib> |
|
24 |
|
25 #include <iostream> |
|
26 #include <string> |
|
27 |
|
28 #include "mx-base.h" |
|
29 #include "oct-alloc.h" |
|
30 #include "so-array.h" |
|
31 #include "str-vec.h" |
|
32 |
|
33 #include "error.h" |
|
34 #include "ov-base.h" |
|
35 #include "ov-base-int.h" |
|
36 #include "ov-typeinfo.h" |
|
37 |
|
38 class |
|
39 OCTAVE_VALUE_INT_MATRIX_T |
|
40 : public octave_base_int_matrix<OCTAVE_INT_NDARRAY_T> |
|
41 { |
|
42 public: |
|
43 |
|
44 OCTAVE_VALUE_INT_MATRIX_T (void) |
|
45 : octave_base_int_matrix<OCTAVE_INT_NDARRAY_T> () { } |
|
46 |
|
47 OCTAVE_VALUE_INT_MATRIX_T (const OCTAVE_INT_NDARRAY_T& nda) |
|
48 : octave_base_int_matrix<OCTAVE_INT_NDARRAY_T> (nda) { } |
|
49 |
|
50 ~OCTAVE_VALUE_INT_MATRIX_T (void) { } |
|
51 |
|
52 octave_value * |
|
53 clone (void) const |
|
54 { return new OCTAVE_VALUE_INT_MATRIX_T (*this); } |
|
55 |
|
56 octave_value * |
|
57 empty_clone (void) const |
|
58 { return new OCTAVE_VALUE_INT_MATRIX_T (); } |
|
59 |
|
60 OCTAVE_INT_NDARRAY_T |
|
61 OCTAVE_VALUE_INT_NDARRAY_EXTRACTOR_FUNCTION (bool = false) const |
|
62 { return matrix; } |
|
63 |
|
64 private: |
|
65 |
|
66 DECLARE_OCTAVE_ALLOCATOR |
|
67 |
|
68 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
|
69 }; |
|
70 |
|
71 class |
|
72 OCTAVE_VALUE_INT_SCALAR_T |
|
73 : public octave_base_int_scalar<OCTAVE_INT_T> |
|
74 { |
|
75 public: |
|
76 |
|
77 OCTAVE_VALUE_INT_SCALAR_T (void) |
|
78 : octave_base_int_scalar<OCTAVE_INT_T> () { } |
|
79 |
|
80 OCTAVE_VALUE_INT_SCALAR_T (const OCTAVE_INT_T& nda) |
|
81 : octave_base_int_scalar<OCTAVE_INT_T> (nda) { } |
|
82 |
|
83 ~OCTAVE_VALUE_INT_SCALAR_T (void) { } |
|
84 |
|
85 octave_value * |
|
86 clone (void) const |
|
87 { return new OCTAVE_VALUE_INT_SCALAR_T (*this); } |
|
88 |
|
89 octave_value * |
|
90 empty_clone (void) const |
|
91 { return new OCTAVE_VALUE_INT_SCALAR_T (); } |
|
92 |
|
93 OCTAVE_INT_T |
|
94 OCTAVE_VALUE_INT_SCALAR_EXTRACTOR_FUNCTION (bool = false) const |
|
95 { return scalar; } |
|
96 |
|
97 OCTAVE_INT_NDARRAY_T |
|
98 OCTAVE_VALUE_INT_NDARRAY_EXTRACTOR_FUNCTION (bool = false) const |
|
99 { return scalar; } |
|
100 |
|
101 private: |
|
102 |
|
103 DECLARE_OCTAVE_ALLOCATOR |
|
104 |
|
105 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
|
106 }; |
|
107 |
|
108 /* |
|
109 ;;; Local Variables: *** |
|
110 ;;; mode: C++ *** |
|
111 ;;; End: *** |
|
112 */ |