Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F114368008
mxSerialize_cpp.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, May 25, 11:07
Size
821 B
Mime Type
text/x-c
Expires
Tue, May 27, 11:07 (2 d)
Engine
blob
Format
Raw Data
Handle
26387105
Attached To
R6832 iCAPs public
mxSerialize_cpp.cpp
View Options
#include "mex.h"
// MX_API_VER has unfortunately not changed between R2013b and R2014a,
// so we use the new MATRIX_DLL_EXPORT_SYM as an ugly hack instead
#if defined(__cplusplus) && defined(MATRIX_DLL_EXPORT_SYM)
#define EXTERN_C extern
namespace matrix{ namespace detail{ namespace noninlined{ namespace mx_array_api{
#endif
EXTERN_C mxArray* mxSerialize(mxArray const *);
EXTERN_C mxArray* mxDeserialize(const void *, size_t);
// and so on, for any other MEX C functions that migrated to C++ in R2014a
#if defined(__cplusplus) && defined(MATRIX_DLL_EXPORT_SYM)
}}}}
using namespace matrix::detail::noninlined::mx_array_api;
#endif
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if (nlhs && nrhs) {
plhs[0] = (mxArray *) mxSerialize(prhs[0]);
}
}
Event Timeline
Log In to Comment