GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mxArray_octave_value Class Reference
Inheritance diagram for mxArray_octave_value:
Collaboration diagram for mxArray_octave_value:

Public Member Functions

 mxArray_octave_value (const octave_value &ov)
 
 ~mxArray_octave_value (void)
 
int add_field (const char *)
 
char * array_to_string (void) const
 
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 char * get_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 char * get_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
 
mxArrayget_property (mwIndex idx, const char *pname) const
 
double get_scalar (void) const
 
int get_string (char *buf, mwSize buflen) const
 
int is_char (void) const
 
virtual int is_class (const char *name_arg) const
 
int is_complex (void) const
 
int is_double (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
 
int is_logical_scalar_true (void) const
 
int is_numeric (void) const
 
bool is_octave_value (void) const
 
int is_range (void) const
 
bool is_scalar (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
 
int iscell (void) const
 
int isempty (void) const
 
int isreal (void) const
 
mxArraymutate (void) const
 
bool mutation_needed (void) const
 
mxArray_octave_valueoperator= (const mxArray_octave_value &)=delete
 
void remove_field (int)
 
void request_mutation (void) const
 
void set_cell (mwIndex, mxArray *)
 
void set_class_name (const char *)
 
void set_data (void *)
 
int set_dimensions (mwSize *, mwSize)
 
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)
 
void set_n (mwSize)
 
void set_nzmax (mwSize)
 
void set_property (mwIndex idx, const char *pname, const mxArray *pval)
 

Protected Member Functions

 mxArray_octave_value (const mxArray_octave_value &arg)
 
OCTAVE_NORETURN void err_invalid_type (void) const
 

Private Attributes

char * class_name
 
mwSizedims
 
mxClassID id
 
bool mutate_flag
 
mwSize ndims
 
octave_value val
 

Detailed Description

Definition at line 160 of file mex.cc.

Constructor & Destructor Documentation

◆ mxArray_octave_value() [1/2]

mxArray_octave_value::mxArray_octave_value ( const octave_value ov)
inline

Definition at line 164 of file mex.cc.

Referenced by dup().

◆ ~mxArray_octave_value()

mxArray_octave_value::~mxArray_octave_value ( void  )
inline

Definition at line 212 of file mex.cc.

References class_name, dims, and mxFree().

◆ mxArray_octave_value() [2/2]

mxArray_octave_value::mxArray_octave_value ( const mxArray_octave_value arg)
inlineprotected

Definition at line 636 of file mex.cc.

References dims, and ndims.

Member Function Documentation

◆ add_field()

int mxArray_octave_value::add_field ( const char *  )
inlinevirtual

Implements mxArray_base.

Definition at line 497 of file mex.cc.

References request_mutation().

◆ array_to_string()

char* mxArray_octave_value::array_to_string ( void  ) const
inlinevirtual

◆ as_mxArray()

mxArray* mxArray_octave_value::as_mxArray ( void  ) const
inlinevirtual

Reimplemented from mxArray_base.

Definition at line 175 of file mex.cc.

References octave_value::as_mxArray(), class_name, dims, mxFree(), ndims, retval, and val.

Referenced by mutate().

◆ as_octave_value()

octave_value mxArray_octave_value::as_octave_value ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 632 of file mex.cc.

References val.

◆ calc_single_subscript()

mwIndex mxArray_octave_value::calc_single_subscript ( mwSize  nsubs,
mwIndex subs 
) const
inlinevirtual

Implements mxArray_base.

Definition at line 584 of file mex.cc.

References calc_single_subscript_internal(), dims, get_dimensions(), and ndims.

◆ dup()

mxArray_base* mxArray_octave_value::dup ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 173 of file mex.cc.

References mxArray_octave_value().

◆ err_invalid_type()

OCTAVE_NORETURN void mxArray_base::err_invalid_type ( void  ) const
inlineprotectedinherited

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

References error().

Referenced by mxArray_base::get_cell(), set_property(), and mxArray_base::set_property().

◆ get_cell()

mxArray* mxArray_octave_value::get_cell ( mwIndex  ) const
inlinevirtual

Reimplemented from mxArray_base.

Definition at line 416 of file mex.cc.

References request_mutation().

◆ get_class_id()

◆ get_class_name()

const char* mxArray_octave_value::get_class_name ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 369 of file mex.cc.

References class_name, octave_value::class_name(), mxArray::strsave(), and val.

◆ get_data()

void* mxArray_octave_value::get_data ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 445 of file mex.cc.

References maybe_mark_foreign(), octave_value::mex_get_data(), request_mutation(), retval, and val.

◆ get_dimensions()

mwSize* mxArray_octave_value::get_dimensions ( void  ) const
inlinevirtual

◆ get_element_size()

size_t mxArray_octave_value::get_element_size ( void  ) const
inlinevirtual

◆ get_field_by_number()

mxArray* mxArray_octave_value::get_field_by_number ( mwIndex  ,
int   
) const
inlinevirtual

Implements mxArray_base.

Definition at line 506 of file mex.cc.

References request_mutation().

◆ get_field_name_by_number()

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

Implements mxArray_base.

Definition at line 521 of file mex.cc.

References request_mutation().

◆ get_field_number()

int mxArray_octave_value::get_field_number ( const char *  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 527 of file mex.cc.

References request_mutation().

◆ get_imag_data()

void* mxArray_octave_value::get_imag_data ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 457 of file mex.cc.

References is_numeric(), isreal(), request_mutation(), and retval.

◆ get_ir()

mwIndex* mxArray_octave_value::get_ir ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 475 of file mex.cc.

References maybe_mark_foreign(), octave_value::mex_get_ir(), and val.

◆ get_jc()

mwIndex* mxArray_octave_value::get_jc ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 480 of file mex.cc.

References maybe_mark_foreign(), octave_value::mex_get_jc(), and val.

◆ get_m()

mwSize mxArray_octave_value::get_m ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 265 of file mex.cc.

References octave_value::rows(), and val.

◆ get_n()

mwSize mxArray_octave_value::get_n ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 267 of file mex.cc.

References dims, get_dimensions(), n, and ndims.

◆ get_number_of_dimensions()

mwSize mxArray_octave_value::get_number_of_dimensions ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 298 of file mex.cc.

References get_dimensions(), and ndims.

◆ get_number_of_elements()

mwSize mxArray_octave_value::get_number_of_elements ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 317 of file mex.cc.

References octave_value::numel(), and val.

Referenced by array_to_string(), and get_string().

◆ get_number_of_fields()

int mxArray_octave_value::get_number_of_fields ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 519 of file mex.cc.

References octave_value::nfields(), and val.

◆ get_nzmax()

mwSize mxArray_octave_value::get_nzmax ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 485 of file mex.cc.

References octave_value::nzmax(), and val.

◆ get_property()

mxArray* mxArray_octave_value::get_property ( mwIndex  idx,
const char *  pname 
) const
inlinevirtual

◆ get_scalar()

double mxArray_octave_value::get_scalar ( void  ) const
inlinevirtual

◆ get_string()

int mxArray_octave_value::get_string ( char *  buf,
mwSize  buflen 
) const
inlinevirtual

◆ is_char()

int mxArray_octave_value::is_char ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 222 of file mex.cc.

References octave_value::is_string(), and val.

◆ is_class()

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

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

References mxArray_base::get_class_name(), retval, and octave::string::strcmp().

Referenced by mxArray::is_class().

◆ is_complex()

int mxArray_octave_value::is_complex ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 224 of file mex.cc.

References octave_value::iscomplex(), and val.

◆ is_double()

int mxArray_octave_value::is_double ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 226 of file mex.cc.

References octave_value::is_double_type(), and val.

◆ is_function_handle()

int mxArray_octave_value::is_function_handle ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 228 of file mex.cc.

References octave_value::is_function_handle(), and val.

◆ is_int16()

int mxArray_octave_value::is_int16 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 230 of file mex.cc.

References octave_value::is_int16_type(), and val.

◆ is_int32()

int mxArray_octave_value::is_int32 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 232 of file mex.cc.

References octave_value::is_int32_type(), and val.

◆ is_int64()

int mxArray_octave_value::is_int64 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 234 of file mex.cc.

References octave_value::is_int64_type(), and val.

◆ is_int8()

int mxArray_octave_value::is_int8 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 236 of file mex.cc.

References octave_value::is_int8_type(), and val.

◆ is_logical()

int mxArray_octave_value::is_logical ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 238 of file mex.cc.

References octave_value::islogical(), and val.

◆ is_logical_scalar()

virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtualinherited

◆ is_logical_scalar_true()

int mxArray_octave_value::is_logical_scalar_true ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 260 of file mex.cc.

References mxArray_base::is_logical_scalar(), octave_value::is_true(), and val.

◆ is_numeric()

int mxArray_octave_value::is_numeric ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 240 of file mex.cc.

References octave_value::isnumeric(), and val.

Referenced by get_imag_data().

◆ is_octave_value()

bool mxArray_octave_value::is_octave_value ( void  ) const
inlinevirtual

Reimplemented from mxArray_base.

Definition at line 218 of file mex.cc.

◆ is_range()

int mxArray_octave_value::is_range ( void  ) const
inline

Definition at line 256 of file mex.cc.

References octave_value::is_range(), and val.

◆ is_scalar()

bool mxArray_octave_value::is_scalar ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 321 of file mex.cc.

References dims, get_dimensions(), and ndims.

◆ is_single()

int mxArray_octave_value::is_single ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 242 of file mex.cc.

References octave_value::is_single_type(), and val.

◆ is_sparse()

int mxArray_octave_value::is_sparse ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 244 of file mex.cc.

References octave_value::issparse(), and val.

◆ is_struct()

int mxArray_octave_value::is_struct ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 246 of file mex.cc.

References octave_value::isstruct(), and val.

◆ is_uint16()

int mxArray_octave_value::is_uint16 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 248 of file mex.cc.

References octave_value::is_uint16_type(), and val.

◆ is_uint32()

int mxArray_octave_value::is_uint32 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 250 of file mex.cc.

References octave_value::is_uint32_type(), and val.

◆ is_uint64()

int mxArray_octave_value::is_uint64 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 252 of file mex.cc.

References octave_value::is_uint64_type(), and val.

◆ is_uint8()

int mxArray_octave_value::is_uint8 ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 254 of file mex.cc.

References octave_value::is_uint8_type(), and val.

◆ iscell()

int mxArray_octave_value::iscell ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 220 of file mex.cc.

References octave_value::iscell(), and val.

◆ isempty()

int mxArray_octave_value::isempty ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 319 of file mex.cc.

References octave_value::isempty(), and val.

◆ isreal()

int mxArray_octave_value::isreal ( void  ) const
inline

Definition at line 258 of file mex.cc.

References octave_value::isreal(), and val.

Referenced by get_imag_data().

◆ mutate()

mxArray* mxArray_octave_value::mutate ( void  ) const
inlinevirtual

Reimplemented from mxArray_base.

Definition at line 630 of file mex.cc.

References as_mxArray().

◆ mutation_needed()

bool mxArray_octave_value::mutation_needed ( void  ) const
inlinevirtual

Reimplemented from mxArray_base.

Definition at line 620 of file mex.cc.

References mutate_flag.

◆ operator=()

mxArray_octave_value& mxArray_octave_value::operator= ( const mxArray_octave_value )
delete

◆ remove_field()

void mxArray_octave_value::remove_field ( int  )
inlinevirtual

Implements mxArray_base.

Definition at line 504 of file mex.cc.

References request_mutation().

◆ request_mutation()

◆ set_cell()

void mxArray_octave_value::set_cell ( mwIndex  ,
mxArray  
)
inlinevirtual

Implements mxArray_base.

Definition at line 423 of file mex.cc.

References request_mutation().

◆ set_class_name()

void mxArray_octave_value::set_class_name ( const char *  )
inlinevirtual

Implements mxArray_base.

Definition at line 381 of file mex.cc.

References request_mutation().

◆ set_data()

void mxArray_octave_value::set_data ( void *  )
inlinevirtual

Implements mxArray_base.

Definition at line 470 of file mex.cc.

References request_mutation().

◆ set_dimensions()

int mxArray_octave_value::set_dimensions ( mwSize ,
mwSize   
)
inlinevirtual

Implements mxArray_base.

Definition at line 310 of file mex.cc.

References request_mutation().

◆ set_field_by_number()

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

Implements mxArray_base.

Definition at line 513 of file mex.cc.

References request_mutation().

◆ set_imag_data()

void mxArray_octave_value::set_imag_data ( void *  )
inlinevirtual

Implements mxArray_base.

Definition at line 473 of file mex.cc.

References request_mutation().

◆ set_ir()

void mxArray_octave_value::set_ir ( mwIndex )
inlinevirtual

Implements mxArray_base.

Definition at line 488 of file mex.cc.

References request_mutation().

◆ set_jc()

void mxArray_octave_value::set_jc ( mwIndex )
inlinevirtual

Implements mxArray_base.

Definition at line 491 of file mex.cc.

References request_mutation().

◆ set_m()

void mxArray_octave_value::set_m ( mwSize  )
inlinevirtual

Implements mxArray_base.

Definition at line 306 of file mex.cc.

References request_mutation().

◆ set_n()

void mxArray_octave_value::set_n ( mwSize  )
inlinevirtual

Implements mxArray_base.

Definition at line 308 of file mex.cc.

References request_mutation().

◆ set_nzmax()

void mxArray_octave_value::set_nzmax ( mwSize  )
inlinevirtual

Implements mxArray_base.

Definition at line 494 of file mex.cc.

References request_mutation().

◆ set_property()

void mxArray_octave_value::set_property ( mwIndex  idx,
const char *  pname,
const mxArray pval 
)
inlinevirtual

Member Data Documentation

◆ class_name

char* mxArray_octave_value::class_name
mutableprivate

Definition at line 662 of file mex.cc.

Referenced by ~mxArray_octave_value(), as_mxArray(), and get_class_name().

◆ dims

mwSize* mxArray_octave_value::dims
mutableprivate

◆ id

mxClassID mxArray_octave_value::id
mutableprivate

Definition at line 661 of file mex.cc.

Referenced by get_class_id().

◆ mutate_flag

bool mxArray_octave_value::mutate_flag
mutableprivate

Definition at line 655 of file mex.cc.

Referenced by mutation_needed(), and request_mutation().

◆ ndims

mwSize mxArray_octave_value::ndims
mutableprivate

◆ val


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