GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov-struct.cc File Reference
#include <istream>
#include <ostream>
#include "Cell.h"
#include "builtin-defun-decls.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "mxarray.h"
#include "oct-lvalue.h"
#include "oct-hdf5.h"
#include "ov-struct.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "Array-util.h"
#include "oct-locbuf.h"
#include "byte-swap.h"
#include "ls-oct-text.h"
#include "ls-oct-binary.h"
#include "ls-hdf5.h"
#include "ls-utils.h"
#include "pr-output.h"
Include dependency graph for ov-struct.cc:

Go to the source code of this file.

Functions

static void err_invalid_index_for_assignment (void)
 
static void err_invalid_index_type (const std::string &nm, char t)
 
OCTAVE_EXPORT octave_value_list F__fieldnames__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcell2struct (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisfield (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisstruct (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnumfields (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fprint_struct_array_contents (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Frmfield (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fstruct (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fstruct_levels_to_print (const octave_value_list &args, int nargout)
 
static Array< std::string > get_cell2struct_fields (const octave_value &arg)
 
static OCTAVE_NORETURN void invalid_cell2struct_fields_error (void)
 
static void maybe_warn_invalid_field_name (const std::string &key, const char *who)
 
static bool scalar (const dim_vector &dims)
 

Variables

static bool Vprint_struct_array_contents = false
 
static int Vstruct_levels_to_print = 2
 

Function Documentation

◆ err_invalid_index_for_assignment()

static void err_invalid_index_for_assignment ( void  )
static

Definition at line 112 of file ov-struct.cc.

References error().

Referenced by octave_struct::subsasgn().

◆ err_invalid_index_type()

static void err_invalid_index_type ( const std::string &  nm,
char  t 
)
static

Definition at line 118 of file ov-struct.cc.

References error().

Referenced by octave_struct::subsasgn(), and octave_struct::subsref().

◆ F__fieldnames__()

OCTAVE_EXPORT octave_value_list F__fieldnames__ ( const octave_value_list args,
int   
)

Definition at line 1920 of file ov-struct.cc.

References string_vector::isempty(), m, and octave_value::map_value().

◆ Fcell2struct()

◆ Fisfield()

OCTAVE_EXPORT octave_value_list Fisfield ( const octave_value_list args,
int   
)

Definition at line 1949 of file ov-struct.cc.

References Array< T, Alloc >::dims(), m, n, Array< T, Alloc >::numel(), and print_usage().

◆ Fisstruct()

OCTAVE_EXPORT octave_value_list Fisstruct ( const octave_value_list args,
int   
)

Definition at line 1904 of file ov-struct.cc.

References ovl(), and print_usage().

◆ Fnumfields()

OCTAVE_EXPORT octave_value_list Fnumfields ( const octave_value_list args,
int   
)

Definition at line 1998 of file ov-struct.cc.

References error(), ovl(), and print_usage().

◆ Fprint_struct_array_contents()

OCTAVE_EXPORT octave_value_list Fprint_struct_array_contents ( const octave_value_list args,
int  nargout 
)

◆ Frmfield()

OCTAVE_EXPORT octave_value_list Frmfield ( const octave_value_list args,
int   
)

◆ Fstruct()

OCTAVE_EXPORT octave_value_list Fstruct ( const octave_value_list args,
int   
)

◆ Fstruct_levels_to_print()

OCTAVE_EXPORT octave_value_list Fstruct_levels_to_print ( const octave_value_list args,
int  nargout 
)

Definition at line 2230 of file ov-struct.cc.

References max(), set_internal_variable(), and Vstruct_levels_to_print.

Referenced by interpreter::maximum_braindamage().

◆ get_cell2struct_fields()

◆ invalid_cell2struct_fields_error()

static OCTAVE_NORETURN void invalid_cell2struct_fields_error ( void  )
static

Definition at line 2023 of file ov-struct.cc.

References error().

Referenced by get_cell2struct_fields().

◆ maybe_warn_invalid_field_name()

static void maybe_warn_invalid_field_name ( const std::string &  key,
const char *  who 
)
static

◆ scalar()

static bool scalar ( const dim_vector dims)
static

Definition at line 679 of file ov-struct.cc.

References dim_vector::ndims().

Referenced by octave_base_scalar< ST >::all(), octave_base_scalar< ST >::any(), octave_complex::any(), octave_float_scalar::any(), octave_float_complex::any(), octave_scalar::any(), octave_float_scalar::array_value(), octave_uint64_scalar::array_value(), octave_scalar::array_value(), octave_base_int_scalar< T >::as_double(), octave_base_int_scalar< T >::as_int16(), octave_base_int_scalar< T >::as_int32(), octave_base_int_scalar< T >::as_int64(), octave_base_int_scalar< T >::as_int8(), octave_uint64_scalar::as_mxArray(), octave_base_int_scalar< T >::as_single(), octave_base_int_scalar< T >::as_uint16(), octave_base_int_scalar< T >::as_uint32(), octave_base_int_scalar< T >::as_uint64(), octave_base_int_scalar< T >::as_uint8(), octave_complex::bool_array_value(), octave_float_scalar::bool_array_value(), octave_float_complex::bool_array_value(), octave_uint64_scalar::bool_array_value(), octave_scalar::bool_array_value(), octave_bool::bool_array_value(), octave_bool::bool_matrix_value(), octave_complex::bool_value(), octave_float_scalar::bool_value(), octave_float_complex::bool_value(), octave_uint64_scalar::bool_value(), octave_scalar::bool_value(), octave_bool::bool_value(), octave_bool::char_array_value(), octave_float_scalar::char_array_value(), octave_uint64_scalar::char_array_value(), octave_scalar::char_array_value(), octave_bool::complex_array_value(), octave_float_scalar::complex_array_value(), octave_uint64_scalar::complex_array_value(), octave_scalar::complex_array_value(), octave_bool::complex_matrix_value(), octave_float_scalar::complex_matrix_value(), octave_uint64_scalar::complex_matrix_value(), octave_scalar::complex_matrix_value(), octave_bool::complex_value(), octave_float_scalar::complex_value(), octave_scalar::complex_value(), octave_base_int_scalar< T >::convert_to_str_internal(), octave_complex::decrement(), octave_float_scalar::decrement(), octave_float_complex::decrement(), octave_uint64_scalar::decrement(), octave_scalar::decrement(), octave_base_scalar< ST >::diag(), octave_bool::double_value(), octave_float_scalar::double_value(), octave_uint64_scalar::double_value(), octave_scalar::double_value(), octave_base_int_scalar< T >::edit_display(), octave_base_scalar< ST >::edit_display(), octave_base_scalar< ST >::fast_elem_extract(), octave_base_scalar< ST >::fast_elem_insert_self(), octave_float_scalar::float_array_value(), octave_uint64_scalar::float_array_value(), octave_bool::float_complex_array_value(), octave_float_scalar::float_complex_array_value(), octave_uint64_scalar::float_complex_array_value(), octave_bool::float_complex_matrix_value(), octave_float_scalar::float_complex_matrix_value(), octave_uint64_scalar::float_complex_matrix_value(), octave_bool::float_complex_value(), octave_float_scalar::float_complex_value(), octave_bool::float_matrix_value(), octave_float_scalar::float_matrix_value(), octave_uint64_scalar::float_matrix_value(), octave_bool::float_scalar_value(), octave_float_scalar::float_scalar_value(), octave_uint64_scalar::float_scalar_value(), octave_bool::float_value(), octave_float_scalar::float_value(), octave_uint64_scalar::float_value(), octave_scalar::float_value(), Fstruct(), octave_base_scalar< ST >::full_value(), octave_base_scalar< ST >::get_edit_display_format(), octave_complex::increment(), octave_float_scalar::increment(), octave_float_complex::increment(), octave_uint64_scalar::increment(), octave_scalar::increment(), octave_bool::index_vector(), octave_float_scalar::index_vector(), octave_uint64_scalar::index_vector(), octave_scalar::index_vector(), octave_bool::int16_array_value(), octave_float_scalar::int16_array_value(), octave_scalar::int16_array_value(), octave_bool::int16_scalar_value(), octave_uint64_scalar::int16_scalar_value(), octave_bool::int32_array_value(), octave_float_scalar::int32_array_value(), octave_scalar::int32_array_value(), octave_bool::int32_scalar_value(), octave_uint64_scalar::int32_scalar_value(), octave_bool::int64_array_value(), octave_float_scalar::int64_array_value(), octave_scalar::int64_array_value(), octave_bool::int64_scalar_value(), octave_uint64_scalar::int64_scalar_value(), octave_bool::int8_array_value(), octave_float_scalar::int8_array_value(), octave_scalar::int8_array_value(), octave_bool::int8_scalar_value(), octave_uint64_scalar::int8_scalar_value(), ComplexMatrix::inverse(), Matrix::inverse(), FloatComplexMatrix::inverse(), FloatMatrix::inverse(), octave_bool::is_true(), octave_base_int_scalar< T >::load_ascii(), octave_base_int_scalar< T >::load_binary(), octave_base_int_scalar< T >::load_hdf5_internal(), octave_uint64_scalar::map(), octave_bool::matrix_value(), octave_float_scalar::matrix_value(), octave_uint64_scalar::matrix_value(), octave_scalar::matrix_value(), octave_base_scalar< ST >::mex_get_data(), octave_base_scalar< ST >::nnz(), octave_base_scalar< ST >::permute(), octave_base_scalar< double >::print_raw(), octave_base_scalar< ST >::reshape(), octave_uint64_scalar::resize(), octave_base_int_scalar< T >::save_ascii(), octave_base_int_scalar< T >::save_binary(), octave_base_int_scalar< T >::save_hdf5_internal(), octave_base_scalar< ST >::scalar_ref(), octave_bool::scalar_value(), octave_float_scalar::scalar_value(), octave_uint64_scalar::scalar_value(), octave_scalar::scalar_value(), octave_base_scalar< ST >::short_disp(), octave_base_scalar< ST >::sort(), octave_bool::sparse_bool_matrix_value(), octave_bool::sparse_matrix_value(), octave_float_scalar::sparse_matrix_value(), octave_scalar::sparse_matrix_value(), octave_base_scalar< ST >::squeeze(), octave_bool::uint16_array_value(), octave_float_scalar::uint16_array_value(), octave_scalar::uint16_array_value(), octave_bool::uint16_scalar_value(), octave_uint64_scalar::uint16_scalar_value(), octave_bool::uint32_array_value(), octave_float_scalar::uint32_array_value(), octave_scalar::uint32_array_value(), octave_bool::uint32_scalar_value(), octave_uint64_scalar::uint32_scalar_value(), octave_bool::uint64_array_value(), octave_float_scalar::uint64_array_value(), octave_scalar::uint64_array_value(), octave_bool::uint64_scalar_value(), octave_uint64_scalar::uint64_scalar_value(), octave_bool::uint8_array_value(), octave_float_scalar::uint8_array_value(), octave_scalar::uint8_array_value(), octave_bool::uint8_scalar_value(), octave_uint64_scalar::uint8_scalar_value(), idx_vector::unconvert(), and zero_dims_inquire().

Variable Documentation

◆ Vprint_struct_array_contents

bool Vprint_struct_array_contents = false
static

Definition at line 64 of file ov-struct.cc.

Referenced by Fprint_struct_array_contents(), and octave_struct::print_raw().

◆ Vstruct_levels_to_print