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

Public Member Functions

 mex (const mex &)=delete
 
 mex (octave_mex_function *f)
 
 ~mex (void)
 
void * calloc (size_t n, size_t t)
 
void * calloc_unmarked (size_t n, size_t t)
 
octave_mex_functioncurrent_mex_function (void) const
 
void free (void *ptr)
 
bool free_value (mxArray *ptr)
 
const char * function_name (void) const
 
mxArraymake_value (const octave_value &ov)
 
void * malloc (size_t n)
 
void * malloc_unmarked (size_t n)
 
void mark (void *ptr)
 
mxArraymark_array (mxArray *ptr)
 
void mark_foreign (void *ptr)
 
mexoperator= (const mex &)=delete
 
void * realloc (void *ptr, size_t n)
 
void unmark (void *ptr)
 
void unmark_array (mxArray *ptr)
 
void unmark_foreign (void *ptr)
 

Public Attributes

int trap_feval_error = 0
 

Private Member Functions

void global_mark (void *ptr)
 
void global_unmark (void *ptr)
 

Private Attributes

std::set< mxArray * > arraylist
 
octave_mex_functioncurr_mex_fcn
 
char * fname
 
std::set< void * > foreign_memlist
 
std::set< void * > memlist
 

Static Private Attributes

static std::set< void * > global_memlist
 

Detailed Description

Definition at line 2129 of file mex.cc.

Constructor & Destructor Documentation

◆ mex() [1/2]

mex::mex ( octave_mex_function f)
inline

Definition at line 2133 of file mex.cc.

◆ mex() [2/2]

mex::mex ( const mex )
delete

◆ ~mex()

mex::~mex ( void  )
inline

Definition at line 2142 of file mex.cc.

References arraylist, error(), fname, function_name(), memlist, mxFree(), and xfree().

Member Function Documentation

◆ calloc()

void* mex::calloc ( size_t  n,
size_t  t 
)
inline

Definition at line 2225 of file mex.cc.

References calloc_unmarked(), mark(), and n.

Referenced by mxCalloc().

◆ calloc_unmarked()

void* mex::calloc_unmarked ( size_t  n,
size_t  t 
)
inline

Definition at line 2215 of file mex.cc.

References malloc_unmarked(), and n.

Referenced by calloc(), and mxArray::calloc().

◆ current_mex_function()

octave_mex_function* mex::current_mex_function ( void  ) const
inline

Definition at line 2390 of file mex.cc.

References curr_mex_fcn.

Referenced by mexAtExit().

◆ free()

void mex::free ( void *  ptr)
inline

Definition at line 2270 of file mex.cc.

References foreign_memlist, global_memlist, unmark(), warning(), and xfree().

Referenced by mxFree().

◆ free_value()

bool mex::free_value ( mxArray ptr)
inline

Definition at line 2370 of file mex.cc.

References arraylist, and warning().

Referenced by mxDestroyArray().

◆ function_name()

◆ global_mark()

void mex::global_mark ( void *  ptr)
inlineprivate

Definition at line 2420 of file mex.cc.

References function_name(), global_memlist, and warning().

Referenced by malloc_unmarked().

◆ global_unmark()

void mex::global_unmark ( void *  ptr)
inlineprivate

Definition at line 2431 of file mex.cc.

References function_name(), global_memlist, and warning().

◆ make_value()

mxArray* mex::make_value ( const octave_value ov)
inline

Definition at line 2364 of file mex.cc.

References mark_array().

Referenced by mexCallMATLAB(), and mexGetVariable().

◆ malloc()

void* mex::malloc ( size_t  n)
inline

Definition at line 2205 of file mex.cc.

References malloc_unmarked(), mark(), and n.

Referenced by mxMalloc(), and realloc().

◆ malloc_unmarked()

void* mex::malloc_unmarked ( size_t  n)
inline

Definition at line 2188 of file mex.cc.

References error(), function_name(), global_mark(), malloc(), and n.

Referenced by calloc_unmarked(), malloc(), and mxArray::malloc().

◆ mark()

void mex::mark ( void *  ptr)
inline

Definition at line 2299 of file mex.cc.

References function_name(), memlist, and warning().

Referenced by calloc(), and malloc().

◆ mark_array()

mxArray* mex::mark_array ( mxArray ptr)
inline

Definition at line 2323 of file mex.cc.

References arraylist.

Referenced by make_value(), and maybe_mark_array().

◆ mark_foreign()

void mex::mark_foreign ( void *  ptr)
inline

Definition at line 2338 of file mex.cc.

References foreign_memlist, function_name(), and warning().

Referenced by maybe_mark_foreign().

◆ operator=()

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

◆ realloc()

void* mex::realloc ( void *  ptr,
size_t  n 
)
inline

Definition at line 2237 of file mex.cc.

References global_memlist, malloc(), memlist, and n.

Referenced by mxRealloc().

◆ unmark()

void mex::unmark ( void *  ptr)
inline

Definition at line 2311 of file mex.cc.

References function_name(), memlist, and warning().

Referenced by free(), and maybe_unmark().

◆ unmark_array()

void mex::unmark_array ( mxArray ptr)
inline

Definition at line 2329 of file mex.cc.

References arraylist.

Referenced by maybe_unmark_array().

◆ unmark_foreign()

void mex::unmark_foreign ( void *  ptr)
inline

Definition at line 2349 of file mex.cc.

References foreign_memlist, function_name(), and warning().

Member Data Documentation

◆ arraylist

std::set<mxArray *> mex::arraylist
private

Definition at line 2407 of file mex.cc.

Referenced by ~mex(), free_value(), mark_array(), and unmark_array().

◆ curr_mex_fcn

octave_mex_function* mex::curr_mex_fcn
private

Definition at line 2401 of file mex.cc.

Referenced by current_mex_function().

◆ fname

char* mex::fname
mutableprivate

Definition at line 2414 of file mex.cc.

Referenced by ~mex(), and function_name().

◆ foreign_memlist

std::set<void *> mex::foreign_memlist
private

Definition at line 2411 of file mex.cc.

Referenced by free(), mark_foreign(), and unmark_foreign().

◆ global_memlist

std::set< void * > mex::global_memlist
staticprivate

Definition at line 2417 of file mex.cc.

Referenced by free(), global_mark(), global_unmark(), and realloc().

◆ memlist

std::set<void *> mex::memlist
private

Definition at line 2404 of file mex.cc.

Referenced by ~mex(), mark(), realloc(), and unmark().

◆ trap_feval_error

int mex::trap_feval_error = 0

Definition at line 2396 of file mex.cc.

Referenced by mexCallMATLAB(), mexCallMATLABWithTrap(), and mexSetTrapFlag().


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