GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
mxArray_struct Class Reference
Inheritance diagram for mxArray_struct:
Inheritance graph
[legend]
Collaboration diagram for mxArray_struct:
Collaboration graph
[legend]

Public Member Functions

 mxArray_struct (mwSize ndims_arg, const mwSize *dims_arg, int num_keys_arg, const char **keys)
 
 mxArray_struct (const dim_vector &dv, int num_keys_arg, const char **keys)
 
 mxArray_struct (mwSize m, mwSize n, int num_keys_arg, const char **keys)
 
 ~mxArray_struct (void)
 
int add_field (const char *key)
 
chararray_to_string (void) const
 
virtual mxArrayas_mxArray (void) const
 
virtual mxArrayas_mxArray (void) const
 
octave_value as_octave_value (void) const
 
mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const
 
mxArray_basedup (void) const
 
mxArrayget_cell (mwIndex) const
 
mxClassID get_class_id (void) const
 
const charget_class_name (void) const
 
void * get_data (void) const
 
mwSizeget_dimensions (void) const
 
size_t get_element_size (void) const
 
mxArrayget_field_by_number (mwIndex index, int key_num) const
 
const charget_field_name_by_number (int key_num) const
 
int get_field_number (const char *key) const
 
void * get_imag_data (void) const
 
mwIndexget_ir (void) const
 
mwIndexget_jc (void) const
 
mwSize get_m (void) const
 
mwSize get_n (void) const
 
mwSize get_number_of_dimensions (void) const
 
mwSize get_number_of_elements (void) const
 
int get_number_of_fields (void) const
 
mwSize get_nzmax (void) const
 
double get_scalar (void) const
 
int get_string (char *, mwSize) const
 
void init (const char **keys)
 
int is_cell (void) const
 
int is_char (void) const
 
virtual int is_class (const char *name_arg) const
 
virtual int is_class (const char *name_arg) const
 
int is_complex (void) const
 
int is_double (void) const
 
int is_empty (void) const
 
int is_function_handle (void) const
 
int is_int16 (void) const
 
int is_int32 (void) const
 
int is_int64 (void) const
 
int is_int8 (void) const
 
int is_logical (void) const
 
virtual int is_logical_scalar (void) const
 
virtual int is_logical_scalar (void) const
 
int is_logical_scalar_true (void) const
 
int is_numeric (void) const
 
virtual bool is_octave_value (void) const
 
virtual bool is_octave_value (void) const
 
int is_single (void) const
 
int is_sparse (void) const
 
int is_struct (void) const
 
int is_uint16 (void) const
 
int is_uint32 (void) const
 
int is_uint64 (void) const
 
int is_uint8 (void) const
 
virtual mxArraymutate (void) const
 
virtual mxArraymutate (void) const
 
virtual bool mutation_needed (void) const
 
virtual bool mutation_needed (void) const
 
void remove_field (int key_num)
 
void set_cell (mwIndex, mxArray *)
 
void set_class_name (const char *name_arg)
 
void set_data (void *data_arg)
 
void set_dimensions (mwSize *dims_arg, mwSize ndims_arg)
 
void set_field_by_number (mwIndex index, int key_num, mxArray *val)
 
void set_imag_data (void *)
 
void set_ir (mwIndex *)
 
void set_jc (mwIndex *)
 
void set_m (mwSize m)
 
void set_n (mwSize n)
 
void set_nzmax (mwSize)
 

Protected Member Functions

dim_vector dims_to_dim_vector (void) const
 
void error (const char *msg) const
 
void error (const char *msg) const
 

Private Member Functions

 mxArray_struct (const mxArray_struct &val)
 
mxArray_structoperator= (const mxArray_struct &val)
 

Private Attributes

mxArray ** data
 
char ** fields
 
int nfields
 

Detailed Description

Definition at line 1559 of file mex.cc.

Constructor & Destructor Documentation

mxArray_struct::mxArray_struct ( mwSize  ndims_arg,
const mwSize dims_arg,
int  num_keys_arg,
const char **  keys 
)
inline

Definition at line 1563 of file mex.cc.

References init().

Referenced by dup().

mxArray_struct::mxArray_struct ( const dim_vector dv,
int  num_keys_arg,
const char **  keys 
)
inline

Definition at line 1576 of file mex.cc.

References init().

mxArray_struct::mxArray_struct ( mwSize  m,
mwSize  n,
int  num_keys_arg,
const char **  keys 
)
inline

Definition at line 1587 of file mex.cc.

References init().

mxArray_struct::~mxArray_struct ( void  )
inline

Definition at line 1606 of file mex.cc.

References data, fields, mxArray_matlab::get_number_of_elements(), mxFree(), and nfields.

mxArray_struct::mxArray_struct ( const mxArray_struct val)
inlineprivate

Member Function Documentation

int mxArray_struct::add_field ( const char key)
inlinevirtual
char* mxArray_matlab::array_to_string ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_number.

Definition at line 906 of file mex.cc.

References mxArray_matlab::invalid_type_error().

virtual mxArray* mxArray_base::as_mxArray ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 134 of file mxarray.h.

Referenced by mxArray::dup().

virtual mxArray* mxArray_base::as_mxArray ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 134 of file mxarray.in.h.

octave_value mxArray_struct::as_octave_value ( void  ) const
inlinevirtual
mwIndex mxArray_matlab::calc_single_subscript ( mwSize  nsubs,
mwIndex subs 
) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 912 of file mex.cc.

References calc_single_subscript_internal(), mxArray_matlab::dims, and mxArray_matlab::ndims.

dim_vector mxArray_matlab::dims_to_dim_vector ( void  ) const
inlineprotectedinherited
mxArray_base* mxArray_struct::dup ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 1604 of file mex.cc.

References mxArray_struct().

void mxArray_base::error ( const char msg) const
protectedinherited
void mxArray_base::error ( const char msg) const
protectedinherited
mxArray* mxArray_matlab::get_cell ( mwIndex  ) const
inlinevirtualinherited

Reimplemented from mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 788 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mxClassID mxArray_matlab::get_class_id ( void  ) const
inlinevirtualinherited
const char* mxArray_matlab::get_class_name ( void  ) const
inlinevirtualinherited
void* mxArray_struct::get_data ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1755 of file mex.cc.

References data.

mwSize* mxArray_matlab::get_dimensions ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 730 of file mex.cc.

References mxArray_matlab::dims.

Referenced by mxArray_matlab::dims_to_dim_vector(), and mxArray_number::mxArray_number().

size_t mxArray_matlab::get_element_size ( void  ) const
inlinevirtualinherited
mxArray* mxArray_struct::get_field_by_number ( mwIndex  index,
int  key_num 
) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1724 of file mex.cc.

References data, and nfields.

const char* mxArray_struct::get_field_name_by_number ( int  key_num) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1734 of file mex.cc.

References fields, and nfields.

int mxArray_struct::get_field_number ( const char key) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1739 of file mex.cc.

References fields, and nfields.

void* mxArray_matlab::get_imag_data ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse, and mxArray_number.

Definition at line 811 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mwIndex* mxArray_matlab::get_ir ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 827 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mwIndex* mxArray_matlab::get_jc ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 833 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mwSize mxArray_matlab::get_m ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 718 of file mex.cc.

References mxArray_matlab::dims.

Referenced by mxArray_sparse::as_octave_value().

mwSize mxArray_matlab::get_n ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 720 of file mex.cc.

References mxArray_matlab::dims, and mxArray_matlab::ndims.

Referenced by mxArray_sparse::as_octave_value(), and mxArray_sparse::mxArray_sparse().

mwSize mxArray_matlab::get_number_of_dimensions ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 732 of file mex.cc.

References mxArray_matlab::ndims.

Referenced by mxArray_matlab::dims_to_dim_vector().

mwSize mxArray_matlab::get_number_of_elements ( void  ) const
inlinevirtualinherited
int mxArray_struct::get_number_of_fields ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1732 of file mex.cc.

References nfields.

mwSize mxArray_matlab::get_nzmax ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 839 of file mex.cc.

References mxArray_matlab::invalid_type_error().

double mxArray_matlab::get_scalar ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_number.

Definition at line 799 of file mex.cc.

References mxArray_matlab::invalid_type_error().

int mxArray_matlab::get_string ( char ,
mwSize   
) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_number.

Definition at line 900 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_struct::init ( const char **  keys)
inline

Definition at line 1598 of file mex.cc.

References fields, nfields, and mxArray::strsave().

Referenced by mxArray_struct().

int mxArray_matlab::is_cell ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 669 of file mex.cc.

References mxCELL_CLASS.

int mxArray_matlab::is_char ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 671 of file mex.cc.

References mxCHAR_CLASS.

virtual int mxArray_base::is_class ( const char name_arg) const
inlinevirtualinherited

Definition at line 144 of file mxarray.h.

References mxArray_base::get_class_name().

Referenced by mxArray::is_class().

virtual int mxArray_base::is_class ( const char name_arg) const
inlinevirtualinherited

Definition at line 144 of file mxarray.in.h.

References mxArray_base::get_class_name().

int mxArray_matlab::is_complex ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse, and mxArray_number.

Definition at line 673 of file mex.cc.

int mxArray_matlab::is_double ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 675 of file mex.cc.

References mxDOUBLE_CLASS.

int mxArray_matlab::is_empty ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 754 of file mex.cc.

References mxArray_matlab::get_number_of_elements().

int mxArray_matlab::is_function_handle ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 677 of file mex.cc.

References mxFUNCTION_CLASS.

int mxArray_matlab::is_int16 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 679 of file mex.cc.

References mxINT16_CLASS.

int mxArray_matlab::is_int32 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 681 of file mex.cc.

References mxINT32_CLASS.

int mxArray_matlab::is_int64 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 683 of file mex.cc.

References mxINT64_CLASS.

int mxArray_matlab::is_int8 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 685 of file mex.cc.

References mxINT8_CLASS.

int mxArray_matlab::is_logical ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 687 of file mex.cc.

References mxLOGICAL_CLASS.

virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtualinherited
virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtualinherited
int mxArray_matlab::is_logical_scalar_true ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 712 of file mex.cc.

References mxArray_matlab::get_data(), and mxArray_base::is_logical_scalar().

int mxArray_matlab::is_numeric ( void  ) const
inlinevirtualinherited
virtual bool mxArray_base::is_octave_value ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 138 of file mxarray.in.h.

virtual bool mxArray_base::is_octave_value ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 138 of file mxarray.h.

Referenced by mxArray::is_octave_value(), and mxArray::maybe_mutate().

int mxArray_matlab::is_single ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 698 of file mex.cc.

References mxSINGLE_CLASS.

int mxArray_matlab::is_sparse ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 700 of file mex.cc.

int mxArray_matlab::is_struct ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 702 of file mex.cc.

References mxSTRUCT_CLASS.

int mxArray_matlab::is_uint16 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 704 of file mex.cc.

References mxUINT16_CLASS.

int mxArray_matlab::is_uint32 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 706 of file mex.cc.

References mxUINT32_CLASS.

int mxArray_matlab::is_uint64 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 708 of file mex.cc.

References mxUINT64_CLASS.

int mxArray_matlab::is_uint8 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 710 of file mex.cc.

References mxUINT8_CLASS.

virtual mxArray* mxArray_base::mutate ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 274 of file mxarray.h.

Referenced by mxArray::maybe_mutate(), and mxArray::mutate().

virtual mxArray* mxArray_base::mutate ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 274 of file mxarray.in.h.

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 272 of file mxarray.in.h.

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 272 of file mxarray.h.

Referenced by mxArray::mutation_needed().

mxArray_struct& mxArray_struct::operator= ( const mxArray_struct val)
private
void mxArray_struct::remove_field ( int  key_num)
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1673 of file mex.cc.

References data, fields, mxArray_matlab::get_number_of_elements(), mxArray::malloc(), mxFree(), and nfields.

void mxArray_matlab::set_cell ( mwIndex  ,
mxArray  
)
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 794 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_class_name ( const char name_arg)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 781 of file mex.cc.

References mxArray_matlab::class_name, mxArray::malloc(), and mxFree().

void mxArray_struct::set_data ( void *  data_arg)
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1757 of file mex.cc.

References data.

void mxArray_matlab::set_dimensions ( mwSize dims_arg,
mwSize  ndims_arg 
)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 738 of file mex.cc.

References mxArray_matlab::dims, and mxArray_matlab::ndims.

void mxArray_struct::set_field_by_number ( mwIndex  index,
int  key_num,
mxArray val 
)
virtual

Reimplemented from mxArray_matlab.

Definition at line 2375 of file mex.cc.

References data, maybe_unmark_array(), and nfields.

void mxArray_matlab::set_imag_data ( void *  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse, and mxArray_number.

Definition at line 822 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_ir ( mwIndex )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 845 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_jc ( mwIndex )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 850 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_m ( mwSize  m)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 734 of file mex.cc.

References mxArray_matlab::dims.

void mxArray_matlab::set_n ( mwSize  n)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 736 of file mex.cc.

References mxArray_matlab::dims.

void mxArray_matlab::set_nzmax ( mwSize  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 855 of file mex.cc.

References mxArray_matlab::invalid_type_error().

Member Data Documentation

mxArray** mxArray_struct::data
private
char** mxArray_struct::fields
private
int mxArray_struct::nfields
private

The documentation for this class was generated from the following file: