update lua-doc formatting
authorRobin Gareus <robin@gareus.org>
Tue, 4 Oct 2016 02:45:35 +0000 (04:45 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 4 Oct 2016 02:45:35 +0000 (04:45 +0200)
* include Vamp Documentation
* show doxygen doc for class/struct data-members

tools/doxy2json/ardourdoc.sh
tools/fmt-luadoc.php

index b9e7db8ff092b842ab98d46f4d881e042036cb7f..0ec2ce66052d4b1c538614081643c2f300dbe97a 100755 (executable)
@@ -19,7 +19,7 @@ time ./tools/doxy2json/doxy2json -j 4 \
        -D HAVE_SAMPLERATE=1 -D HAVE_LV2=1 -D HAVE_LV2_1_2_0=1 -D HAVE_LV2_1_10_0=1 -D HAVE_SERD=1 -D HAVE_SORD=1 -D HAVE_SRATOM=1 -D HAVE_LILV=1 -D HAVE_LV2_1_0_0=1 \
        -D HAVE_LILV_0_16_0=1 -D HAVE_LILV_0_19_2=1 -D HAVE_LILV_0_21_3=1 -D HAVE_SUIL=1 -D LV2_SUPPORT=1 -D LV2_EXTENDED=1 -D HAVE_GTK=1 -D HAVE_LIBS_GTKMM2EXT=1 \
        -D HAVE_X11=1  -D LXVST_64BIT=1 -D LXVST_SUPPORT=1 -D HAVE_TAGLIB=1 -D HAVE_POSIX_MEMALIGN=1 -D HAVE_VAMPSDK=1 -D HAVE_VAMPHOSTSDK=1 -D HAVE_RUBBERBAND=1 -D ENABLE_NLS=1 \
-       -D HAVE_CURL=1 -D HAVE_LO=1 -D HAVE_LRDF=1 \
+       -D HAVE_CURL=1 -D HAVE_LO=1 -D HAVE_LRDF=1 -D _VAMP_NO_PLUGIN_NAMESPACE=1 \
        -I libs/ardour -I libs/pbd -I libs/lua -I gtk2_ardour -I libs/timecode -I libs/audiographer -I libs/ptformat -I libs/fst \
        -I libs/ltc -I libs/evoral -I libs/canvas -I libs/gtkmm2ext -I libs/midi++2 -I libs/surfaces/control_protocol -I libs \
        -I build/libs/pbd -I build/libs/ardour -I build/gtk2_ardour \
@@ -30,6 +30,7 @@ time ./tools/doxy2json/doxy2json -j 4 \
        libs/ardour/*.cc libs/pbd/*.cc \
        gtk2_ardour/*.cc \
        /usr/include/cairomm-1.0/cairomm/context.h \
+       /usr/include/vamp-sdk/Plugin.h \
 > $TMPFILE
 
 ls -lh $TMPFILE
index 38221c7f1419f533b605fe91c7841c3dcfe82fba..938a774ed41179ec719b38b9fd08446f7fa2fcb1 100755 (executable)
@@ -38,8 +38,14 @@ foreach (json_decode ($json, true) as $b) {
        $b ['lua'] = preg_replace ('/:_end/', ':end', $b ['lua']);
        $b ['lua'] = preg_replace ('/:_type/', ':type', $b ['lua']);
        $b ['ldec'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['decl']));
+       $b ['ldec'] = preg_replace ('/_VampHost::/', '', $b['ldec']);
+       $b ['decl'] = preg_replace ('/_VampHost::/', '', $b['decl']);
        if (isset ($b['ret'])) {
                $b['ret'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['ret']));
+               $b['ret'] = preg_replace ('/_VampHost::/', '', $b['ret']);
+       }
+       if (isset ($b['parent'])) {
+               $b ['parent'] = preg_replace ('/_VampHost::/', '', $b['parent']);
        }
        $doc[] = $b;
 }
@@ -712,6 +718,8 @@ function format_class_members ($ns, $cl, &$dups) {
                        $rv.= ' <tr><td class="def">'.typelink (array_keys ($f['ret'])[0], false, 'em').'</td><td class="decl">';
                        $rv.= '<span class="functionname">'.stripclass ($ns, $f['name']).'</span>';
                        $rv.= '</td><td class="fill"></td></tr>'.NL;
+                       $f['cand'] = str_replace (':', '::', $f['name']);
+                       $rv.= format_doxydoc($f);
                }
        }
        return $rv;