Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122518626
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
Fri, Jul 18, 06:57
Size
821 B
Mime Type
text/x-c
Expires
Sun, Jul 20, 06:57 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27476756
Attached To
R5163 Slepians
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