| Contents | Index |
enableCPP(hEntry)
Handle to a CRL function entry previously returned by hEntry = RTW.TflCFunctionEntry or hEntry = MyCustomFunctionEntry, where MyCustomFunctionEntry is a class derived from RTW.TflCFunctionEntry.
The enableCPP function enables C++ support for a function entry in a CRL table. This allows you to specify a C++ name space for the implementation function defined in the entry (see the setNameSpace function).
Note When you register a CRL containing C++ function entries, you must specify the value {'C++'} for the LanguageConstraint property of the CRL registry entry. For more information, see Register Code Replacement Libraries. |
In the following example, the enableCPP function is used to enable C++ support, and then the setNameSpace function is called to set the name space for the sin implementation function to std.
fcn_entry = RTW.TflCFunctionEntry;
fcn_entry.setTflCFunctionEntryParameters( ...
'Key', 'sin', ...
'Priority', 100, ...
'ImplementationName', 'sin', ...
'ImplementationHeaderFile', 'cmath' );
fcn_entry.enableCPP();
fcn_entry.setNameSpace('std');
registerCPPFunctionEntry | setNameSpace

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |