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

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


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

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
>
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phpwriter.patch
Type: text/x-diff
Size: 19773 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20021018/979b4baa/attachment.bin>


More information about the umbrello-devel mailing list