GNU Octave  8.1.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 (std::size_t n, std::size_t t)
 
void * calloc_unmarked (std::size_t n, std::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
 
void global_mark (void *ptr)
 
void global_unmark (void *ptr)
 
mxArraymake_value (const octave_value &ov)
 
void * malloc (std::size_t n)
 
void * malloc_unmarked (std::size_t n)
 
void mark (void *ptr)
 
mxArraymark_array (mxArray *ptr)
 
void mark_foreign (void *ptr)
 
mexoperator= (const mex &)=delete
 
void * realloc (void *ptr, std::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 Attributes

std::set< mxArray * > m_arraylist
 
octave_mex_functionm_curr_mex_fcn
 
char * m_fname
 
std::set< void * > m_foreign_memlist
 
std::set< void * > m_memlist
 

Static Private Attributes

static std::set< void * > s_global_memlist
 

Detailed Description

Definition at line 3411 of file mex.cc.

Constructor & Destructor Documentation

◆ mex() [1/2]

mex::mex ( octave_mex_function f)
inline

Definition at line 3415 of file mex.cc.

◆ mex() [2/2]

mex::mex ( const mex )
delete

◆ ~mex()

mex::~mex ( void  )
inline

Definition at line 3424 of file mex.cc.

References error(), function_name(), m_arraylist, m_fname, m_memlist, mxFree(), and xfree().

Member Function Documentation

◆ calloc()

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

Definition at line 3506 of file mex.cc.

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

Referenced by mxCalloc().

◆ calloc_unmarked()

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

Definition at line 3496 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 3673 of file mex.cc.

References m_curr_mex_fcn.

Referenced by mexAtExit().

◆ free()

void mex::free ( void *  ptr)
inline

Definition at line 3551 of file mex.cc.

References m_foreign_memlist, s_global_memlist, unmark(), warning(), and xfree().

Referenced by mxFree().

◆ free_value()

bool mex::free_value ( mxArray ptr)
inline

Definition at line 3653 of file mex.cc.

References m_arraylist, and warning().

Referenced by mxDestroyArray().

◆ function_name()

const char* mex::function_name ( void  ) const
inline

◆ global_mark()

void mex::global_mark ( void *  ptr)
inline

Definition at line 3682 of file mex.cc.

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

Referenced by malloc_unmarked().

◆ global_unmark()

void mex::global_unmark ( void *  ptr)
inline

Definition at line 3693 of file mex.cc.

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

◆ make_value()

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

◆ malloc()

void* mex::malloc ( std::size_t  n)
inline

Definition at line 3486 of file mex.cc.

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

Referenced by mxMalloc(), and realloc().

◆ malloc_unmarked()

void* mex::malloc_unmarked ( std::size_t  n)
inline

Definition at line 3469 of file mex.cc.

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

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

◆ mark()

void mex::mark ( void *  ptr)
inline

Definition at line 3580 of file mex.cc.

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

Referenced by calloc(), and malloc().

◆ mark_array()

mxArray* mex::mark_array ( mxArray ptr)
inline

Definition at line 3604 of file mex.cc.

References m_arraylist.

Referenced by make_value(), and maybe_mark_array().

◆ mark_foreign()

void mex::mark_foreign ( void *  ptr)
inline

Definition at line 3619 of file mex.cc.

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

Referenced by maybe_mark_foreign().

◆ operator=()

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

◆ realloc()

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

Definition at line 3518 of file mex.cc.

References m_memlist, malloc(), n, s_global_memlist, and xrealloc().

Referenced by mxRealloc().

◆ unmark()

void mex::unmark ( void *  ptr)
inline

Definition at line 3592 of file mex.cc.

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

Referenced by free(), and maybe_unmark().

◆ unmark_array()

void mex::unmark_array ( mxArray ptr)
inline

Definition at line 3610 of file mex.cc.

References m_arraylist.

Referenced by maybe_unmark_array().

◆ unmark_foreign()

void mex::unmark_foreign ( void *  ptr)
inline

Definition at line 3630 of file mex.cc.

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

Member Data Documentation

◆ m_arraylist

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

Definition at line 3714 of file mex.cc.

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

◆ m_curr_mex_fcn

octave_mex_function& mex::m_curr_mex_fcn
private

Definition at line 3708 of file mex.cc.

Referenced by current_mex_function(), and make_value().

◆ m_fname

char* mex::m_fname
mutableprivate

Definition at line 3721 of file mex.cc.

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

◆ m_foreign_memlist

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

Definition at line 3718 of file mex.cc.

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

◆ m_memlist

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

Definition at line 3711 of file mex.cc.

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

◆ s_global_memlist

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

Definition at line 3724 of file mex.cc.

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

◆ trap_feval_error

int mex::trap_feval_error = 0

Definition at line 3679 of file mex.cc.

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


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