1function s = swig_typename_convertor_cpp2matlab(s) 2 s = strrep(s,'C/C++ prototypes','Matlab usages'); 3 s = strrep(s,'casadi::',''); 4 s = strrep(s,'Dict','struct'); 5 s = strrep(s,'MXDict','struct:MX'); 6 s = strrep(s,'SXDict','struct:SX'); 7 s = strrep(s,'std::string','char'); 8 s = strrep(s,' const &',''); 9 s = strrep(s,'friendwrap_',''); 10 s = regexprep(s,'\<(\w+)(< \w+ >)::\1\>','$1$2'); 11 s = regexprep(s,'\<(\w+)::\1\>','$1'); 12 s = regexprep(s,'(const )?Matrix< ?SXElem *>( &)?','SX'); 13 s = regexprep(s,'(const )?Matrix< ?double *>( &)?','DM'); 14 s = regexprep(s,'(const )?Matrix< ?int * >( &)?','IM'); 15 s = regexprep(s,'(const )?GenericMatrix< ?(\w+) *>( ?&)?','$2'); 16 s = regexprep(s,'(const )?GenericMatrix< ?([\w\(\)]+) *>( ?&)?','$2 '); 17 s = regexprep(s,'const (\w+) &','$1 '); 18 s = regexprep(s,'< [\w\(\)]+ +>\(','('); 19 20 for i=1:5 21 s = regexprep(s,'(const )? ?std::pair< ?([\w\(\)\]\[\}\{: ]+?) ?, ?([\w\(\)\]\[\}\{: ]+?) ?> ?&?','{$2,$3} '); 22 s = regexprep(s,'(const )? ?std::vector< ?([\w\(\)\[\]\}\{ ]+) ?(, ?std::allocator< ?\2 ?>)? ?> ?&?','{$2} '); 23 s = regexprep(s,'(const )? ?std::map< ?([\w\(\)\[\]\}\{ ]+) ?, ?() ?(, ?std::allocator< ?\2 ?>)? ?> ?&?','{$2} '); 24 s = regexprep(s,'\{int\}','[int]'); 25 s = regexprep(s,'\{double\}','[double]'); 26 end 27 s = regexprep(s,'\<(\w+)(< \w+ >)?::\1','$1'); 28 29 s = strrep(s,'casadi::',''); 30 s = strrep(s,'IOInterface< Function >','Function'); 31 s = strrep(s,'::','.'); 32 s = strrep(s,'.operator ()',''); 33 s = regexprep(s,'([A-Z]\w+)Vector','{$1}'); 34end 35