Mercurial > hg > octave-lyh
comparison libinterp/octave-value/ov-base-int.h @ 15195:2fc554ffbc28
split libinterp from src
* libinterp: New directory. Move all files from src directory here
except Makefile.am, main.cc, main-cli.cc, mkoctfile.in.cc,
mkoctfilr.in.sh, octave-config.in.cc, octave-config.in.sh.
* libinterp/Makefile.am: New file, extracted from src/Makefile.am.
* src/Makefile.am: Delete everything except targets and definitions
needed to build and link main and utility programs.
* Makefile.am (SUBDIRS): Include libinterp in the list.
* autogen.sh: Run config-module.sh in libinterp/dldfcn directory, not
src/dldfcn directory.
* configure.ac (AC_CONFIG_SRCDIR): Use libinterp/octave.cc, not
src/octave.cc.
(DL_LDFLAGS, LIBOCTINTERP): Use libinterp, not src.
(AC_CONFIG_FILES): Include libinterp/Makefile in the list.
* find-docstring-files.sh: Look in libinterp, not src.
* gui/src/Makefile.am (liboctgui_la_CPPFLAGS): Find header files in
libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 16:23:39 -0400 |
parents | src/octave-value/ov-base-int.h@46b19589b593 |
children |
comparison
equal
deleted
inserted
replaced
15194:0f0b795044c3 | 15195:2fc554ffbc28 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 2004-2012 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 3 of the License, or (at your | |
10 option) any 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, see | |
19 <http://www.gnu.org/licenses/>. | |
20 | |
21 */ | |
22 | |
23 #if !defined (octave_base_int_matrix_h) | |
24 #define octave_base_int_matrix_h 1 | |
25 | |
26 #include <cstdlib> | |
27 | |
28 #include <iosfwd> | |
29 #include <string> | |
30 | |
31 #include "mx-base.h" | |
32 #include "oct-alloc.h" | |
33 #include "str-vec.h" | |
34 | |
35 #include "error.h" | |
36 #include "ov-base.h" | |
37 #include "ov-base-mat.h" | |
38 #include "ov-base-scalar.h" | |
39 #include "ov-typeinfo.h" | |
40 | |
41 // base int matrix values. | |
42 | |
43 template <class T> | |
44 class | |
45 octave_base_int_matrix : public octave_base_matrix<T> | |
46 { | |
47 public: | |
48 | |
49 octave_base_int_matrix (void) : octave_base_matrix<T> () { } | |
50 | |
51 octave_base_int_matrix (const T& nda) : octave_base_matrix<T> (nda) { } | |
52 | |
53 ~octave_base_int_matrix (void) { } | |
54 | |
55 octave_base_value *clone (void) const { return new octave_base_int_matrix (*this); } | |
56 octave_base_value *empty_clone (void) const { return new octave_base_int_matrix (); } | |
57 | |
58 octave_base_value *try_narrowing_conversion (void); | |
59 | |
60 bool is_real_type (void) const { return true; } | |
61 | |
62 // void increment (void) { matrix += 1; } | |
63 | |
64 // void decrement (void) { matrix -= 1; } | |
65 | |
66 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; | |
67 | |
68 octave_value convert_to_str_internal (bool, bool, char type) const; | |
69 | |
70 bool save_ascii (std::ostream& os); | |
71 | |
72 bool load_ascii (std::istream& is); | |
73 | |
74 bool save_binary (std::ostream& os, bool& ); | |
75 | |
76 bool load_binary (std::istream& is, bool swap, | |
77 oct_mach_info::float_format ); | |
78 | |
79 #if defined (HAVE_HDF5) | |
80 bool save_hdf5 (hid_t loc_id, const char *name, bool); | |
81 | |
82 bool load_hdf5 (hid_t loc_id, const char *name); | |
83 #endif | |
84 }; | |
85 | |
86 // base int scalar values. | |
87 | |
88 template <class T> | |
89 class | |
90 octave_base_int_scalar : public octave_base_scalar<T> | |
91 { | |
92 public: | |
93 | |
94 octave_base_int_scalar (void) : octave_base_scalar<T> () { } | |
95 | |
96 octave_base_int_scalar (const T& s) : octave_base_scalar<T> (s) { } | |
97 | |
98 ~octave_base_int_scalar (void) { } | |
99 | |
100 octave_base_value *clone (void) const { return new octave_base_int_scalar (*this); } | |
101 octave_base_value *empty_clone (void) const { return new octave_base_int_scalar (); } | |
102 | |
103 octave_base_value *try_narrowing_conversion (void) { return 0; } | |
104 | |
105 bool is_real_type (void) const { return true; } | |
106 | |
107 // void increment (void) { scalar += 1; } | |
108 | |
109 // void decrement (void) { scalar -= 1; } | |
110 | |
111 octave_value convert_to_str_internal (bool, bool, char type) const; | |
112 | |
113 bool save_ascii (std::ostream& os); | |
114 | |
115 bool load_ascii (std::istream& is); | |
116 | |
117 bool save_binary (std::ostream& os, bool& ); | |
118 | |
119 bool load_binary (std::istream& is, bool swap, | |
120 oct_mach_info::float_format ); | |
121 | |
122 #if defined (HAVE_HDF5) | |
123 bool save_hdf5 (hid_t loc_id, const char *name, bool ); | |
124 | |
125 bool load_hdf5 (hid_t loc_id, const char *name); | |
126 #endif | |
127 }; | |
128 | |
129 #endif |