GNU Octave  6.2.0
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-2021 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_ov_null_mat_h)
27 #define octave_ov_null_mat_h 1
28 
29 #include "octave-config.h"
30 
31 #include "ov.h"
32 #include "ov-re-mat.h"
33 #include "ov-str-mat.h"
34 
35 // Design rationale:
36 // The constructors are hidden. There is only one null matrix (or null string)
37 // object, that can have shallow copies. Cloning the object returns just a
38 // normal empty matrix, so all the shallow copies are, in fact, read-only.
39 // This conveniently ensures that any attempt to fiddle with the null matrix
40 // destroys its special status.
41 
42 // The special [] value.
43 
44 class
45 OCTINTERP_API
47 {
49 
50 public:
51 
52  static const octave_value instance;
53 
54  bool isnull (void) const { return true; }
55 
56  type_conv_info numeric_conversion_function (void) const;
57 
58 private:
59 
61 };
62 
63 // The special "" value
64 
65 class
66 OCTINTERP_API
68 {
70 
71 public:
72 
73  static const octave_value instance;
74 
75  bool isnull (void) const { return true; }
76 
77  type_conv_info numeric_conversion_function (void) const;
78 
79 private:
80 
82 };
83 
84 // The special '' value
85 
86 class
87 OCTINTERP_API
89 {
91 
92 public:
93 
94  static const octave_value instance;
95 
96  bool isnull (void) const { return true; }
97 
98  type_conv_info numeric_conversion_function (void) const;
99 
100 private:
101 
103 };
104 
105 #endif
static const octave_value instance
Definition: ov-null-mat.h:52
bool isnull(void) const
Definition: ov-null-mat.h:54
octave_null_matrix(void)
Definition: ov-null-mat.h:48
octave_null_sq_str(void)
Definition: ov-null-mat.h:90
static const octave_value instance
Definition: ov-null-mat.h:94
bool isnull(void) const
Definition: ov-null-mat.h:96
bool isnull(void) const
Definition: ov-null-mat.h:75
static const octave_value instance
Definition: ov-null-mat.h:73
octave_null_str(void)
Definition: ov-null-mat.h:69
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:158