|
From: Charles S. <cha...@gm...> - 2008-05-08 22:39:18
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
I've downloaded, installed and tested dia2code today. But the PHP5 code
generated wasn't so good so I've modified the generate_code_php_five.c
to use the diagram comments and to remove some unnecessary doc tags
(the @access tag isn't required once the PHP5 has the public, protected
and private access keywords).<br>
<br>
The modifications are very simple, but useful. I don't know if this
list is the best place to post the code. If not, please, say me where i
must to post the file :)<br>
<br>
Thanks.<br>
<br>
P.S. I've sent this message before, but i don't know if my register was
approved o_O<br>
<br>
The diff output:<br>
<br>
--------- code -------------<br>
8a9<br>
> modified by : Charles Schaefer <<a
moz-do-not-send="true" href="mailto:cha...@gm..."
target="_blank">cha...@gm...</a>><br>
90c91,94<br>
< fprintf(outfile, "%s * XXX\n", TABS );<br>
---<br>
> if (strlen(umlo->key.attr.comment)>0)<br>
> fprintf(outfile, "%s * %s\n", TABS,
umlo->key.attr.comment);<br>
> else<br>
> fprintf(outfile, "%s * XXX\n", TABS );<br>
96c100<br>
< fprintf(outfile, "%s * @param %s $%s XXX\n",<br>
---<br>
> fprintf(outfile, "%s * @param %s $%s ",<br>
97a102,105<br>
> if (strlen(parama->key.comment)>0)<br>
> fprintf(outfile, "%s\n", parama->key.comment);<br>
> else<br>
> fprintf(outfile, "XXX\n");<br>
106c114<br>
< fprintf(outfile, "%s * @access ", TABS );<br>
---<br>
> /*fprintf(outfile, "%s * @access ", TABS );<br>
108c116<br>
< fprintf(outfile, "%s\n", tmpname);<br>
---<br>
> fprintf(outfile, "%s\n", tmpname);*/<br>
174d181<br>
< fprintf(outfile, "%s// Associations\n", TABS);<br>
175a183,185<br>
> if (associations != NULL)<br>
> fprintf(outfile, "%s// Associations\n", TABS);<br>
> <br>
197d206<br>
< fprintf(outfile, "%s// Attributes\n", TABS);<br>
198a208,210<br>
> if (umla != NULL)<br>
> fprintf(outfile, "%s// Attributes\n", TABS);<br>
> <br>
201c213,216<br>
< fprintf(outfile, "%s * XXX\n", TABS );<br>
---<br>
> if (strlen(umla->key.comment)>0)<br>
> fprintf(outfile, "%s * %s\n", TABS,
umla->key.comment);<br>
> else<br>
> fprintf(outfile, "%s * XXX\n", TABS );<br>
204c219<br>
< fprintf(outfile, "%s * @access ", TABS); <br>
---<br>
> //fprintf(outfile, "%s * @access ", TABS); <br>
207c222<br>
< fprintf(outfile, "%s\n", tmpname);<br>
---<br>
> //fprintf(outfile, "%s\n", tmpname);*/<br>
231c246,248<br>
< fprintf(outfile, "%s// Operations\n", TABS);<br>
---<br>
> if (umlo != NULL)<br>
> fprintf(outfile, "%s// Operations\n", TABS);<br>
> <br>
293c310,313<br>
< fprintf(outfile, " * XXX detailed description\n" );<br>
---<br>
> if (strlen(tmplist->key->comment)>0)<br>
> fprintf(outfile, " * %s\n", tmplist->key->comment);<br>
> else<br>
> fprintf(outfile, " * XXX detailed description\n" );<br>
<br>
--------- code ------------<br clear="all">
<br>
<pre class="moz-signature" cols="100">--
Charles Schaefer - Web Developer
Email: <a class="moz-txt-link-abbreviated" href="mailto:cha...@gm...">cha...@gm...</a>
Tels.: +55 31 9317-2862
+55 31 2526-4096
ATENÇÃO: Não imprima este e-mail. A natureza agradece. E seu bolso também.
WARNING: Don't print this e-mail. The nature is thankful. And your money too
</pre>
</body>
</html>
|