You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2006/03/22 14:23:46 UTC

svn commit: r387852 - /xerces/c/trunk/scripts/createBindingsFormatFromHPP.pl

Author: amassari
Date: Wed Mar 22 05:23:44 2006
New Revision: 387852

URL: http://svn.apache.org/viewcvs?rev=387852&view=rev
Log:
Retrieve base class and static methods; added missing final </div>; closing brace for enum values was not indented properly

Modified:
    xerces/c/trunk/scripts/createBindingsFormatFromHPP.pl

Modified: xerces/c/trunk/scripts/createBindingsFormatFromHPP.pl
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/scripts/createBindingsFormatFromHPP.pl?rev=387852&r1=387851&r2=387852&view=diff
==============================================================================
--- xerces/c/trunk/scripts/createBindingsFormatFromHPP.pl (original)
+++ xerces/c/trunk/scripts/createBindingsFormatFromHPP.pl Wed Mar 22 05:23:44 2006
@@ -19,8 +19,14 @@
 open(IN,"< $filename") || die("Couldn't open input file: $filename");
 
 while (<IN>) {
-  if ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)/) {
+  if ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)\s*[:]\s*public\s([^\s]+)/) {
     $classname = $1;
+    $baseclass = $2;
+    last;
+  }
+  elsif ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)/) {
+    $classname = $1;
+    $baseclass = "";
     last;
   }
 }
@@ -32,9 +38,17 @@
 <font color="#000000">$filename:</font></h3>
 
 <div id="$classname"><font face="Courier New,Courier"><font size=-1>class
-$classname</font></font>
-<table>
+$classname
 END1
+if ($baseclass ne "") { 
+print OUT <<"END2";
+: public $baseclass
+END2
+}
+print OUT <<"END3";
+</font></font>
+<table>
+END3
 
 while (<IN>) {
   if ($_=~/^\s*public\s*:/) {
@@ -86,6 +100,25 @@
 <td><font face="Courier New,Courier"><font size=-1>$c</font></font></td>
 </tr>
 END
+  } elsif ($_=~/^\s*(static)\s+([^\s\(][^\(]*[^\s\(])\s+([^\s\(]+\(.*)/) {
+    $a=$1;
+    $b=$2;
+    $c=$3;
+    while ($c!~/\)/) {
+      $c.=<IN>;
+    }
+    print OUT <<"END";
+
+<tr ALIGN=LEFT VALIGN=TOP>
+<td></td>
+
+<td><font face="Courier New,Courier"><font size=-1>$a</font></font></td>
+
+<td><font face="Courier New,Courier"><font size=-1>$b</font></font></td>
+
+<td><font face="Courier New,Courier"><font size=-1>$c</font></font></td>
+</tr>
+END
   } elsif ($_=~/^\s*(enum)\s+([^\s]+)\s*{/) {
     print OUT <<"END2";
 
@@ -117,10 +150,10 @@
       if ($_=~/}\s*;/) {
         print OUT <<"END4";
 <tr ALIGN=LEFT VALIGN=TOP>
-<td><font face="Courier New,Courier"><font size=-1>};</font></font></td>
-
 <td></td>
 
+<td><font face="Courier New,Courier"><font size=-1>};</font></font></td>
+
 <td></td>
 
 <td></td>
@@ -148,6 +181,7 @@
 <td></td>
 </tr>
 </table>
+</div>
 END6
 
 close(OUT);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org