Mercurial > octave
diff libinterp/octave-value/ov.h @ 30128:5616702bffac
maint: use "m_" prefix for member variable "m_rep" in class octave_value.
ov.h, ov.cc: use "m_" prefix for member variable "m_rep" in class octave_value.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 06 Sep 2021 12:32:56 -0700 |
parents | 18d98ccee2b0 |
children | 938794bc82b7 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h Mon Sep 06 11:49:02 2021 -0700 +++ b/libinterp/octave-value/ov.h Mon Sep 06 12:32:56 2021 -0700 @@ -168,9 +168,9 @@ enum magic_colon { magic_colon_t }; octave_value (void) - : rep (nil_rep ()) + : m_rep (nil_rep ()) { - rep->count++; + m_rep->count++; } OCTINTERP_API octave_value (short int i); @@ -303,14 +303,14 @@ #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead") OCTINTERP_API octave_value (double base, double limit, double inc) - : rep (make_range_rep_deprecated (base, inc, limit)) + : m_rep (make_range_rep_deprecated (base, inc, limit)) { maybe_mutate (); } OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead") OCTINTERP_API octave_value (const Range& r, bool force_range = false) - : rep (make_range_rep_deprecated (r, force_range)) + : m_rep (make_range_rep_deprecated (r, force_range)) { maybe_mutate (); } @@ -357,15 +357,15 @@ // Copy constructor. octave_value (const octave_value& a) - : rep (a.rep) + : m_rep (a.m_rep) { - rep->count++; + m_rep->count++; } octave_value (octave_value&& a) - : rep (a.rep) + : m_rep (a.m_rep) { - a.rep = nullptr; + a.m_rep = nullptr; } // This should only be called for derived types. @@ -373,7 +373,7 @@ OCTINTERP_API octave_base_value * clone (void) const; octave_base_value * empty_clone (void) const - { return rep->empty_clone (); } + { return m_rep->empty_clone (); } // Delete the representation of this constant if the count drops to zero. @@ -383,20 +383,20 @@ // operator, rep may be a nullptr here. We should only need to // protect the move assignment operator in a similar way. - if (rep && --rep->count == 0 && rep != nil_rep ()) - delete rep; + if (m_rep && --m_rep->count == 0 && m_rep != nil_rep ()) + delete m_rep; } void make_unique (void) { - if (rep->count > 1) + if (m_rep->count > 1) { - octave_base_value *r = rep->unique_clone (); + octave_base_value *r = m_rep->unique_clone (); - if (--rep->count == 0 && rep != nil_rep ()) - delete rep; + if (--m_rep->count == 0 && m_rep != nil_rep ()) + delete m_rep; - rep = r; + m_rep = r; } } @@ -405,14 +405,14 @@ // know a certain copy, typically within a cell array, to be obsolete. void make_unique (int obsolete_copies) { - if (rep->count > obsolete_copies + 1) + if (m_rep->count > obsolete_copies + 1) { - octave_base_value *r = rep->unique_clone (); + octave_base_value *r = m_rep->unique_clone (); - if (--rep->count == 0 && rep != nil_rep ()) - delete rep; + if (--m_rep->count == 0 && m_rep != nil_rep ()) + delete m_rep; - rep = r; + m_rep = r; } } @@ -426,13 +426,13 @@ octave_value& operator = (const octave_value& a) { - if (rep != a.rep) + if (m_rep != a.m_rep) { - if (--rep->count == 0 && rep != nil_rep ()) - delete rep; + if (--m_rep->count == 0 && m_rep != nil_rep ()) + delete m_rep; - rep = a.rep; - rep->count++; + m_rep = a.m_rep; + m_rep->count++; } return *this; @@ -446,59 +446,59 @@ if (this != &a) { - if (rep && --rep->count == 0 && rep != nil_rep ()) - delete rep; + if (m_rep && --m_rep->count == 0 && m_rep != nil_rep ()) + delete m_rep; - rep = a.rep; - a.rep = nullptr; + m_rep = a.m_rep; + a.m_rep = nullptr; } return *this; } - octave_idx_type get_count (void) const { return rep->count; } + octave_idx_type get_count (void) const { return m_rep->count; } octave_base_value::type_conv_info numeric_conversion_function (void) const - { return rep->numeric_conversion_function (); } + { return m_rep->numeric_conversion_function (); } octave_base_value::type_conv_info numeric_demotion_function (void) const - { return rep->numeric_demotion_function (); } + { return m_rep->numeric_demotion_function (); } OCTINTERP_API void maybe_mutate (void); octave_value squeeze (void) const - { return rep->squeeze (); } + { return m_rep->squeeze (); } // The result of full(). octave_value full_value (void) const - { return rep->full_value (); } + { return m_rep->full_value (); } // Type conversions. - octave_value as_double (void) const { return rep->as_double (); } - octave_value as_single (void) const { return rep->as_single (); } + octave_value as_double (void) const { return m_rep->as_double (); } + octave_value as_single (void) const { return m_rep->as_single (); } - octave_value as_int8 (void) const { return rep->as_int8 (); } - octave_value as_int16 (void) const { return rep->as_int16 (); } - octave_value as_int32 (void) const { return rep->as_int32 (); } - octave_value as_int64 (void) const { return rep->as_int64 (); } + octave_value as_int8 (void) const { return m_rep->as_int8 (); } + octave_value as_int16 (void) const { return m_rep->as_int16 (); } + octave_value as_int32 (void) const { return m_rep->as_int32 (); } + octave_value as_int64 (void) const { return m_rep->as_int64 (); } - octave_value as_uint8 (void) const { return rep->as_uint8 (); } - octave_value as_uint16 (void) const { return rep->as_uint16 (); } - octave_value as_uint32 (void) const { return rep->as_uint32 (); } - octave_value as_uint64 (void) const { return rep->as_uint64 (); } + octave_value as_uint8 (void) const { return m_rep->as_uint8 (); } + octave_value as_uint16 (void) const { return m_rep->as_uint16 (); } + octave_value as_uint32 (void) const { return m_rep->as_uint32 (); } + octave_value as_uint64 (void) const { return m_rep->as_uint64 (); } octave_base_value * try_narrowing_conversion (void) - { return rep->try_narrowing_conversion (); } + { return m_rep->try_narrowing_conversion (); } // Close to dims (), but can be overloaded for classes. Matrix size (void) - { return rep->size (); } + { return m_rep->size (); } // FIXME: should this function be deprecated and removed? It supports // an undocumented feature of Matlab. octave_idx_type xnumel (const octave_value_list& idx) - { return rep->xnumel (idx); } + { return m_rep->xnumel (idx); } // FIXME: Do we really need all these different versions of subsref // and related functions? @@ -508,12 +508,12 @@ octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx) - { return rep->subsref (type, idx); } + { return m_rep->subsref (type, idx); } octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx, bool auto_add) - { return rep->subsref (type, idx, auto_add); } + { return m_rep->subsref (type, idx, auto_add); } OCTINTERP_API octave_value_list subsref (const std::string& type, const std::list<octave_value_list>& idx, @@ -533,7 +533,7 @@ octave_value index_op (const octave_value_list& idx, bool resize_ok = false) { - return rep->do_index_op (idx, resize_ok); + return m_rep->do_index_op (idx, resize_ok); } #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) @@ -562,22 +562,22 @@ octave::idx_vector index_vector (bool require_integers = false) const { - return rep->index_vector (require_integers); + return m_rep->index_vector (require_integers); } // Size. - dim_vector dims (void) const { return rep->dims (); } + dim_vector dims (void) const { return m_rep->dims (); } OCTINTERP_API std::string get_dims_str (void) const; - octave_idx_type rows (void) const { return rep->rows (); } + octave_idx_type rows (void) const { return m_rep->rows (); } - octave_idx_type columns (void) const { return rep->columns (); } + octave_idx_type columns (void) const { return m_rep->columns (); } OCTINTERP_API octave_idx_type length (void) const; - int ndims (void) const { return rep->ndims (); } + int ndims (void) const { return m_rep->ndims (); } bool all_zero_dims (void) const { return dims ().all_zero (); } @@ -586,242 +586,242 @@ { return (ndims () == 2 && rows () == 0 && columns () == 0); } octave_idx_type numel (void) const - { return rep->numel (); } + { return m_rep->numel (); } std::size_t byte_size (void) const - { return rep->byte_size (); } + { return m_rep->byte_size (); } - octave_idx_type nnz (void) const { return rep->nnz (); } + octave_idx_type nnz (void) const { return m_rep->nnz (); } - octave_idx_type nzmax (void) const { return rep->nzmax (); } + octave_idx_type nzmax (void) const { return m_rep->nzmax (); } - octave_idx_type nfields (void) const { return rep->nfields (); } + octave_idx_type nfields (void) const { return m_rep->nfields (); } octave_value reshape (const dim_vector& dv) const - { return rep->reshape (dv); } + { return m_rep->reshape (dv); } octave_value permute (const Array<int>& vec, bool inv = false) const - { return rep->permute (vec, inv); } + { return m_rep->permute (vec, inv); } octave_value ipermute (const Array<int>& vec) const - { return rep->permute (vec, true); } + { return m_rep->permute (vec, true); } octave_value resize (const dim_vector& dv, bool fill = false) const - { return rep->resize (dv, fill);} + { return m_rep->resize (dv, fill);} MatrixType matrix_type (void) const - { return rep->matrix_type (); } + { return m_rep->matrix_type (); } MatrixType matrix_type (const MatrixType& typ) const - { return rep->matrix_type (typ); } + { return m_rep->matrix_type (typ); } // Does this constant have a type? Both of these are provided since it is // sometimes more natural to write is_undefined() instead of ! is_defined(). bool is_defined (void) const - { return rep->is_defined (); } + { return m_rep->is_defined (); } bool is_undefined (void) const { return ! is_defined (); } bool isempty (void) const - { return rep->isempty (); } + { return m_rep->isempty (); } bool iscell (void) const - { return rep->iscell (); } + { return m_rep->iscell (); } bool iscellstr (void) const - { return rep->iscellstr (); } + { return m_rep->iscellstr (); } bool is_real_scalar (void) const - { return rep->is_real_scalar (); } + { return m_rep->is_real_scalar (); } bool is_real_matrix (void) const - { return rep->is_real_matrix (); } + { return m_rep->is_real_matrix (); } bool is_complex_scalar (void) const - { return rep->is_complex_scalar (); } + { return m_rep->is_complex_scalar (); } bool is_complex_matrix (void) const - { return rep->is_complex_matrix (); } + { return m_rep->is_complex_matrix (); } bool is_bool_scalar (void) const - { return rep->is_bool_scalar (); } + { return m_rep->is_bool_scalar (); } bool is_bool_matrix (void) const - { return rep->is_bool_matrix (); } + { return m_rep->is_bool_matrix (); } bool is_char_matrix (void) const - { return rep->is_char_matrix (); } + { return m_rep->is_char_matrix (); } bool is_diag_matrix (void) const - { return rep->is_diag_matrix (); } + { return m_rep->is_diag_matrix (); } bool is_perm_matrix (void) const - { return rep->is_perm_matrix (); } + { return m_rep->is_perm_matrix (); } bool is_string (void) const - { return rep->is_string (); } + { return m_rep->is_string (); } bool is_sq_string (void) const - { return rep->is_sq_string (); } + { return m_rep->is_sq_string (); } bool is_dq_string (void) const - { return rep->is_string () && ! rep->is_sq_string (); } + { return m_rep->is_string () && ! m_rep->is_sq_string (); } bool is_range (void) const - { return rep->is_range (); } + { return m_rep->is_range (); } bool isstruct (void) const - { return rep->isstruct (); } + { return m_rep->isstruct (); } bool is_classdef_meta (void) const - { return rep->is_classdef_meta (); } + { return m_rep->is_classdef_meta (); } bool is_classdef_object (void) const - { return rep->is_classdef_object (); } + { return m_rep->is_classdef_object (); } bool is_classdef_superclass_ref (void) const - { return rep->is_classdef_superclass_ref (); } + { return m_rep->is_classdef_superclass_ref (); } bool is_package (void) const - { return rep->is_package (); } + { return m_rep->is_package (); } bool isobject (void) const - { return rep->isobject (); } + { return m_rep->isobject (); } bool isjava (void) const - { return rep->isjava (); } + { return m_rep->isjava (); } bool is_cs_list (void) const - { return rep->is_cs_list (); } + { return m_rep->is_cs_list (); } bool is_magic_colon (void) const - { return rep->is_magic_colon (); } + { return m_rep->is_magic_colon (); } bool is_magic_int (void) const - { return rep->is_magic_int (); } + { return m_rep->is_magic_int (); } bool isnull (void) const - { return rep->isnull (); } + { return m_rep->isnull (); } // Are any or all of the elements in this constant nonzero? octave_value all (int dim = 0) const - { return rep->all (dim); } + { return m_rep->all (dim); } octave_value any (int dim = 0) const - { return rep->any (dim); } + { return m_rep->any (dim); } builtin_type_t builtin_type (void) const - { return rep->builtin_type (); } + { return m_rep->builtin_type (); } // Floating point types. bool is_double_type (void) const - { return rep->is_double_type (); } + { return m_rep->is_double_type (); } bool is_single_type (void) const - { return rep->is_single_type (); } + { return m_rep->is_single_type (); } bool isfloat (void) const - { return rep->isfloat (); } + { return m_rep->isfloat (); } // Integer types. bool is_int8_type (void) const - { return rep->is_int8_type (); } + { return m_rep->is_int8_type (); } bool is_int16_type (void) const - { return rep->is_int16_type (); } + { return m_rep->is_int16_type (); } bool is_int32_type (void) const - { return rep->is_int32_type (); } + { return m_rep->is_int32_type (); } bool is_int64_type (void) const - { return rep->is_int64_type (); } + { return m_rep->is_int64_type (); } bool is_uint8_type (void) const - { return rep->is_uint8_type (); } + { return m_rep->is_uint8_type (); } bool is_uint16_type (void) const - { return rep->is_uint16_type (); } + { return m_rep->is_uint16_type (); } bool is_uint32_type (void) const - { return rep->is_uint32_type (); } + { return m_rep->is_uint32_type (); } bool is_uint64_type (void) const - { return rep->is_uint64_type (); } + { return m_rep->is_uint64_type (); } bool isinteger (void) const - { return rep->isinteger (); } + { return m_rep->isinteger (); } // Other type stuff. bool islogical (void) const - { return rep->islogical (); } + { return m_rep->islogical (); } bool isreal (void) const - { return rep->isreal (); } + { return m_rep->isreal (); } bool iscomplex (void) const - { return rep->iscomplex (); } + { return m_rep->iscomplex (); } bool is_scalar_type (void) const - { return rep->is_scalar_type (); } + { return m_rep->is_scalar_type (); } bool is_matrix_type (void) const - { return rep->is_matrix_type (); } + { return m_rep->is_matrix_type (); } bool isnumeric (void) const - { return rep->isnumeric (); } + { return m_rep->isnumeric (); } bool issparse (void) const - { return rep->issparse (); } + { return m_rep->issparse (); } // Does this constant correspond to a truth value? bool is_true (void) const - { return rep->is_true (); } + { return m_rep->is_true (); } // Do two constants match (in a switch statement)? bool is_equal (const octave_value&) const; bool is_constant (void) const - { return rep->is_constant (); } + { return m_rep->is_constant (); } bool is_function_handle (void) const - { return rep->is_function_handle (); } + { return m_rep->is_function_handle (); } bool is_anonymous_function (void) const - { return rep->is_anonymous_function (); } + { return m_rep->is_anonymous_function (); } bool is_inline_function (void) const - { return rep->is_inline_function (); } + { return m_rep->is_inline_function (); } bool is_function (void) const - { return rep->is_function (); } + { return m_rep->is_function (); } bool is_user_script (void) const - { return rep->is_user_script (); } + { return m_rep->is_user_script (); } bool is_user_function (void) const - { return rep->is_user_function (); } + { return m_rep->is_user_function (); } bool is_user_code (void) const - { return rep->is_user_code (); } + { return m_rep->is_user_code (); } bool is_builtin_function (void) const - { return rep->is_builtin_function (); } + { return m_rep->is_builtin_function (); } bool is_dld_function (void) const - { return rep->is_dld_function (); } + { return m_rep->is_dld_function (); } bool is_mex_function (void) const - { return rep->is_mex_function (); } + { return m_rep->is_mex_function (); } - void erase_subfunctions (void) { rep->erase_subfunctions (); } + void erase_subfunctions (void) { m_rep->erase_subfunctions (); } // Values. @@ -829,237 +829,237 @@ short int short_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->short_value (req_int, frc_str_conv); } + { return m_rep->short_value (req_int, frc_str_conv); } unsigned short int ushort_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->ushort_value (req_int, frc_str_conv); } + { return m_rep->ushort_value (req_int, frc_str_conv); } int int_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->int_value (req_int, frc_str_conv); } + { return m_rep->int_value (req_int, frc_str_conv); } unsigned int uint_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->uint_value (req_int, frc_str_conv); } + { return m_rep->uint_value (req_int, frc_str_conv); } int nint_value (bool frc_str_conv = false) const - { return rep->nint_value (frc_str_conv); } + { return m_rep->nint_value (frc_str_conv); } long int long_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->long_value (req_int, frc_str_conv); } + { return m_rep->long_value (req_int, frc_str_conv); } unsigned long int ulong_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->ulong_value (req_int, frc_str_conv); } + { return m_rep->ulong_value (req_int, frc_str_conv); } int64_t int64_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->int64_value (req_int, frc_str_conv); } + { return m_rep->int64_value (req_int, frc_str_conv); } uint64_t uint64_value (bool req_int = false, bool frc_str_conv = false) const - { return rep->uint64_value (req_int, frc_str_conv); } + { return m_rep->uint64_value (req_int, frc_str_conv); } octave_idx_type idx_type_value (bool req_int = false, bool frc_str_conv = false) const; double double_value (bool frc_str_conv = false) const - { return rep->double_value (frc_str_conv); } + { return m_rep->double_value (frc_str_conv); } float float_value (bool frc_str_conv = false) const - { return rep->float_value (frc_str_conv); } + { return m_rep->float_value (frc_str_conv); } double scalar_value (bool frc_str_conv = false) const - { return rep->scalar_value (frc_str_conv); } + { return m_rep->scalar_value (frc_str_conv); } float float_scalar_value (bool frc_str_conv = false) const - { return rep->float_scalar_value (frc_str_conv); } + { return m_rep->float_scalar_value (frc_str_conv); } Matrix matrix_value (bool frc_str_conv = false) const - { return rep->matrix_value (frc_str_conv); } + { return m_rep->matrix_value (frc_str_conv); } FloatMatrix float_matrix_value (bool frc_str_conv = false) const - { return rep->float_matrix_value (frc_str_conv); } + { return m_rep->float_matrix_value (frc_str_conv); } NDArray array_value (bool frc_str_conv = false) const - { return rep->array_value (frc_str_conv); } + { return m_rep->array_value (frc_str_conv); } FloatNDArray float_array_value (bool frc_str_conv = false) const - { return rep->float_array_value (frc_str_conv); } + { return m_rep->float_array_value (frc_str_conv); } Complex complex_value (bool frc_str_conv = false) const - { return rep->complex_value (frc_str_conv); } + { return m_rep->complex_value (frc_str_conv); } FloatComplex float_complex_value (bool frc_str_conv = false) const - { return rep->float_complex_value (frc_str_conv); } + { return m_rep->float_complex_value (frc_str_conv); } ComplexMatrix complex_matrix_value (bool frc_str_conv = false) const - { return rep->complex_matrix_value (frc_str_conv); } + { return m_rep->complex_matrix_value (frc_str_conv); } FloatComplexMatrix float_complex_matrix_value (bool frc_str_conv = false) const - { return rep->float_complex_matrix_value (frc_str_conv); } + { return m_rep->float_complex_matrix_value (frc_str_conv); } ComplexNDArray complex_array_value (bool frc_str_conv = false) const - { return rep->complex_array_value (frc_str_conv); } + { return m_rep->complex_array_value (frc_str_conv); } FloatComplexNDArray float_complex_array_value (bool frc_str_conv = false) const - { return rep->float_complex_array_value (frc_str_conv); } + { return m_rep->float_complex_array_value (frc_str_conv); } bool bool_value (bool warn = false) const - { return rep->bool_value (warn); } + { return m_rep->bool_value (warn); } boolMatrix bool_matrix_value (bool warn = false) const - { return rep->bool_matrix_value (warn); } + { return m_rep->bool_matrix_value (warn); } boolNDArray bool_array_value (bool warn = false) const - { return rep->bool_array_value (warn); } + { return m_rep->bool_array_value (warn); } charMatrix char_matrix_value (bool frc_str_conv = false) const - { return rep->char_matrix_value (frc_str_conv); } + { return m_rep->char_matrix_value (frc_str_conv); } charNDArray char_array_value (bool frc_str_conv = false) const - { return rep->char_array_value (frc_str_conv); } + { return m_rep->char_array_value (frc_str_conv); } SparseMatrix sparse_matrix_value (bool frc_str_conv = false) const - { return rep->sparse_matrix_value (frc_str_conv); } + { return m_rep->sparse_matrix_value (frc_str_conv); } SparseComplexMatrix sparse_complex_matrix_value (bool frc_str_conv = false) const - { return rep->sparse_complex_matrix_value (frc_str_conv); } + { return m_rep->sparse_complex_matrix_value (frc_str_conv); } SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const - { return rep->sparse_bool_matrix_value (warn); } + { return m_rep->sparse_bool_matrix_value (warn); } DiagMatrix diag_matrix_value (bool force = false) const - { return rep->diag_matrix_value (force); } + { return m_rep->diag_matrix_value (force); } FloatDiagMatrix float_diag_matrix_value (bool force = false) const - { return rep->float_diag_matrix_value (force); } + { return m_rep->float_diag_matrix_value (force); } ComplexDiagMatrix complex_diag_matrix_value (bool force = false) const - { return rep->complex_diag_matrix_value (force); } + { return m_rep->complex_diag_matrix_value (force); } FloatComplexDiagMatrix float_complex_diag_matrix_value (bool force = false) const - { return rep->float_complex_diag_matrix_value (force); } + { return m_rep->float_complex_diag_matrix_value (force); } PermMatrix perm_matrix_value (void) const - { return rep->perm_matrix_value (); } + { return m_rep->perm_matrix_value (); } octave_int8 int8_scalar_value (void) const - { return rep->int8_scalar_value (); } + { return m_rep->int8_scalar_value (); } octave_int16 int16_scalar_value (void) const - { return rep->int16_scalar_value (); } + { return m_rep->int16_scalar_value (); } octave_int32 int32_scalar_value (void) const - { return rep->int32_scalar_value (); } + { return m_rep->int32_scalar_value (); } octave_int64 int64_scalar_value (void) const - { return rep->int64_scalar_value (); } + { return m_rep->int64_scalar_value (); } octave_uint8 uint8_scalar_value (void) const - { return rep->uint8_scalar_value (); } + { return m_rep->uint8_scalar_value (); } octave_uint16 uint16_scalar_value (void) const - { return rep->uint16_scalar_value (); } + { return m_rep->uint16_scalar_value (); } octave_uint32 uint32_scalar_value (void) const - { return rep->uint32_scalar_value (); } + { return m_rep->uint32_scalar_value (); } octave_uint64 uint64_scalar_value (void) const - { return rep->uint64_scalar_value (); } + { return m_rep->uint64_scalar_value (); } int8NDArray int8_array_value (void) const - { return rep->int8_array_value (); } + { return m_rep->int8_array_value (); } int16NDArray int16_array_value (void) const - { return rep->int16_array_value (); } + { return m_rep->int16_array_value (); } int32NDArray int32_array_value (void) const - { return rep->int32_array_value (); } + { return m_rep->int32_array_value (); } int64NDArray int64_array_value (void) const - { return rep->int64_array_value (); } + { return m_rep->int64_array_value (); } uint8NDArray uint8_array_value (void) const - { return rep->uint8_array_value (); } + { return m_rep->uint8_array_value (); } uint16NDArray uint16_array_value (void) const - { return rep->uint16_array_value (); } + { return m_rep->uint16_array_value (); } uint32NDArray uint32_array_value (void) const - { return rep->uint32_array_value (); } + { return m_rep->uint32_array_value (); } uint64NDArray uint64_array_value (void) const - { return rep->uint64_array_value (); } + { return m_rep->uint64_array_value (); } std::string string_value (bool force = false) const - { return rep->string_value (force); } + { return m_rep->string_value (force); } string_vector string_vector_value (bool pad = false) const - { return rep->string_vector_value (pad); } + { return m_rep->string_vector_value (pad); } Cell cell_value (void) const; Array<std::string> cellstr_value (void) const - { return rep->cellstr_value (); } + { return m_rep->cellstr_value (); } octave::range<float> float_range_value (void) const - { return rep->float_range_value (); } + { return m_rep->float_range_value (); } octave::range<double> range_value (void) const - { return rep->range_value (); } + { return m_rep->range_value (); } octave::range<octave_int8> int8_range_value (void) const - { return rep->int8_range_value (); } + { return m_rep->int8_range_value (); } octave::range<octave_int16> int16_range_value (void) const - { return rep->int16_range_value (); } + { return m_rep->int16_range_value (); } octave::range<octave_int32> int32_range_value (void) const - { return rep->int32_range_value (); } + { return m_rep->int32_range_value (); } octave::range<octave_int64> int64_range_value (void) const - { return rep->int64_range_value (); } + { return m_rep->int64_range_value (); } octave::range<octave_uint8> uint8_range_value (void) const - { return rep->uint8_range_value (); } + { return m_rep->uint8_range_value (); } octave::range<octave_uint16> uint16_range_value (void) const - { return rep->uint16_range_value (); } + { return m_rep->uint16_range_value (); } octave::range<octave_uint32> uint32_range_value (void) const - { return rep->uint32_range_value (); } + { return m_rep->uint32_range_value (); } octave::range<octave_uint64> uint64_range_value (void) const - { return rep->uint64_range_value (); } + { return m_rep->uint64_range_value (); } OCTINTERP_API octave_map map_value (void) const; OCTINTERP_API octave_scalar_map scalar_map_value (void) const; string_vector map_keys (void) const - { return rep->map_keys (); } + { return m_rep->map_keys (); } std::size_t nparents (void) const - { return rep->nparents (); } + { return m_rep->nparents (); } std::list<std::string> parent_class_name_list (void) const - { return rep->parent_class_name_list (); } + { return m_rep->parent_class_name_list (); } string_vector parent_class_names (void) const - { return rep->parent_class_names (); } + { return m_rep->parent_class_names (); } octave_base_value * find_parent_class (const std::string& parent_class_name) - { return rep->find_parent_class (parent_class_name); } + { return m_rep->find_parent_class (parent_class_name); } bool is_instance_of (const std::string& cls_name) const - { return rep->is_instance_of (cls_name); } + { return m_rep->is_instance_of (cls_name); } OCTINTERP_API octave_classdef * classdef_object_value (bool silent = false) const; @@ -1360,7 +1360,7 @@ // Possibly economize a lazy-indexed value. void maybe_economize (void) - { rep->maybe_economize (); } + { m_rep->maybe_economize (); } // The following two hook conversions are called on any octave_value prior to // storing it to a "permanent" location, like a named variable, a cell or a @@ -1379,45 +1379,45 @@ octave_value convert_to_str (bool pad = false, bool force = false, char type = '\'') const - { return rep->convert_to_str (pad, force, type); } + { return m_rep->convert_to_str (pad, force, type); } octave_value convert_to_str_internal (bool pad, bool force, char type) const - { return rep->convert_to_str_internal (pad, force, type); } + { return m_rep->convert_to_str_internal (pad, force, type); } void convert_to_row_or_column_vector (void) - { rep->convert_to_row_or_column_vector (); } + { m_rep->convert_to_row_or_column_vector (); } bool print_as_scalar (void) const - { return rep->print_as_scalar (); } + { return m_rep->print_as_scalar (); } void print (std::ostream& os, bool pr_as_read_syntax = false) - { rep->print (os, pr_as_read_syntax); } + { m_rep->print (os, pr_as_read_syntax); } void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const - { rep->print_raw (os, pr_as_read_syntax); } + { m_rep->print_raw (os, pr_as_read_syntax); } bool print_name_tag (std::ostream& os, const std::string& name) const - { return rep->print_name_tag (os, name); } + { return m_rep->print_name_tag (os, name); } void print_with_name (std::ostream& os, const std::string& name) const - { rep->print_with_name (os, name, true); } + { m_rep->print_with_name (os, name, true); } - void short_disp (std::ostream& os) const { rep->short_disp (os); } + void short_disp (std::ostream& os) const { m_rep->short_disp (os); } OCTINTERP_API float_display_format get_edit_display_format (void) const; std::string edit_display (const float_display_format& fmt, octave_idx_type i, octave_idx_type j) const { - return rep->edit_display (fmt, i, j); + return m_rep->edit_display (fmt, i, j); } - int type_id (void) const { return rep->type_id (); } + int type_id (void) const { return m_rep->type_id (); } - std::string type_name (void) const { return rep->type_name (); } + std::string type_name (void) const { return m_rep->type_name (); } - std::string class_name (void) const { return rep->class_name (); } + std::string class_name (void) const { return m_rep->class_name (); } // Unary operations that are member functions. There are also some // non-member functions for unary and binary operations declared @@ -1446,37 +1446,37 @@ } #endif - const octave_base_value& get_rep (void) const { return *rep; } + const octave_base_value& get_rep (void) const { return *m_rep; } - bool is_copy_of (const octave_value& val) const { return rep == val.rep; } + bool is_copy_of (const octave_value& val) const { return m_rep == val.m_rep; } OCTINTERP_API void print_info (std::ostream& os, const std::string& prefix = "") const; - bool save_ascii (std::ostream& os) { return rep->save_ascii (os); } + bool save_ascii (std::ostream& os) { return m_rep->save_ascii (os); } - bool load_ascii (std::istream& is) { return rep->load_ascii (is); } + bool load_ascii (std::istream& is) { return m_rep->load_ascii (is); } bool save_binary (std::ostream& os, bool save_as_floats) - { return rep->save_binary (os, save_as_floats); } + { return m_rep->save_binary (os, save_as_floats); } bool load_binary (std::istream& is, bool swap, octave::mach_info::float_format fmt) - { return rep->load_binary (is, swap, fmt); } + { return m_rep->load_binary (is, swap, fmt); } bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats) - { return rep->save_hdf5 (loc_id, name, save_as_floats); } + { return m_rep->save_hdf5 (loc_id, name, save_as_floats); } bool load_hdf5 (octave_hdf5_id loc_id, const char *name) - { return rep->load_hdf5 (loc_id, name); } + { return m_rep->load_hdf5 (loc_id, name); } OCTINTERP_API int write (octave::stream& os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const; - octave_base_value * internal_rep (void) const { return rep; } + octave_base_value * internal_rep (void) const { return m_rep; } // Unsafe. These functions exist to support the MEX interface. // You should not use them anywhere else. @@ -1484,48 +1484,48 @@ mex_get_data (mxClassID class_id = mxUNKNOWN_CLASS, mxComplexity complexity = mxREAL) const; - octave_idx_type * mex_get_ir (void) const { return rep->mex_get_ir (); } + octave_idx_type * mex_get_ir (void) const { return m_rep->mex_get_ir (); } - octave_idx_type * mex_get_jc (void) const { return rep->mex_get_jc (); } + octave_idx_type * mex_get_jc (void) const { return m_rep->mex_get_jc (); } mxArray * as_mxArray (bool interleaved = false) const - { return rep->as_mxArray (interleaved); } + { return m_rep->as_mxArray (interleaved); } octave_value diag (octave_idx_type k = 0) const - { return rep->diag (k); } + { return m_rep->diag (k); } octave_value diag (octave_idx_type m, octave_idx_type n) const - { return rep->diag (m, n); } + { return m_rep->diag (m, n); } octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const - { return rep->sort (dim, mode); } + { return m_rep->sort (dim, mode); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const - { return rep->sort (sidx, dim, mode); } + { return m_rep->sort (sidx, dim, mode); } sortmode issorted (sortmode mode = UNSORTED) const - { return rep->issorted (mode); } + { return m_rep->issorted (mode); } Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const - { return rep->sort_rows_idx (mode); } + { return m_rep->sort_rows_idx (mode); } sortmode is_sorted_rows (sortmode mode = UNSORTED) const - { return rep->is_sorted_rows (mode); } + { return m_rep->is_sorted_rows (mode); } - void lock (void) { rep->lock (); } + void lock (void) { m_rep->lock (); } - void unlock (void) { rep->unlock (); } + void unlock (void) { m_rep->unlock (); } - bool islocked (void) const { return rep->islocked (); } + bool islocked (void) const { return m_rep->islocked (); } - void call_object_destructor (void) { return rep->call_object_destructor (); } + void call_object_destructor (void) { return m_rep->call_object_destructor (); } - octave_value dump (void) const { return rep->dump (); } + octave_value dump (void) const { return m_rep->dump (); } #define MAPPER_FORWARD(F) \ octave_value F (void) const \ { \ - return rep->map (octave_base_value::umap_ ## F); \ + return m_rep->map (octave_base_value::umap_ ## F); \ } MAPPER_FORWARD (abs) @@ -1595,7 +1595,7 @@ #undef MAPPER_FORWARD octave_value map (octave_base_value::unary_mapper_t umap) const - { return rep->map (umap); } + { return m_rep->map (umap); } //! Extract the n-th element, aka 'val(n)'. //! @@ -1606,7 +1606,7 @@ octave_value fast_elem_extract (octave_idx_type n) const - { return rep->fast_elem_extract (n); } + { return m_rep->fast_elem_extract (n); } //! Assign the n-th element, aka 'val(n) = x'. //! @@ -1620,13 +1620,13 @@ fast_elem_insert (octave_idx_type n, const octave_value& x) { make_unique (); - return rep->fast_elem_insert (n, x); + return m_rep->fast_elem_insert (n, x); } protected: //! The real representation. - octave_base_value *rep; + octave_base_value *m_rep; private: