GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
mex Class Reference
Collaboration diagram for mex:
Collaboration graph
[legend]

Public Member Functions

 mex (octave_mex_function *f)
 
 ~mex (void)
 
void abort (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 charfunction_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)
 
void * realloc (void *ptr, size_t n)
 
void unmark (void *ptr)
 
void unmark_array (mxArray *ptr)
 
void unmark_foreign (void *ptr)
 

Static Public Member Functions

static void cleanup (void *ptr)
 

Public Attributes

jmp_buf jump
 
int trap_feval_error
 

Private Member Functions

 mex (const mex &)
 
void global_mark (void *ptr)
 
void global_unmark (void *ptr)
 
mexoperator= (const mex &)
 

Private Attributes

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

Static Private Attributes

static std::set< void * > global_memlist
 

Detailed Description

Definition at line 2005 of file mex.cc.

Constructor & Destructor Documentation

mex::mex ( octave_mex_function f)
inline

Definition at line 2009 of file mex.cc.

mex::~mex ( void  )
inline

Definition at line 2012 of file mex.cc.

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

mex::mex ( const mex )
private

Member Function Documentation

void mex::abort ( void  )
inline

Definition at line 2274 of file mex.cc.

Referenced by malloc_unmarked(), mexCallMATLAB(), mexErrMsgIdAndTxt(), and mexErrMsgTxt().

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

Definition at line 2099 of file mex.cc.

References calloc_unmarked(), and mark().

Referenced by mxCalloc().

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

Definition at line 2089 of file mex.cc.

References malloc_unmarked().

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

static void mex::cleanup ( void *  ptr)
inlinestatic

Definition at line 2039 of file mex.cc.

References arraylist, context, memlist, and xfree().

Referenced by call_mex().

octave_mex_function* mex::current_mex_function ( void  ) const
inline

Definition at line 2262 of file mex.cc.

References curr_mex_fcn.

Referenced by mexAtExit().

void mex::free ( void *  ptr)
inline

Definition at line 2142 of file mex.cc.

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

Referenced by mxFree().

bool mex::free_value ( mxArray ptr)
inline

Definition at line 2242 of file mex.cc.

References arraylist, and warning().

Referenced by mxDestroyArray().

const char* mex::function_name ( void  ) const
inline
void mex::global_mark ( void *  ptr)
inlineprivate

Definition at line 2298 of file mex.cc.

References function_name(), and warning().

Referenced by malloc_unmarked().

void mex::global_unmark ( void *  ptr)
inlineprivate

Definition at line 2309 of file mex.cc.

References function_name(), and warning().

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

Definition at line 2236 of file mex.cc.

References mark_array().

Referenced by call_mex(), mexCallMATLAB(), and mexGetVariable().

void* mex::malloc ( size_t  n)
inline

Definition at line 2079 of file mex.cc.

References malloc_unmarked(), and mark().

Referenced by mxMalloc(), and realloc().

void* mex::malloc_unmarked ( size_t  n)
inline

Definition at line 2059 of file mex.cc.

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

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

void mex::mark ( void *  ptr)
inline

Definition at line 2171 of file mex.cc.

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

Referenced by calloc(), and malloc().

mxArray* mex::mark_array ( mxArray ptr)
inline

Definition at line 2195 of file mex.cc.

References arraylist.

Referenced by make_value(), and maybe_mark_array().

void mex::mark_foreign ( void *  ptr)
inline

Definition at line 2210 of file mex.cc.

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

Referenced by maybe_mark_foreign().

mex& mex::operator= ( const mex )
private
void* mex::realloc ( void *  ptr,
size_t  n 
)
inline

Definition at line 2111 of file mex.cc.

References global_memlist, malloc(), and memlist.

Referenced by mxRealloc().

void mex::unmark ( void *  ptr)
inline

Definition at line 2183 of file mex.cc.

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

Referenced by free(), and maybe_unmark().

void mex::unmark_array ( mxArray ptr)
inline

Definition at line 2201 of file mex.cc.

References arraylist.

Referenced by maybe_unmark_array().

void mex::unmark_foreign ( void *  ptr)
inline

Definition at line 2221 of file mex.cc.

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

Member Data Documentation

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

Definition at line 2285 of file mex.cc.

Referenced by cleanup(), free_value(), mark_array(), and unmark_array().

octave_mex_function* mex::curr_mex_fcn
private

Definition at line 2279 of file mex.cc.

Referenced by current_mex_function().

char* mex::fname
mutableprivate

Definition at line 2292 of file mex.cc.

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

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

Definition at line 2289 of file mex.cc.

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

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

Definition at line 2295 of file mex.cc.

Referenced by free(), and realloc().

jmp_buf mex::jump

Definition at line 2271 of file mex.cc.

Referenced by call_mex().

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

Definition at line 2282 of file mex.cc.

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

int mex::trap_feval_error

Definition at line 2268 of file mex.cc.

Referenced by mexCallMATLAB(), and mexSetTrapFlag().


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