GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mxArray_base Class Referenceabstract

#include "mxarray.h"

Inheritance diagram for mxArray_base:
Collaboration diagram for mxArray_base:

Public Member Functions

virtual ~mxArray_base (void)=default
 
virtual int add_field (const char *key)=0
 
virtual char * array_to_string (void) const =0
 
virtual mxArrayas_mxArray (void) const
 
virtual octave_value as_octave_value (void) const =0
 
virtual mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const =0
 
virtual mxArray_basedup (void) const =0
 
virtual mxArrayget_cell (mwIndex) const
 
virtual mxClassID get_class_id (void) const =0
 
virtual const char * get_class_name (void) const =0
 
virtual mxComplexDouble * get_complex_doubles (void) const =0
 
virtual mxComplexSingle * get_complex_singles (void) const =0
 
virtual void * get_data (void) const =0
 
virtual mwSize * get_dimensions (void) const =0
 
virtual mxDouble * get_doubles (void) const =0
 
virtual std::size_t get_element_size (void) const =0
 
virtual mxArrayget_field_by_number (mwIndex index, int key_num) const =0
 
virtual const char * get_field_name_by_number (int key_num) const =0
 
virtual int get_field_number (const char *key) const =0
 
virtual void * get_imag_data (void) const =0
 
virtual mxInt16 * get_int16s (void) const =0
 
virtual mxInt32 * get_int32s (void) const =0
 
virtual mxInt64 * get_int64s (void) const =0
 
virtual mxInt8 * get_int8s (void) const =0
 
virtual mwIndex * get_ir (void) const =0
 
virtual mwIndex * get_jc (void) const =0
 
virtual mwSize get_m (void) const =0
 
virtual mwSize get_n (void) const =0
 
virtual mwSize get_number_of_dimensions (void) const =0
 
virtual mwSize get_number_of_elements (void) const =0
 
virtual int get_number_of_fields (void) const =0
 
virtual mwSize get_nzmax (void) const =0
 
virtual mxArrayget_property (mwIndex, const char *) const
 
virtual double get_scalar (void) const =0
 
virtual mxSingle * get_singles (void) const =0
 
virtual int get_string (char *buf, mwSize buflen) const =0
 
virtual mxUint16 * get_uint16s (void) const =0
 
virtual mxUint32 * get_uint32s (void) const =0
 
virtual mxUint64 * get_uint64s (void) const =0
 
virtual mxUint8 * get_uint8s (void) const =0
 
virtual int is_char (void) const =0
 
virtual int is_class (const char *name_arg) const
 
virtual int is_complex (void) const =0
 
virtual int is_double (void) const =0
 
virtual int is_function_handle (void) const =0
 
virtual int is_int16 (void) const =0
 
virtual int is_int32 (void) const =0
 
virtual int is_int64 (void) const =0
 
virtual int is_int8 (void) const =0
 
virtual int is_logical (void) const =0
 
virtual int is_logical_scalar (void) const
 
virtual int is_logical_scalar_true (void) const =0
 
virtual int is_numeric (void) const =0
 
virtual bool is_octave_value (void) const
 
virtual bool is_scalar (void) const =0
 
virtual int is_single (void) const =0
 
virtual int is_sparse (void) const =0
 
virtual int is_struct (void) const =0
 
virtual int is_uint16 (void) const =0
 
virtual int is_uint32 (void) const =0
 
virtual int is_uint64 (void) const =0
 
virtual int is_uint8 (void) const =0
 
virtual int iscell (void) const =0
 
virtual int isempty (void) const =0
 
virtual mxArraymutate (void) const
 
virtual bool mutation_needed (void) const
 
virtual void remove_field (int key_num)=0
 
virtual void set_cell (mwIndex idx, mxArray *val)=0
 
virtual void set_class_name (const char *name_arg)=0
 
virtual int set_complex_doubles (mxComplexDouble *data)=0
 
virtual int set_complex_singles (mxComplexSingle *data)=0
 
virtual void set_data (void *pr)=0
 
virtual int set_dimensions (mwSize *dims_arg, mwSize ndims_arg)=0
 
virtual int set_doubles (mxDouble *data)=0
 
virtual void set_field_by_number (mwIndex index, int key_num, mxArray *val)=0
 
virtual void set_imag_data (void *pi)=0
 
virtual int set_int16s (mxInt16 *data)=0
 
virtual int set_int32s (mxInt32 *data)=0
 
virtual int set_int64s (mxInt64 *data)=0
 
virtual int set_int8s (mxInt8 *data)=0
 
virtual void set_ir (mwIndex *ir)=0
 
virtual void set_jc (mwIndex *jc)=0
 
virtual void set_m (mwSize m)=0
 
virtual void set_n (mwSize n)=0
 
virtual void set_nzmax (mwSize nzmax)=0
 
virtual void set_property (mwIndex, const char *, const mxArray *)
 
virtual int set_singles (mxSingle *data)=0
 
virtual int set_uint16s (mxUint16 *data)=0
 
virtual int set_uint32s (mxUint32 *data)=0
 
virtual int set_uint64s (mxUint64 *data)=0
 
virtual int set_uint8s (mxUint8 *data)=0
 

Protected Member Functions

OCTINTERP_API mxArray_base (bool interleaved)
 
 mxArray_base (const mxArray_base &)=default
 
OCTAVE_NORETURN void err_invalid_type (const char *op) const
 
std::size_t get_numeric_element_size (std::size_t size) const
 

Protected Attributes

bool m_interleaved
 

Detailed Description

Definition at line 89 of file mxarray.h.

Constructor & Destructor Documentation

◆ mxArray_base() [1/2]

mxArray_base::mxArray_base ( bool  interleaved)
protected

Definition at line 402 of file mex.cc.

◆ ~mxArray_base()

virtual mxArray_base::~mxArray_base ( void  )
virtualdefault

◆ mxArray_base() [2/2]

mxArray_base::mxArray_base ( const mxArray_base )
protecteddefault

Member Function Documentation

◆ add_field()

virtual int mxArray_base::add_field ( const char *  key)
pure virtual

◆ array_to_string()

virtual char* mxArray_base::array_to_string ( void  ) const
pure virtual

◆ as_mxArray()

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

Reimplemented in mxArray_octave_value.

Definition at line 99 of file mxarray.h.

Referenced by mxArray::dup().

◆ as_octave_value()

virtual octave_value mxArray_base::as_octave_value ( void  ) const
pure virtual

◆ calc_single_subscript()

virtual mwIndex mxArray_base::calc_single_subscript ( mwSize  nsubs,
mwIndex *  subs 
) const
pure virtual

◆ dup()

◆ err_invalid_type()

OCTAVE_NORETURN void mxArray_base::err_invalid_type ( const char *  op) const
inlineprotected

Definition at line 322 of file mxarray.h.

References error().

Referenced by mxArray_matlab::add_field(), mxArray_matlab::array_to_string(), mxArray_matlab::get_cell(), mxArray_matlab::get_complex_doubles(), mxArray_matlab::get_complex_singles(), mxArray_matlab::get_data(), mxArray_matlab::get_doubles(), mxArray_matlab::get_field_by_number(), mxArray_matlab::get_field_name_by_number(), mxArray_matlab::get_imag_data(), mxArray_matlab::get_int16s(), mxArray_matlab::get_int32s(), mxArray_matlab::get_int64s(), mxArray_matlab::get_int8s(), mxArray_matlab::get_ir(), mxArray_matlab::get_jc(), mxArray_matlab::get_number_of_fields(), mxArray_matlab::get_nzmax(), mxArray_matlab::get_scalar(), mxArray_matlab::get_singles(), mxArray_matlab::get_string(), mxArray_matlab::get_uint16s(), mxArray_matlab::get_uint32s(), mxArray_matlab::get_uint64s(), mxArray_matlab::get_uint8s(), mxArray_matlab::remove_field(), mxArray_matlab::set_cell(), mxArray_matlab::set_complex_doubles(), mxArray_matlab::set_complex_singles(), mxArray_matlab::set_data(), mxArray_matlab::set_doubles(), mxArray_matlab::set_field_by_number(), mxArray_matlab::set_imag_data(), mxArray_matlab::set_int16s(), mxArray_matlab::set_int32s(), mxArray_matlab::set_int64s(), mxArray_matlab::set_int8s(), mxArray_matlab::set_ir(), mxArray_matlab::set_jc(), mxArray_matlab::set_nzmax(), mxArray_octave_value::set_property(), mxArray_matlab::set_singles(), mxArray_matlab::set_uint16s(), mxArray_matlab::set_uint32s(), mxArray_matlab::set_uint64s(), and mxArray_matlab::set_uint8s().

◆ get_cell()

virtual mxArray* mxArray_base::get_cell ( mwIndex  ) const
inlinevirtual

Reimplemented in mxArray_matlab, mxArray_octave_value, and mxArray_cell.

Definition at line 203 of file mxarray.h.

◆ get_class_id()

virtual mxClassID mxArray_base::get_class_id ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::get_class_id().

◆ get_class_name()

virtual const char* mxArray_base::get_class_name ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::get_class_name().

◆ get_complex_doubles()

virtual mxComplexDouble* mxArray_base::get_complex_doubles ( void  ) const
pure virtual

◆ get_complex_singles()

virtual mxComplexSingle* mxArray_base::get_complex_singles ( void  ) const
pure virtual

◆ get_data()

virtual void* mxArray_base::get_data ( void  ) const
pure virtual

◆ get_dimensions()

virtual mwSize* mxArray_base::get_dimensions ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::get_dimensions().

◆ get_doubles()

virtual mxDouble* mxArray_base::get_doubles ( void  ) const
pure virtual

◆ get_element_size()

virtual std::size_t mxArray_base::get_element_size ( void  ) const
pure virtual

◆ get_field_by_number()

virtual mxArray* mxArray_base::get_field_by_number ( mwIndex  index,
int  key_num 
) const
pure virtual

◆ get_field_name_by_number()

virtual const char* mxArray_base::get_field_name_by_number ( int  key_num) const
pure virtual

◆ get_field_number()

virtual int mxArray_base::get_field_number ( const char *  key) const
pure virtual

◆ get_imag_data()

virtual void* mxArray_base::get_imag_data ( void  ) const
pure virtual

◆ get_int16s()

virtual mxInt16* mxArray_base::get_int16s ( void  ) const
pure virtual

◆ get_int32s()

virtual mxInt32* mxArray_base::get_int32s ( void  ) const
pure virtual

◆ get_int64s()

virtual mxInt64* mxArray_base::get_int64s ( void  ) const
pure virtual

◆ get_int8s()

virtual mxInt8* mxArray_base::get_int8s ( void  ) const
pure virtual

◆ get_ir()

virtual mwIndex* mxArray_base::get_ir ( void  ) const
pure virtual

◆ get_jc()

virtual mwIndex* mxArray_base::get_jc ( void  ) const
pure virtual

◆ get_m()

virtual mwSize mxArray_base::get_m ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::get_m().

◆ get_n()

virtual mwSize mxArray_base::get_n ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::get_n().

◆ get_number_of_dimensions()

virtual mwSize mxArray_base::get_number_of_dimensions ( void  ) const
pure virtual

◆ get_number_of_elements()

virtual mwSize mxArray_base::get_number_of_elements ( void  ) const
pure virtual

◆ get_number_of_fields()

virtual int mxArray_base::get_number_of_fields ( void  ) const
pure virtual

◆ get_numeric_element_size()

std::size_t mxArray_base::get_numeric_element_size ( std::size_t  size) const
inlineprotected

◆ get_nzmax()

virtual mwSize mxArray_base::get_nzmax ( void  ) const
pure virtual

◆ get_property()

virtual mxArray* mxArray_base::get_property ( mwIndex  ,
const char *   
) const
inlinevirtual

Reimplemented in mxArray_octave_value.

Definition at line 192 of file mxarray.h.

Referenced by mxArray::get_property().

◆ get_scalar()

virtual double mxArray_base::get_scalar ( void  ) const
pure virtual

◆ get_singles()

virtual mxSingle* mxArray_base::get_singles ( void  ) const
pure virtual

◆ get_string()

virtual int mxArray_base::get_string ( char *  buf,
mwSize  buflen 
) const
pure virtual

◆ get_uint16s()

virtual mxUint16* mxArray_base::get_uint16s ( void  ) const
pure virtual

◆ get_uint32s()

virtual mxUint32* mxArray_base::get_uint32s ( void  ) const
pure virtual

◆ get_uint64s()

virtual mxUint64* mxArray_base::get_uint64s ( void  ) const
pure virtual

◆ get_uint8s()

virtual mxUint8* mxArray_base::get_uint8s ( void  ) const
pure virtual

◆ is_char()

virtual int mxArray_base::is_char ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_char().

◆ is_class()

virtual int mxArray_base::is_class ( const char *  name_arg) const
inlinevirtual

Definition at line 109 of file mxarray.h.

References strcmp().

Referenced by mxArray::is_class().

◆ is_complex()

virtual int mxArray_base::is_complex ( void  ) const
pure virtual

◆ is_double()

virtual int mxArray_base::is_double ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_double().

◆ is_function_handle()

virtual int mxArray_base::is_function_handle ( void  ) const
pure virtual

◆ is_int16()

virtual int mxArray_base::is_int16 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_int16().

◆ is_int32()

virtual int mxArray_base::is_int32 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_int32().

◆ is_int64()

virtual int mxArray_base::is_int64 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_int64().

◆ is_int8()

virtual int mxArray_base::is_int8 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_int8().

◆ is_logical()

virtual int mxArray_base::is_logical ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_logical().

◆ is_logical_scalar()

virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtual

◆ is_logical_scalar_true()

virtual int mxArray_base::is_logical_scalar_true ( void  ) const
pure virtual

◆ is_numeric()

virtual int mxArray_base::is_numeric ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_numeric().

◆ is_octave_value()

virtual bool mxArray_base::is_octave_value ( void  ) const
inlinevirtual

Reimplemented in mxArray_octave_value.

Definition at line 103 of file mxarray.h.

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

◆ is_scalar()

virtual bool mxArray_base::is_scalar ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_scalar().

◆ is_single()

virtual int mxArray_base::is_single ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_single().

◆ is_sparse()

virtual int mxArray_base::is_sparse ( void  ) const
pure virtual

◆ is_struct()

virtual int mxArray_base::is_struct ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_struct().

◆ is_uint16()

virtual int mxArray_base::is_uint16 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_uint16().

◆ is_uint32()

virtual int mxArray_base::is_uint32 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_uint32().

◆ is_uint64()

virtual int mxArray_base::is_uint64 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_uint64().

◆ is_uint8()

virtual int mxArray_base::is_uint8 ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::is_uint8().

◆ iscell()

virtual int mxArray_base::iscell ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

Referenced by mxArray::iscell().

◆ isempty()

virtual int mxArray_base::isempty ( void  ) const
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

◆ mutate()

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

Reimplemented in mxArray_octave_value.

Definition at line 307 of file mxarray.h.

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

◆ mutation_needed()

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtual

Reimplemented in mxArray_octave_value.

Definition at line 305 of file mxarray.h.

Referenced by mxArray::mutation_needed().

◆ remove_field()

virtual void mxArray_base::remove_field ( int  key_num)
pure virtual

◆ set_cell()

virtual void mxArray_base::set_cell ( mwIndex  idx,
mxArray val 
)
pure virtual

◆ set_class_name()

virtual void mxArray_base::set_class_name ( const char *  name_arg)
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

◆ set_complex_doubles()

virtual int mxArray_base::set_complex_doubles ( mxComplexDouble *  data)
pure virtual

◆ set_complex_singles()

virtual int mxArray_base::set_complex_singles ( mxComplexSingle *  data)
pure virtual

◆ set_data()

virtual void mxArray_base::set_data ( void *  pr)
pure virtual

◆ set_dimensions()

virtual int mxArray_base::set_dimensions ( mwSize *  dims_arg,
mwSize  ndims_arg 
)
pure virtual

Implemented in mxArray_matlab, and mxArray_octave_value.

◆ set_doubles()

virtual int mxArray_base::set_doubles ( mxDouble *  data)
pure virtual

◆ set_field_by_number()

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

◆ set_imag_data()

virtual void mxArray_base::set_imag_data ( void *  pi)
pure virtual

◆ set_int16s()

virtual int mxArray_base::set_int16s ( mxInt16 *  data)
pure virtual

◆ set_int32s()

virtual int mxArray_base::set_int32s ( mxInt32 *  data)
pure virtual

◆ set_int64s()

virtual int mxArray_base::set_int64s ( mxInt64 *  data)
pure virtual

◆ set_int8s()

virtual int mxArray_base::set_int8s ( mxInt8 *  data)
pure virtual

◆ set_ir()

virtual void mxArray_base::set_ir ( mwIndex *  ir)
pure virtual

◆ set_jc()

virtual void mxArray_base::set_jc ( mwIndex *  jc)
pure virtual

◆ set_m()

virtual void mxArray_base::set_m ( mwSize  m)
pure virtual

Implemented in mxArray_octave_value, and mxArray_matlab.

◆ set_n()

virtual void mxArray_base::set_n ( mwSize  n)
pure virtual

Implemented in mxArray_octave_value, and mxArray_matlab.

◆ set_nzmax()

virtual void mxArray_base::set_nzmax ( mwSize  nzmax)
pure virtual

◆ set_property()

virtual void mxArray_base::set_property ( mwIndex  ,
const char *  ,
const mxArray  
)
inlinevirtual

Reimplemented in mxArray_octave_value.

Definition at line 197 of file mxarray.h.

Referenced by mxArray::set_property().

◆ set_singles()

virtual int mxArray_base::set_singles ( mxSingle *  data)
pure virtual

◆ set_uint16s()

virtual int mxArray_base::set_uint16s ( mxUint16 *  data)
pure virtual

◆ set_uint32s()

virtual int mxArray_base::set_uint32s ( mxUint32 *  data)
pure virtual

◆ set_uint64s()

virtual int mxArray_base::set_uint64s ( mxUint64 *  data)
pure virtual

◆ set_uint8s()

virtual int mxArray_base::set_uint8s ( mxUint8 *  data)
pure virtual

Member Data Documentation

◆ m_interleaved

bool mxArray_base::m_interleaved
protected

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