MATLAB Data API Types - MATLAB & Simulink (original) (raw)

matlab::data::ArrayDimensions

ArrayDimensions is defined asstd::vector<size_t> in theArrayDimensions.hpp header file.

matlab::data::Enumeration

Enumeration is defined in theEnumeration.hpp header file.

matlab::data::MATLABString

MATLABString is defined as optional<String> in the String.hpp header file.

matlab::data::ObjectArray

ObjectArray is defined as TypedArray<Object> in theObjectArray.hpp header file.

matlab::data::String

String is defined as std::basic_string<uchar> in theString.hpp header file.

matlab::data::Struct

Struct is defined in theStruct.hpp header file.

buffer_ptr_t and buffer_deleter_t

buffer_ptr_t is defined as std::unique_ptr<T[], buffer_deleter_t<T>>, where buffer_deleter_t is defined as void (*)(T*).

Use get() to access the data. Do not callrelease(). For examples, see Pass Sparse Arrays to MATLAB from C++ and Create MATLAB Data Array and Manage Memory from User-Managed Buffer.

iterator

iterator is defined as TypedIterator<T> in the TypedArray.hpp header file.

const_iterator

const_iterator is defined as TypedIterator<typename std::add_const<T>::type> in the TypedArray.hpp header file.

InputLayout

InputLayout is defined in theInputLayout.hpp header file. The values forInputLayout are COLUMN_MAJOR orROW_MAJOR.

reference

reference is defined in the TypedArray.hpp header file as typename iterator::reference, whereiterator::reference is T& for arithmetic types and Reference<T> for non-arithmetic types.

const_reference

const_reference is defined in theTypedArray.hpp header file as typename const_iterator::reference, whereconst_iterator::reference is T& for arithmetic types and Reference<T> for non-arithmetic types.

Reference Types