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_matlab Class Referenceabstract
Inheritance diagram for mxArray_matlab:
Inheritance graph
[legend]
Collaboration diagram for mxArray_matlab:
Collaboration graph
[legend]

Public Member Functions

 ~mxArray_matlab (void)
 
int add_field (const char *)
 
chararray_to_string (void) const
 
virtual mxArrayas_mxArray (void) const
 
virtual mxArrayas_mxArray (void) const
 
virtual octave_value as_octave_value (void) const =0
 
virtual octave_value as_octave_value (void) const =0
 
mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const
 
virtual mxArray_basedup (void) const =0
 
virtual mxArray_basedup (void) const =0
 
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, int) const
 
const charget_field_name_by_number (int) const
 
int get_field_number (const char *) 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
 
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)
 
void set_cell (mwIndex, mxArray *)
 
void set_class_name (const char *name_arg)
 
void set_data (void *)
 
void set_dimensions (mwSize *dims_arg, mwSize ndims_arg)
 
void set_field_by_number (mwIndex, int, mxArray *)
 
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

 mxArray_matlab (mxClassID id_arg=mxUNKNOWN_CLASS)
 
 mxArray_matlab (mxClassID id_arg, mwSize ndims_arg, const mwSize *dims_arg)
 
 mxArray_matlab (mxClassID id_arg, const dim_vector &dv)
 
 mxArray_matlab (mxClassID id_arg, mwSize m, mwSize n)
 
 mxArray_matlab (const mxArray_matlab &val)
 
dim_vector dims_to_dim_vector (void) const
 
void error (const char *msg) const
 
void error (const char *msg) const
 

Private Member Functions

void invalid_type_error (void) const
 
mxArray_matlaboperator= (const mxArray_matlab &)
 

Private Attributes

charclass_name
 
mwSizedims
 
mxClassID id
 
mwSize ndims
 

Detailed Description

Definition at line 606 of file mex.cc.

Constructor & Destructor Documentation

mxArray_matlab::mxArray_matlab ( mxClassID  id_arg = mxUNKNOWN_CLASS)
inlineprotected

Definition at line 610 of file mex.cc.

mxArray_matlab::mxArray_matlab ( mxClassID  id_arg,
mwSize  ndims_arg,
const mwSize dims_arg 
)
inlineprotected

Definition at line 613 of file mex.cc.

References dims, and ndims.

mxArray_matlab::mxArray_matlab ( mxClassID  id_arg,
const dim_vector dv 
)
inlineprotected

Definition at line 636 of file mex.cc.

References dims, and ndims.

mxArray_matlab::mxArray_matlab ( mxClassID  id_arg,
mwSize  m,
mwSize  n 
)
inlineprotected

Definition at line 653 of file mex.cc.

References dims.

mxArray_matlab::~mxArray_matlab ( void  )
inline

Definition at line 663 of file mex.cc.

References class_name, dims, and mxFree().

mxArray_matlab::mxArray_matlab ( const mxArray_matlab val)
inlineprotected

Definition at line 942 of file mex.cc.

References dims, and ndims.

Member Function Documentation

int mxArray_matlab::add_field ( const char )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 860 of file mex.cc.

References invalid_type_error().

char* mxArray_matlab::array_to_string ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_number.

Definition at line 906 of file mex.cc.

References 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.

virtual octave_value mxArray_base::as_octave_value ( void  ) const
pure virtualinherited
virtual octave_value mxArray_base::as_octave_value ( void  ) const
pure virtualinherited
mwIndex mxArray_matlab::calc_single_subscript ( mwSize  nsubs,
mwIndex subs 
) const
inlinevirtual

Implements mxArray_base.

Definition at line 912 of file mex.cc.

References calc_single_subscript_internal(), dims, and ndims.

dim_vector mxArray_matlab::dims_to_dim_vector ( void  ) const
inlineprotected
virtual mxArray_base* mxArray_base::dup ( void  ) const
pure virtualinherited
virtual mxArray_base* mxArray_base::dup ( void  ) const
pure virtualinherited
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
inlinevirtual

Reimplemented from mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 788 of file mex.cc.

References invalid_type_error().

mxClassID mxArray_matlab::get_class_id ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 756 of file mex.cc.

References id.

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

const char* mxArray_matlab::get_class_name ( void  ) const
inlinevirtual
void* mxArray_matlab::get_data ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_cell, mxArray_struct, mxArray_sparse, and mxArray_number.

Definition at line 805 of file mex.cc.

References invalid_type_error().

Referenced by is_logical_scalar_true().

mwSize* mxArray_matlab::get_dimensions ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 730 of file mex.cc.

References dims.

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

size_t mxArray_matlab::get_element_size ( void  ) const
inlinevirtual
mxArray* mxArray_matlab::get_field_by_number ( mwIndex  ,
int   
) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 871 of file mex.cc.

References invalid_type_error().

const char* mxArray_matlab::get_field_name_by_number ( int  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 889 of file mex.cc.

References invalid_type_error().

int mxArray_matlab::get_field_number ( const char ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 895 of file mex.cc.

void* mxArray_matlab::get_imag_data ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse, and mxArray_number.

Definition at line 811 of file mex.cc.

References invalid_type_error().

mwIndex* mxArray_matlab::get_ir ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 827 of file mex.cc.

References invalid_type_error().

mwIndex* mxArray_matlab::get_jc ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 833 of file mex.cc.

References invalid_type_error().

mwSize mxArray_matlab::get_m ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 718 of file mex.cc.

References dims.

Referenced by mxArray_sparse::as_octave_value().

mwSize mxArray_matlab::get_n ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 720 of file mex.cc.

References dims, and ndims.

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

mwSize mxArray_matlab::get_number_of_dimensions ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 732 of file mex.cc.

References ndims.

Referenced by dims_to_dim_vector().

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

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 883 of file mex.cc.

References invalid_type_error().

mwSize mxArray_matlab::get_nzmax ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 839 of file mex.cc.

References invalid_type_error().

double mxArray_matlab::get_scalar ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_number.

Definition at line 799 of file mex.cc.

References invalid_type_error().

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

Implements mxArray_base.

Reimplemented in mxArray_number.

Definition at line 900 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::invalid_type_error ( void  ) const
inlineprivate
int mxArray_matlab::is_cell ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 669 of file mex.cc.

References mxCELL_CLASS.

int mxArray_matlab::is_char ( void  ) const
inlinevirtual

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
inlinevirtual

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
inlinevirtual

Implements mxArray_base.

Definition at line 675 of file mex.cc.

References mxDOUBLE_CLASS.

int mxArray_matlab::is_empty ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 754 of file mex.cc.

References get_number_of_elements().

int mxArray_matlab::is_function_handle ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 677 of file mex.cc.

References mxFUNCTION_CLASS.

int mxArray_matlab::is_int16 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 679 of file mex.cc.

References mxINT16_CLASS.

int mxArray_matlab::is_int32 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 681 of file mex.cc.

References mxINT32_CLASS.

int mxArray_matlab::is_int64 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 683 of file mex.cc.

References mxINT64_CLASS.

int mxArray_matlab::is_int8 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 685 of file mex.cc.

References mxINT8_CLASS.

int mxArray_matlab::is_logical ( void  ) const
inlinevirtual

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
inlinevirtual

Implements mxArray_base.

Definition at line 712 of file mex.cc.

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

int mxArray_matlab::is_numeric ( void  ) const
inlinevirtual
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
inlinevirtual

Implements mxArray_base.

Definition at line 698 of file mex.cc.

References mxSINGLE_CLASS.

int mxArray_matlab::is_sparse ( void  ) const
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 700 of file mex.cc.

int mxArray_matlab::is_struct ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 702 of file mex.cc.

References mxSTRUCT_CLASS.

int mxArray_matlab::is_uint16 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 704 of file mex.cc.

References mxUINT16_CLASS.

int mxArray_matlab::is_uint32 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 706 of file mex.cc.

References mxUINT32_CLASS.

int mxArray_matlab::is_uint64 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 708 of file mex.cc.

References mxUINT64_CLASS.

int mxArray_matlab::is_uint8 ( void  ) const
inlinevirtual

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.h.

Referenced by mxArray::mutation_needed().

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

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

mxArray_matlab& mxArray_matlab::operator= ( const mxArray_matlab )
private
void mxArray_matlab::remove_field ( int  )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 866 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::set_cell ( mwIndex  ,
mxArray  
)
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 794 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::set_class_name ( const char name_arg)
inlinevirtual

Implements mxArray_base.

Definition at line 781 of file mex.cc.

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

void mxArray_matlab::set_data ( void *  )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_cell, mxArray_struct, mxArray_sparse, and mxArray_number.

Definition at line 817 of file mex.cc.

References invalid_type_error().

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

Implements mxArray_base.

Definition at line 738 of file mex.cc.

References dims, and ndims.

void mxArray_matlab::set_field_by_number ( mwIndex  ,
int  ,
mxArray  
)
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 877 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::set_imag_data ( void *  )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse, and mxArray_number.

Definition at line 822 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::set_ir ( mwIndex )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 845 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::set_jc ( mwIndex )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 850 of file mex.cc.

References invalid_type_error().

void mxArray_matlab::set_m ( mwSize  m)
inlinevirtual

Implements mxArray_base.

Definition at line 734 of file mex.cc.

References dims.

void mxArray_matlab::set_n ( mwSize  n)
inlinevirtual

Implements mxArray_base.

Definition at line 736 of file mex.cc.

References dims.

void mxArray_matlab::set_nzmax ( mwSize  )
inlinevirtual

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 855 of file mex.cc.

References invalid_type_error().

Member Data Documentation

char* mxArray_matlab::class_name
private

Definition at line 969 of file mex.cc.

Referenced by set_class_name(), and ~mxArray_matlab().

mwSize* mxArray_matlab::dims
private
mxClassID mxArray_matlab::id
private

Definition at line 971 of file mex.cc.

Referenced by get_class_id().

mwSize mxArray_matlab::ndims
private

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