On the effort to improve the extension code generator readability I have started writing some code to generate the php function wrappers of wxWidgets global functions.
The idea is to create some kind of template system that can be also applied to the generation of class methods.
The file that serves as a template and the file that store the functions could be used as follows:
$function_code = "";
foreach($defFunctions as $function_name=>$function_data)
$function_code .= ob_get_contents();
if($res =preg_match("/(.*?\/\/ functions --->)[^<]+(\/\/ <--- functions[^§]+)/sm",$data,$matches))
$data = $matches . "\n" . $function_code . $matches;
$hd = fopen("wxwidgets.cpp","w");
The doxygen docs xml extractor was modified to obtain function information.
By far I have only used wxMessageBox as a test case and the generated code is working pretty well. The generated code should take care of ...