Navigation

Operators and Keywords

Function List:

C++ API

ov-struct.cc File Reference

#include <iostream>
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "oct-lvalue.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-ascii.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:

Functions

 DEFINE_OCTAVE_ALLOCATOR (octave_struct)
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_struct,"struct","struct")
 DEFINE_OCTAVE_ALLOCATOR (octave_scalar_struct)
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_scalar_struct,"scalar struct","struct")
 DEFUN (struct, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} struct (\"field\", @var{value}, \"field\", @var{value}, @dots{})\n\ \n\ Create a structure and initialize its value.\n\ \n\ If the values are cell arrays, create a structure array and initialize\n\ its values. The dimensions of each cell array of values must match.\n\ Singleton cells and non-cell values are repeated so that they fill\n\ the entire array. If the cells are empty, create an empty structure\n\ array with the specified field names.\n\ \n\ If the argument is an object, return the underlying struct.\n\ @end deftypefn")
 DEFUN (isstruct, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isstruct (@var{x})\n\ Return true if @var{x} is a structure or a structure array.\n\ @seealso{ismatrix, iscell, isa}\n\ @end deftypefn")
 DEFUN (fieldnames, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} fieldnames (@var{struct})\n\ Return a cell array of strings naming the elements of the structure\n\ @var{struct}. It is an error to call @code{fieldnames} with an\n\ argument that is not a structure.\n\ @end deftypefn")
 DEFUN (isfield, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isfield (@var{x}, @var{name})\n\ Return true if the @var{x} is a structure and it\n\ includes an element named @var{name}. If @var{name} is a cell\n\ array of strings then a logical array of equal dimension is returned.\n\ @end deftypefn")
 DEFUN (nfields, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} nfields (@var{s})\n\ Return the number of fields of the structure @var{s}.\n\ @end deftypefn")
 DEFUN (cell2struct, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} cell2struct (@var{cell}, @var{fields}, @var{dim})\n\ Convert @var{cell} to a structure. The number of fields in @var{fields}\n\ must match the number of elements in @var{cell} along dimension @var{dim},\n\ that is @code{numel (@var{fields}) == size (@var{cell}, @var{dim})}.\n\ \n\ @example\n\ @group\n\ A = cell2struct (@{'Peter', 'Hannah', 'Robert';\n\ 185, 170, 168@},\n\ @{'Name','Height'@}, 1);\n\ A(1)\n\ @result{} ans =\n\ @{\n\ Name = Peter\n\ Height = 185\n\ @}\n\ \n\ @end group\n\ @end example\n\ @end deftypefn")
octave_value_list Fcellstr (const octave_value_list &args, int)
 DEFUN (rmfield, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} rmfield (@var{s}, @var{f})\n\ Return a copy of the structure (array) @var{s} with the field @var{f}\n\ removed. If @var{f} is a cell array of strings or a character array, remove\n\ the named fields.\n\ @seealso{cellstr, iscellstr, setfield}\n\ @end deftypefn")
 DEFUN (struct_levels_to_print, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} struct_levels_to_print ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} struct_levels_to_print (@var{new_val})\n\ Query or set the internal variable that specifies the number of\n\ structure levels to display.\n\ @end deftypefn")
 DEFUN (print_struct_array_contents, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} print_struct_array_contents ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} print_struct_array_contents (@var{new_val})\n\ Query or set the internal variable that specifies whether to print struct\n\ array contents. If true, values of struct array elements are printed.\n\ This variable does not affect scalar structures. Their elements\n\ are always printed. In both cases, however, printing will be limited to\n\ the number of levels specified by @var{struct_levels_to_print}.\n\ @end deftypefn")

Function Documentation

DEFINE_OCTAVE_ALLOCATOR ( octave_struct   ) 
DEFINE_OCTAVE_ALLOCATOR ( octave_scalar_struct   ) 
DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA ( octave_struct  ,
"struct"  ,
"struct"   
)
DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA ( octave_scalar_struct  ,
"scalar struct"  ,
"struct"   
)
DEFUN ( struct_levels_to_print  ,
args  ,
nargout   
)
DEFUN ( rmfield  ,
args   
)
DEFUN ( nfields  ,
args   
)
DEFUN ( struct  ,
args   
)
DEFUN ( isstruct  ,
args   
)
DEFUN ( fieldnames  ,
args   
)
DEFUN ( print_struct_array_contents  ,
args  ,
nargout   
)
DEFUN ( isfield  ,
args   
)
DEFUN ( cell2struct  ,
args   
)
octave_value_list Fcellstr ( const octave_value_list args,
int   
)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines