function hTable = crl_table_functions
%CRL_TABLE_FUNCTIONS - Provides custom entries for a Code Replacement Library table.

% Copyright 2007-2011 The MathWorks, Inc.

LibPath = fullfile(matlabroot,...
                   'toolbox',...
                   'coder',...
                   'codegendemos',...
                   'coderdemo_tfl');
               
hTable = RTW.TflTable;

% Create entry for double data type function replacements
e=hTable.registerCFunctionEntry(100, 1, 'sin',  'double', 'sin_double', ...
                                                'double', 'MyMath.h','','');
setTflCFunctionEntryParameters( e, ...
    'ImplementationSourceFile', 'MyMath.c', ...
    'ImplementationHeaderPath', LibPath, ...
    'ImplementationSourcePath', LibPath, ...
    'GenCallback',              'RTW.copyFileToBuildDir');

e=hTable.registerCFunctionEntry(100, 1, 'cos',  'double', 'cos_double', ...
                                                'double', 'MyMath.h','','');
setTflCFunctionEntryParameters( e, ...
    'ImplementationSourceFile', 'MyMath.c', ...
    'ImplementationHeaderPath', LibPath, ...
    'ImplementationSourcePath', LibPath, ...
    'GenCallback',              'RTW.copyFileToBuildDir');

e=hTable.registerCFunctionEntry(100, 2, 'atan2','single', 'atan2_single', ...
                                                'single', 'MyMath.h','','');
setTflCFunctionEntryParameters( e, ...
    'ImplementationSourceFile', 'MyMath.c', ...
    'ImplementationHeaderPath', LibPath, ...
    'ImplementationSourcePath', LibPath, ...
    'GenCallback',              'RTW.copyFileToBuildDir');


