#include <iostream>
#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"
Go to the source code of this file.
Classes | |
struct | ode |
struct | trong |
Functions | |
A (1) esult | |
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) that is ode |
OCTAVE_EXPORT octave_value_list | Fisfield (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fisstruct (const octave_value_list &args, int) iscell |
OCTAVE_EXPORT octave_value_list | Fnumfields (const octave_value_list &args, int) |
for (int i=0;i< nargin;i+=2) | |
OCTAVE_EXPORT octave_value_list | Fstruct (const octave_value_list &args, int) ar |
if (nargin==1 &&args(0).isstruct()) return ovl(args(0)) | |
if ((nargin==1||nargin==2) &&args(0).isempty() &&args(0).is_real_matrix()) | |
static void | maybe_warn_invalid_field_name (const std::string &key, const char *who) |
return | ovl (map) |
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return | ovl (args(0).isstruct()) |
static bool | scalar (const dim_vector &dims) |
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an return the underlying struct Observe that the syntax is optimized for struct trong | struct ("foo", 1) esult |
Variables | |
If a value of is assumed xample roup | A = cell2struct ("Peter", "Hannah", "Robert"; 185, 170, 168, "Name","Height", 1) |
ar {value2} | |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | cell2struct |
dim_vector | dims (1, 1) |
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are | empty |
scalar structure containing the | esult {} 0x0 struct array containing the fields: foo struct ("foo", ) esult{} scalar structure containing the fields: foo = (0x0) struct ("foo", 1, 2, 3) esult{} 1x3 struct array containing the fields: foo nd group nd example oindent The first case is an ordinary scalar struct---one field |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | fieldnames |
scalar structure containing the | fields |
int | first_dimensioned_value = 0 |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | getfield |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | isfield |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | isstruct |
octave_map | map (dims) |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | nargin = args.length () |
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an | object |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | orderfields |
ots {} variables are strings specifying the names of the fields and the ar{value1} | |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | rmfield |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode | setfield |
static bool | Vprint_struct_array_contents = false |
static int | Vstruct_levels_to_print = 2 |
A | ( | 1 | ) |
Definition at line 2006 of file ov-struct.cc.
|
static |
Definition at line 96 of file ov-struct.cc.
References error().
Referenced by octave_struct::subsasgn().
|
static |
Definition at line 102 of file ov-struct.cc.
References error(), nm, and t.
Referenced by octave_struct::subsasgn(), and octave_struct::subsref().
OCTAVE_EXPORT octave_value_list F__fieldnames__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1879 of file ov-struct.cc.
References arg, octave_map::fieldnames(), Array< T >::isempty(), octave_value::map_value(), and retval.
OCTAVE_EXPORT octave_value_list Fcell2struct | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2006 of file ov-struct.cc.
References idx_vector::colon, Array< T >::dims(), error(), fields, i, Cell::index(), iscellstr, map, max(), Array< T >::ndims(), ovl(), print_usage(), dim_vector::redim(), Cell::reshape(), and octave_map::setfield().
OCTAVE_EXPORT octave_value_list Fisfield | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1908 of file ov-struct.cc.
References c, i, octave_map::isfield(), print_usage(), retval, and string.
OCTAVE_EXPORT octave_value_list Fisstruct | ( | const octave_value_list & | args, |
int | |||
) |
OCTAVE_EXPORT octave_value_list Fnumfields | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1957 of file ov-struct.cc.
References error(), ovl(), and print_usage().
for | ( | ) |
Definition at line 1769 of file ov-struct.cc.
References error(), gh_manager::get_object(), graphics_object::has_readonly_property(), hcv, i, iscellstr, nargout(), Array< T >::numel(), octave_stdout, request_drawnow, retval, s, graphics_object::set(), string, transform(), graphics_object::value_as_string(), graphics_object::values_as_string(), and graphics_object::values_as_struct().
OCTAVE_EXPORT octave_value_list Fstruct | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1736 of file ov-struct.cc.
Definition at line 598 of file file-io.cc.
References error(), octave::stream_list::get_info(), method, nargout(), Array< T >::numel(), octave::stream_list::open_file_numbers(), ovl(), param, retval, streams, string, tmp, and Vignore_function_time_stamp.
Definition at line 1754 of file ov-struct.cc.
|
static |
Definition at line 108 of file ov-struct.cc.
References valid_identifier(), and warning_with_id().
Referenced by octave_scalar_struct::dotref(), octave_struct::subsasgn(), and octave_scalar_struct::subsasgn().
return ovl | ( | map | ) |
Referenced by Fcell2struct(), Fnumfields(), if(), and struct().
OCTAVE_EXPORT octave_value_list isa nd deftypefn* return ovl | ( | args(0).isstruct() | ) |
|
static |
Definition at line 654 of file ov-struct.cc.
References dims, and dim_vector::ndims().
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an return the underlying struct Observe that the syntax is optimized for struct trong struct | ( | "foo" | , |
1 | |||
) |
Definition at line 1736 of file ov-struct.cc.
References isstruct, and ovl().
Referenced by octave::sys::group::group(), octave::sys::base_tm::init(), and octave::sys::password::password().
If a value of is assumed xample roup A = cell2struct ("Peter", "Hannah", "Robert"; 185, 170, 168, "Name","Height", 1) |
Definition at line 2006 of file ov-struct.cc.
If ar {value2} |
Definition at line 1736 of file ov-struct.cc.
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode cell2struct |
dim_vector dims(1, 1) |
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are empty |
Definition at line 1736 of file ov-struct.cc.
Referenced by octave::lexical_feedback::token_cache::at(), octave::lexical_feedback::token_cache::back(), octave::ListDialog::buttonCancel_clicked(), octave::InputDialog::buttonCancel_clicked(), octave::lexical_feedback::token_cache::clear(), octave::event_queue::discard_first(), octave::unwind_protect::discard_first(), octave::lexical_feedback::token_cache::front(), uibuttongroup::properties::get_boundingbox(), uipanel::properties::get_boundingbox(), octave_sparse_bool_matrix::load_hdf5(), octave_sparse_complex_matrix::load_hdf5(), octave_sparse_matrix::load_hdf5(), octave_float_complex_matrix::load_hdf5(), octave_cell::load_hdf5(), octave_char_matrix_str::load_hdf5(), octave_complex_matrix::load_hdf5(), octave_float_matrix::load_hdf5(), octave_bool_matrix::load_hdf5(), octave_matrix::load_hdf5(), octave_base_int_matrix< intNDArray< OCTAVE_INT_T > >::load_hdf5_internal(), main(), octave::unwind_protect::operator bool(), octave::action_container::operator bool(), octave::lexical_feedback::token_cache::pop(), octave::FileDialog::rejectSelection(), octave::event_queue::run_first(), octave::unwind_protect::run_first(), octave_sparse_bool_matrix::save_hdf5(), octave_sparse_complex_matrix::save_hdf5(), octave_sparse_matrix::save_hdf5(), octave_float_complex_matrix::save_hdf5(), octave_cell::save_hdf5(), octave_char_matrix_str::save_hdf5(), octave_complex_matrix::save_hdf5(), octave_float_matrix::save_hdf5(), octave_bool_matrix::save_hdf5(), octave_matrix::save_hdf5(), save_hdf5_empty(), octave_base_int_matrix< intNDArray< OCTAVE_INT_T > >::save_hdf5_internal(), TerminalImageFilterChain::setImage(), octave::event_queue_safe::~event_queue_safe(), text_element_list::~text_element_list(), and octave::unwind_protect_safe::~unwind_protect_safe().
scalar structure containing the esult {} 0x0 struct array containing the fields: foo struct ("foo", ) esult{} scalar structure containing the fields: foo = (0x0) struct ("foo", 1, 2, 3) esult{} 1x3 struct array containing the fields: foo nd group nd example oindent The first case is an ordinary scalar struct---one field |
Definition at line 1736 of file ov-struct.cc.
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode fieldnames |
Referenced by octave_scalar_map::keys(), and octave_map::keys().
scalar structure containing the fields |
Definition at line 1736 of file ov-struct.cc.
Referenced by octave_class::exemplar_info::compare(), Fcell2struct(), octave::scalar_struct_model::header_data(), octave::vector_struct_model::header_data(), octave_fields::octave_fields(), octave::scalar_struct_model::subscript_expression(), and octave::vector_struct_model::subscript_expression().
int first_dimensioned_value = 0 |
Definition at line 1779 of file ov-struct.cc.
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode getfield |
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode isfield |
Referenced by octave_scalar_map::contains(), and octave_map::contains().
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode isstruct |
Referenced by G__eigs__(), graphics_object::set(), and struct().
octave_map map(dims) |
Referenced by octave_class::assign(), octave::fcn_info::fcn_info_rep::clear_map(), octave_struct::dims(), octave_class::dims(), octave_class::empty_clone(), Fcell2struct(), G__eigs__(), cdef_object_scalar::get(), octave::main_window::handle_edit_mfile_request(), octave::workspace_view::header_contextmenu_requested(), octave::files_dock_widget::headercontextmenu_requested(), make_plot_mapper(), octave_struct::map_keys(), octave_scalar_struct::map_keys(), octave_struct::map_value(), octave_class::map_value(), octave_scalar_struct::map_value(), octave_struct::nfields(), octave_class::nfields(), octave_scalar_struct::nfields(), octave_struct::numel(), octave_struct::permute(), octave_scalar_struct::permute(), cdef_object_scalar::put(), octave_struct::reshape(), octave_scalar_struct::reshape(), octave_struct::resize(), octave_scalar_struct::resize(), octave_scalar_struct::scalar_map_value(), octave_struct::squeeze(), octave_scalar_struct::squeeze(), Cell::xisalnum(), Cell::xisalpha(), Cell::xisascii(), Cell::xiscntrl(), Cell::xisdigit(), Cell::xisgraph(), Cell::xislower(), Cell::xisprint(), Cell::xispunct(), Cell::xisspace(), Cell::xisupper(), Cell::xisxdigit(), Cell::xtolower(), and Cell::xtoupper().
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode nargin = args.length () |
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an object |
Definition at line 1736 of file ov-struct.cc.
Referenced by octave_classdef::get_object(), octave_classdef::get_object_ref(), and octave::jit_convert::resolve().
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode orderfields |
Definition at line 1736 of file ov-struct.cc.
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode rmfield |
Referenced by octave_scalar_map::del(), and octave_map::del().
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode setfield |
Referenced by octave_scalar_map::assign(), and octave_map::assign().
Definition at line 60 of file ov-struct.cc.
Referenced by octave_struct::print_raw().
|
static |
Definition at line 56 of file ov-struct.cc.
Referenced by octave_struct::print_name_tag(), octave_scalar_struct::print_name_tag(), octave_struct::print_raw(), and octave_scalar_struct::print_raw().