Mercurial > octave
comparison libinterp/octave-value/ov-lazy-idx.h @ 30077:b16e0d357437
maint: use "m_" prefix for member variables in some octave-value classes.
* ov-cs-list.h, ov-cs-list.cc, ov-dld-fcn.h, ov-dld-fcn.cc,
ov-lazy-idx.h, ov-lazy-idx.cc, ov-oncleanup.h, ov-oncleanup.cc,
ov-perm.h, ov-perm.cc, ov-struct.h, ov-struct.cc, ov-typeinfo.h,
ov-typeinfo.cc: Use "m_" prefix for class member variables.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 30 Aug 2021 14:02:47 -0400 |
parents | 32f4357ac8d9 |
children | a2936935c7c8 |
comparison
equal
deleted
inserted
replaced
30076:43622407af81 | 30077:b16e0d357437 |
---|---|
38 octave_lazy_index : public octave_base_value | 38 octave_lazy_index : public octave_base_value |
39 { | 39 { |
40 public: | 40 public: |
41 | 41 |
42 octave_lazy_index (void) | 42 octave_lazy_index (void) |
43 : octave_base_value (), index (), value () { } | 43 : octave_base_value (), m_index (), m_value () { } |
44 | 44 |
45 octave_lazy_index (const octave::idx_vector& idx) | 45 octave_lazy_index (const octave::idx_vector& idx) |
46 : octave_base_value (), index (idx), value () { } | 46 : octave_base_value (), m_index (idx), m_value () { } |
47 | 47 |
48 octave_lazy_index (const octave_lazy_index& i) | 48 octave_lazy_index (const octave_lazy_index& i) |
49 : octave_base_value (), index (i.index), value (i.value) { } | 49 : octave_base_value (), m_index (i.m_index), m_value (i.m_value) { } |
50 | 50 |
51 ~octave_lazy_index (void) = default; | 51 ~octave_lazy_index (void) = default; |
52 | 52 |
53 octave_base_value * clone (void) const | 53 octave_base_value * clone (void) const |
54 { return new octave_lazy_index (*this); } | 54 { return new octave_lazy_index (*this); } |
65 octave_value squeeze (void) const; | 65 octave_value squeeze (void) const; |
66 | 66 |
67 octave_value full_value (void) const { return make_value (); } | 67 octave_value full_value (void) const { return make_value (); } |
68 | 68 |
69 octave::idx_vector index_vector (bool /* require_integers */ = false) const | 69 octave::idx_vector index_vector (bool /* require_integers */ = false) const |
70 { return index; } | 70 { return m_index; } |
71 | 71 |
72 builtin_type_t builtin_type (void) const { return btyp_double; } | 72 builtin_type_t builtin_type (void) const { return btyp_double; } |
73 | 73 |
74 bool is_real_matrix (void) const { return true; } | 74 bool is_real_matrix (void) const { return true; } |
75 | 75 |
94 | 94 |
95 octave_value do_index_op (const octave_value_list& idx, | 95 octave_value do_index_op (const octave_value_list& idx, |
96 bool resize_ok = false) | 96 bool resize_ok = false) |
97 { return make_value ().index_op (idx, resize_ok); } | 97 { return make_value ().index_op (idx, resize_ok); } |
98 | 98 |
99 dim_vector dims (void) const { return index.orig_dimensions (); } | 99 dim_vector dims (void) const { return m_index.orig_dimensions (); } |
100 | 100 |
101 octave_idx_type numel (void) const { return index.length (0); } | 101 octave_idx_type numel (void) const { return m_index.length (0); } |
102 | 102 |
103 octave_idx_type nnz (void) const { return numel (); } | 103 octave_idx_type nnz (void) const { return numel (); } |
104 | 104 |
105 octave_value reshape (const dim_vector& new_dims) const; | 105 octave_value reshape (const dim_vector& new_dims) const; |
106 | 106 |
254 | 254 |
255 private: | 255 private: |
256 | 256 |
257 const octave_value& make_value (void) const | 257 const octave_value& make_value (void) const |
258 { | 258 { |
259 if (value.is_undefined ()) | 259 if (m_value.is_undefined ()) |
260 value = octave_value (index, false); | 260 m_value = octave_value (m_index, false); |
261 | 261 |
262 return value; | 262 return m_value; |
263 } | 263 } |
264 | 264 |
265 octave_value& make_value (void) | 265 octave_value& make_value (void) |
266 { | 266 { |
267 if (value.is_undefined ()) | 267 if (m_value.is_undefined ()) |
268 value = octave_value (index, false); | 268 m_value = octave_value (m_index, false); |
269 | 269 |
270 return value; | 270 return m_value; |
271 } | 271 } |
272 | 272 |
273 octave::idx_vector index; | 273 octave::idx_vector m_index; |
274 mutable octave_value value; | 274 mutable octave_value m_value; |
275 | 275 |
276 static octave_base_value * | 276 static octave_base_value * |
277 numeric_conversion_function (const octave_base_value&); | 277 numeric_conversion_function (const octave_base_value&); |
278 | 278 |
279 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA | 279 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |