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

Jens Krüger jkrueger1 at users.sourceforge.net
Fri Oct 18 05:21:02 UTC 2002


Am Freitag, 18. Oktober 2002 13:30 schrieb Heiko Nardmann:
> 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
>

I don't know, where it comes from, but the cpp file is broken at line 142. May 
you have a look at this?

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'.

-- 
Jens




More information about the umbrello-devel mailing list