[Uml-devel] PHP support and some fixing (was Re: wishlist)

Heiko Nardmann h.nardmann at secunet.de
Thu Oct 17 22:25:04 UTC 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Donnerstag, 17. Oktober 2002 18:06, Sebastian Stein wrote:
[snip]
> > - - if I like to add support for code generation for another language -
> > where do I start from?
>
> Please get the source from CVS and look into the folder
> uml/uml/codegenerators
>
> There you will find the code for the C++ and Java generators. Take one of
> them as starting base. If you run into problems, contact the developer
> mailinglist for help!
>
> What language do you want to add?
>
> Steinchen

Okay, here are some files which are my start to have PHP support. They are a 
diff against yesterdays CVS and therefore should be relative easy applied. 
Currently I am able to compile the stuff but I do not see the PHP entry in 
the list of possible code generators. So I am missing something. That's where 
I need help from the main developers. Could you have a look at it?

A few words concerning the PHP code generator implementation:
- - PHP has classes and objects
- - PHP does not support public/protected/private scopes
- - PHP does not support multiple inheritance
- - instead of C++ Vectors you have to use arrays to model multiple associations
- - PHP has declaration and definition of classes in the same place -> php file
- - there is no type declaration of functions or formal parameters

Probably I missed a few things but that may help to understand the code 
attached.

Another thing: the Makefile.am.diff has to be applied to 
uml/codegenerators/Makefile.am.

I also fixed a typo in cppwriter.cpp and javawriter.cpp.

I also fixed the binary name in the KDevelop project file from 'uml' to 
'umbrello'.

- -- 
Heiko Nardmann (Dipl.-Ing.), h.nardmann at secunet.de, Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iEYEARECAAYFAj2vmwEACgkQpm53PRScYyjOtACfXHAIiIEhe1hkc3jkvykBeewJ
SwIAoNxM5IG15Ra+bypaKFKeEC92qiAi
=5Mmt
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cppwriter.cpp.diff
Type: text/x-diff
Size: 406 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021017/9607b88d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uml.kdevprj.diff
Type: text/x-diff
Size: 1061 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021017/9607b88d/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.am.diff
Type: text/x-makefile
Size: 569 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021017/9607b88d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phpwriter.cpp
Type: text/x-c++src
Size: 13396 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021017/9607b88d/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phpwriter.h
Type: text/x-chdr
Size: 2576 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021017/9607b88d/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: javawriter.cpp.diff
Type: text/x-diff
Size: 470 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021017/9607b88d/attachment-0003.bin>


More information about the umbrello-devel mailing list