GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov-null-mat.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2008-2018 Jaroslav Hajek
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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_ov_null_mat_h)
24 #define octave_ov_null_mat_h 1
25 
26 #include "octave-config.h"
27 
28 #include "ov.h"
29 #include "ov-re-mat.h"
30 #include "ov-str-mat.h"
31 
32 // Design rationale:
33 // The constructors are hidden. There is only one null matrix (or null string)
34 // object, that can have shallow copies. Cloning the object returns just a
35 // normal empty matrix, so all the shallow copies are, in fact, read-only.
36 // This conveniently ensures that any attempt to fiddle with the null matrix
37 // destroys its special status.
38 
39 // The special [] value.
40 
41 class
42 OCTINTERP_API
44 {
46 
47 public:
48 
49  static const octave_value instance;
50 
51  bool isnull (void) const { return true; }
52 
53  type_conv_info numeric_conversion_function (void) const;
54 
55 private:
56 
58 };
59 
60 // The special "" value
61 
62 class
63 OCTINTERP_API
65 {
67 
68 public:
69 
70  static const octave_value instance;
71 
72  bool isnull (void) const { return true; }
73 
74  type_conv_info numeric_conversion_function (void) const;
75 
76 private:
77 
79 };
80 
81 // The special '' value
82 
83 class
84 OCTINTERP_API
86 {
88 
89 public:
90 
91  static const octave_value instance;
92 
93  bool isnull (void) const { return true; }
94 
95  type_conv_info numeric_conversion_function (void) const;
96 
97 private:
98 
100 };
101 
102 #endif
static const octave_value instance
Definition: ov-null-mat.h:70
octave_null_str(void)
Definition: ov-null-mat.h:66
bool isnull(void) const
Definition: ov-null-mat.h:93
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:158
static const octave_value instance
Definition: ov-null-mat.h:91
octave_null_sq_str(void)
Definition: ov-null-mat.h:87
static const octave_value instance
Definition: ov-null-mat.h:49
bool isnull(void) const
Definition: ov-null-mat.h:72
bool isnull(void) const
Definition: ov-null-mat.h:51
octave_null_matrix(void)
Definition: ov-null-mat.h:45