GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ov-null-mat.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2008-2017 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 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_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
44 {
46 
47 public:
48 
49  static const octave_value instance;
50 
51  bool is_null_value (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
65 {
67 
68 public:
69 
70  static const octave_value instance;
71 
72  bool is_null_value (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
86 {
88 
89 public:
90 
91  static const octave_value instance;
92 
93  bool is_null_value (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
bool is_null_value(void) const
Definition: ov-null-mat.h:51
octave_null_str(void)
Definition: ov-null-mat.h:66
bool is_null_value(void) const
Definition: ov-null-mat.h:93
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:148
static const octave_value instance
Definition: ov-null-mat.h:91
octave_null_sq_str(void)
Definition: ov-null-mat.h:87
#define OCTINTERP_API
Definition: mexproto.h:69
static const octave_value instance
Definition: ov-null-mat.h:49
bool is_null_value(void) const
Definition: ov-null-mat.h:72
octave_null_matrix(void)
Definition: ov-null-mat.h:45