Skip to Main Content Skip to Search
Product Documentation

enableCPP - Enable C++ support for function entry in CRL table

Syntax

enableCPP(hEntry)

Arguments

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.

Description

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).

Examples

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');

See Also

registerCPPFunctionEntry | setNameSpace

How To

  


Related Products & Applications

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