47 #if ! defined (MXARRAY_H)
93 #if ! defined (MXARRAY_TYPEDEFS_ONLY)
99 #define DO_MUTABLE_METHOD(RET_T, METHOD_CALL) \
100 RET_T retval = rep->METHOD_CALL; \
102 if (rep->mutation_needed ()) \
105 retval = rep->METHOD_CALL; \
110 #define DO_VOID_MUTABLE_METHOD(METHOD_CALL) \
113 if (rep->mutation_needed ()) \
140 virtual int is_cell (
void)
const = 0;
142 virtual int is_char (
void)
const = 0;
150 if (cname && name_arg)
151 retval = ! strcmp (cname, name_arg);
162 virtual int is_int16 (
void)
const = 0;
164 virtual int is_int32 (
void)
const = 0;
166 virtual int is_int64 (
void)
const = 0;
168 virtual int is_int8 (
void)
const = 0;
186 virtual int is_uint8 (
void)
const = 0;
211 virtual int is_empty (
void)
const = 0;
229 virtual void *
get_data (
void)
const = 0;
233 virtual void set_data (
void *pr) = 0;
249 virtual int add_field (
const char *key) = 0;
284 error (
"invalid type for operation");
287 void error (
const char *msg)
const;
416 void set_name (
const char *name_arg);
487 static void *
malloc (
size_t n);
489 static void *
calloc (
size_t n,
size_t t);
499 strcpy (retval, str);
529 #undef DO_MUTABLE_METHOD
530 #undef DO_VOID_MUTABLE_METHOD
virtual int get_field_number(const char *key) const =0
mxArray & operator=(const mxArray &)
void set_name(const char *name_arg)
mxArray(const octave_value &ov)
int get_string(char *buf, mwSize buflen) const
virtual mxArray_base * dup(void) const =0
virtual int is_numeric(void) const =0
virtual mxClassID get_class_id(void) const =0
const char * get_name(void) const
#define DO_VOID_MUTABLE_METHOD(METHOD_CALL)
void set_field_by_number(mwIndex index, int key_num, mxArray *val)
virtual int is_uint32(void) const =0
virtual const char * get_class_name(void) const =0
virtual int is_complex(void) const =0
bool is_octave_value(void) const
int get_field_number(const char *key) const
void set_imag_data(void *pi)
int is_logical(void) const
int is_logical_scalar(void) const
virtual int is_logical_scalar_true(void) const =0
mxArray * dup(void) const
mwSize get_number_of_dimensions(void) const
virtual void set_nzmax(mwSize nzmax)=0
int is_uint16(void) const
virtual void set_m(mwSize m)=0
virtual int get_number_of_fields(void) const =0
void invalid_type_error(void) const
static void * malloc(size_t n)
void * get_data(void) const
int is_struct(void) const
virtual void set_cell(mwIndex idx, mxArray *val)=0
octave_value as_octave_value(void) const
virtual int is_struct(void) const =0
int is_complex(void) const
virtual bool is_octave_value(void) const
mxArray * get_field_by_number(mwIndex index, int key_num) const
mwSize * get_dimensions(void) const
double get_scalar(void) const
void set_nzmax(mwSize nzmax)
virtual double get_scalar(void) const =0
int is_double(void) const
bool mutation_needed(void) const
int is_sparse(void) const
void set_dimensions(mwSize *dims_arg, mwSize ndims_arg)
virtual void remove_field(int key_num)=0
virtual int is_uint64(void) const =0
void set_cell(mwIndex idx, mxArray *val)
mxArray * get_cell(mwIndex idx) const
virtual void set_data(void *pr)=0
mwIndex * get_ir(void) const
virtual mwSize get_n(void) const =0
virtual int get_string(char *buf, mwSize buflen) const =0
virtual ~mxArray_base(void)
virtual int is_int32(void) const =0
virtual void * get_imag_data(void) const =0
virtual int is_class(const char *name_arg) const
virtual mwIndex * get_ir(void) const =0
int is_uint64(void) const
virtual int add_field(const char *key)=0
int is_uint32(void) const
static char * strsave(const char *str)
virtual int is_logical(void) const =0
const char * get_field_name_by_number(int key_num) const
virtual mwIndex calc_single_subscript(mwSize nsubs, mwIndex *subs) const =0
static void * calloc(size_t n, size_t t)
int get_number_of_fields(void) const
virtual mwSize get_nzmax(void) const =0
virtual int is_empty(void) const =0
void set_class_name(const char *name_arg)
virtual octave_value as_octave_value(void) const =0
virtual int is_cell(void) const =0
mxClassID get_class_id(void) const
virtual void set_ir(mwIndex *ir)=0
virtual int is_sparse(void) const =0
virtual void set_jc(mwIndex *jc)=0
virtual size_t get_element_size(void) const =0
mwIndex calc_single_subscript(mwSize nsubs, mwIndex *subs) const
void error(const char *msg) const
int add_field(const char *key)
mwSize get_nzmax(void) const
virtual mwSize get_number_of_elements(void) const =0
size_t get_element_size(void) const
int is_single(void) const
virtual mwSize * get_dimensions(void) const =0
virtual mwSize get_m(void) const =0
OCTAVE_IDX_TYPE mwSignedIndex
virtual bool mutation_needed(void) const
mwSize get_number_of_elements(void) const
virtual mxArray * as_mxArray(void) const
virtual mxArray * get_cell(mwIndex) const
virtual int is_uint16(void) const =0
#define DO_MUTABLE_METHOD(RET_T, METHOD_CALL)
mxArray * mutate(void) const
void * get_imag_data(void) const
virtual mwIndex * get_jc(void) const =0
virtual void set_class_name(const char *name_arg)=0
virtual char * array_to_string(void) const =0
virtual int is_logical_scalar(void) const
virtual int is_uint8(void) const =0
virtual int is_function_handle(void) const =0
virtual int is_int16(void) const =0
int is_numeric(void) const
mxArray(mxArray_base *r, const char *n)
virtual void set_imag_data(void *pi)=0
mwIndex * get_jc(void) const
virtual int is_single(void) const =0
const char * get_class_name(void) const
virtual void set_field_by_number(mwIndex index, int key_num, mxArray *val)=0
virtual int is_int64(void) const =0
mxArray_base(const mxArray_base &)
int is_function_handle(void) const
int is_logical_scalar_true(void) const
virtual void * get_data(void) const =0
virtual const char * get_field_name_by_number(int key_num) const =0
virtual void set_n(mwSize n)=0
virtual int is_int8(void) const =0
void remove_field(int key_num)
int is_class(const char *name_arg) const
char * array_to_string(void) const
virtual mxArray * mutate(void) const
virtual int is_char(void) const =0
virtual mwSize get_number_of_dimensions(void) const =0
virtual int is_double(void) const =0
void maybe_mutate(void) const
virtual void set_dimensions(mwSize *dims_arg, mwSize ndims_arg)=0
virtual mxArray * get_field_by_number(mwIndex index, int key_num) const =0