Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes

mex Class Reference

Collaboration diagram for mex:
Collaboration graph
[legend]

List of all members.

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 2106 of file mex.cc.


Constructor & Destructor Documentation

mex::mex ( octave_mex_function f  )  [inline]

Definition at line 2110 of file mex.cc.

mex::~mex ( void   )  [inline]

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

References jump.

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

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

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

References malloc_unmarked().

Referenced by calloc().

static void mex::cleanup ( void *  ptr  )  [inline, static]

Definition at line 2140 of file mex.cc.

References arraylist, memlist, and xfree().

Referenced by call_mex().

octave_mex_function* mex::current_mex_function ( void   )  const [inline]

Definition at line 2363 of file mex.cc.

References curr_mex_fcn.

Referenced by mexAtExit().

void mex::free ( void *  ptr  )  [inline]

Definition at line 2243 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 2343 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  )  [inline, private]

Definition at line 2399 of file mex.cc.

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

Referenced by malloc_unmarked().

void mex::global_unmark ( void *  ptr  )  [inline, private]

Definition at line 2410 of file mex.cc.

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

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

Definition at line 2337 of file mex.cc.

References mark_array().

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

void* mex::malloc ( size_t  n  )  [inline]

Definition at line 2180 of file mex.cc.

References malloc_unmarked(), and mark().

Referenced by malloc_unmarked(), mxMalloc(), and realloc().

void* mex::malloc_unmarked ( size_t  n  )  [inline]

Definition at line 2160 of file mex.cc.

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

Referenced by calloc_unmarked(), and malloc().

void mex::mark ( void *  ptr  )  [inline]

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

References arraylist.

Referenced by make_value(), and maybe_mark_array().

void mex::mark_foreign ( void *  ptr  )  [inline]

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

References global_memlist, malloc(), and memlist.

Referenced by mxRealloc().

void mex::unmark ( void *  ptr  )  [inline]

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

References arraylist.

Referenced by maybe_unmark_array().

void mex::unmark_foreign ( void *  ptr  )  [inline]

Definition at line 2322 of file mex.cc.

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


Member Data Documentation

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

Definition at line 2386 of file mex.cc.

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

Definition at line 2380 of file mex.cc.

Referenced by current_mex_function().

char* mex::fname [mutable, private]

Definition at line 2393 of file mex.cc.

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

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

Definition at line 2390 of file mex.cc.

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

std::set< void * > mex::global_memlist [static, private]

Definition at line 2396 of file mex.cc.

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

jmp_buf mex::jump

Definition at line 2372 of file mex.cc.

Referenced by abort(), and call_mex().

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

Definition at line 2383 of file mex.cc.

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

Definition at line 2369 of file mex.cc.

Referenced by mexCallMATLAB(), and mexSetTrapFlag().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines