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-list.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")
 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{expr})\n\ Return 1 if the value of the expression @var{expr} is a structure.\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{expr}, @var{name})\n\ Return true if the expression @var{expr} is a structure and it includes an\n\ element named @var{name}. The first argument must be a structure and\n\ the second must be a string.\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\ Height = 185\n\ Name = Peter\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\ Remove field @var{f} from the structure @var{s}. If @var{f} is a\n\ cell array of character strings or a character array, remove the\n\ named fields.\n\ @seealso{cellstr, iscellstr, setfield}\n\ @end deftypefn")

Function Documentation

DEFINE_OCTAVE_ALLOCATOR ( octave_struct   ) 

DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA ( octave_struct  ,
"struct"  ,
"struct"   
)

DEFUN ( rmfield  ,
args   
)

DEFUN ( cell2struct  ,
args   
)

DEFUN ( isfield  ,
args   
)

DEFUN ( fieldnames  ,
args   
)

DEFUN ( isstruct  ,
args   
)

DEFUN ( struct  ,
args   
)

octave_value_list Fcellstr ( const octave_value_list args,
int   
)