|
|
| ValueMex () |
| | Standard ctor.
|
| |
|
| ValueMex (const ValueMex &other) |
| | Copy ctor for const objects.
|
| |
|
| ValueMex (ValueMex &other) |
| | Move ctor for lvalues.
|
| |
|
| ValueMex (ValueMex &&other) |
| | Move ctor for rvalues (temporary objects)
|
| |
|
ValueMex & | operator= (const ValueMex &other) |
| | Assignment operator for const objects.
|
| |
|
ValueMex & | operator= (ValueMex &other) |
| | Move assignment operator for lvalues.
|
| |
|
ValueMex & | operator= (ValueMex &&other) |
| | Move assignment operator for rvalues (temporary objects)
|
| |
| | ValueMex (const mxArray *pcItem) |
| | Copy ctor for mxArrays. More...
|
| |
| | ValueMex (mwIndex m, mwIndex n, int clsid=mxDOUBLE_CLASS) |
| | Ctor allocating new MATLAB matrix object. More...
|
| |
| ValueMex & | Adopt (bool doAdopt=true) |
| | Take ownership (custody) of a MEX array. More...
|
| |
| void | Destroy () |
| | Dtor. More...
|
| |
|
const mxArray * | Item () const |
| | Returns hosted MATLAB array.
|
| |
|
mxArray * | Item () |
| | Returns hosted MATLAB array.
|
| |
|
ValueMex | Duplicate () const |
| | Returns a duplictae of the hosted MATLAB array.
|
| |
|
mxArray * | Detach () |
| | Detach hosted MATLAB array.
|
| |
|
size_t | GetM () const |
| | Returns row count (1st dimension)
|
| |
|
size_t | GetN () const |
| | Returns col count (2nd dimension)
|
| |
|
bool | IsEmpty () const |
| | Returns true if item is NULL or empty ([])
|
| |
|
bool | IsCell () const |
| | Returns true if item is a cell array.
|
| |
|
bool | IsComplex () const |
| | Returns true if item is not NULL and complex.
|
| |
|
bool | IsScalar () const |
| | Returns true if item consists of exact 1 element.
|
| |
|
bool | IsStruct () const |
| | Returns true if item is a struct array.
|
| |
|
bool | IsVector () const |
| | Returns true if m_pcItem is of size 1xN or Mx1.
|
| |
|
bool | IsDoubleClass () const |
| | Returns true if m_pcItem is of type mxDOUBLE_CLASS.
|
| |
|
bool | IsFunctionHandle () const |
| | Returns true if m_pcItem is of type mxFUNCTION_CLASS.
|
| |
|
size_t | NumElements () const |
| | Returns number of elements.
|
| |
|
size_t | ByElement () const |
| | Returns size in bytes of one element.
|
| |
|
int | NumDims () const |
| | Returns number of dimensions.
|
| |
|
size_t | ByData () const |
| | Returns data size in bytes.
|
| |
|
mxClassID | ClassID () const |
| | Returns item class ID or mxUNKNOWN_CLASS if item is NULL.
|
| |
| type_complexity_e | Complexity (bool bCanSerialize=false) const |
| | Get complexity information. Which storage level is necessary (scalar, vector, matrix, text, blob) More...
|
| |
|
void * | Data () const |
| | Returns pointer to raw data.
|
| |
| char * | GetString (bool flagUTF=false, const char *format=NULL) const |
| | Convert a string to char, due flagUTF converted to utf8. More...
|
| |
| char * | GetEncString () const |
| | Returns allocated memory with items test, due to global flag converted to UTF. More...
|
| |
| int | GetInt (int errval=0) const |
| | Get integer value from item. More...
|
| |
| sqlite3_int64 | GetInt64 (int errval=0) const |
| | Get 64 bit integer value from item. More...
|
| |
| double | GetScalar () const |
| |
| const mxArray * | GetField (int n, const char *name) const |
| | Get field from a struct array. More...
|
| |
| void | SetCell (int i, const mxArray *cell) |
| | Sets a cell of a MATLAB cell array. More...
|
| |
|
void | MakePersistent () |
| | Make the MATLAB array persistent.
|
| |
|
void | Throw () |
| | Throws an exception if any occured.
|
| |
| void | Call (ValueMex *lhs, ValueMex *exception) |
| | Calling a MATLAB function (handle) with arguemnts. More...
|
| |
|
| ~ValueBase () |
| | Dtor.
|
| |
|
|
bool | m_isConst |
| | if flagged as non-const, class may swap memory ownership (custody)
|
| |
|
union { |
|
double | m_float |
| | floating point representation
|
| |
|
sqlite3_int64 | m_integer |
| | integer representation
|
| |
|
char * | m_text |
| | text representation or allocated memory ()
|
| |
|
mxArray * | m_blob |
| | binary large object representation
|
| |
|
mxArray * | m_pcItem |
| | MATLAB variable representation.
|
| |
|
tagNativeArray * | m_array |
| | self allocated variable representation
|
| |
|
long long | m_largest_field |
| | largest member used to copy entire union (dummy field)
|
| |
| }; | |
| |
|
| ValueBase () |
| | Standard ctor.
|
| |
|
| ValueBase (const ValueBase &other) |
| | Copy ctor for constant objects.
|
| |
|
| ValueBase (ValueBase &other) |
| | Move ctor for lvalues.
|
| |
|
| ValueBase (ValueBase &&other) |
| | Move ctor for rvalues (temporary objects)
|
| |
|
ValueBase & | operator= (const ValueBase &other) |
| | Assignment operator.
|
| |
|
ValueBase & | operator= (ValueBase &other) |
| | Move assignment operator for lvalues.
|
| |
|
ValueBase & | operator= (ValueBase &&other) |
| | Move assignment operator for rvalues (temporary objects)
|
| |
Encapsulating a MATLAB mxArray.
Class ValueMex never takes custody of a MATLAB memory object!
Even though there is a function Destroy() which frees the MATLAB object, this class has no destructor which automatically does.
It's intended that this class allocates and tends memory space through other functions than mxCreate*() functions, since these are quite slow. (see tagNativeArray)
If a dtor is declared, we have to fulfil the "rule of three"
- See also
- Wikipedia
Definition at line 178 of file value.hpp.