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

Heiko Nardmann h.nardmann at secunet.de
Fri Oct 18 04:31:02 UTC 2002


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

On Freitag, 18. Oktober 2002 09:41, Jens Krüger wrote:
[snip]
> Hi Heiko,
>
> I took your patches and had a look into the sources. Thanks for the
> corrections in the C++ and Java writer. The problem of invisibility of your
> PHP writer was based on the factory. You have to add your writer into this.
> The attached patch should apply. If you get a message that a hunk in the
> C++ and in the Java writer failed, you have the current CVS version. You
> may ignore these messages.
>
> Regards
>
> Jens
>

Now I have a working and cleaned-up version of phpwriter.cpp and phpwriter.h. 
See the attached files. Together with the patch you gave it should be ready 
to find its way into CVS.

Is it possible to have a configuration dialog for a code generator? First idea 
was in PHP set set whether this shall be a standalone script (then the path 
to the PHP interpreter should be configurable) or whether this should be used 
inside of a Web Server which makes it necessary to start the whole php code 
using "<?php" and end it using "?>". Maybe there are some other settings for 
other languages as well which would be helpful, e.g. format style of output. 
What about an abstract configuration method in class CodeGenerator which can 
be implemented by a language generator?

> > 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)

iEYEARECAAYFAj2v8MQACgkQpm53PRScYyjC/ACfWIZ+Pve5P2iEAoT1vTeMmGFw
OrgAn3elQeih8skrrgzyutMGn2B5or2d
=wFWa
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phpwriter.cpp
Type: text/x-c++src
Size: 9163 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021018/e521068d/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phpwriter.h
Type: text/x-chdr
Size: 2047 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021018/e521068d/attachment.h>


More information about the umbrello-devel mailing list