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

Heiko Nardmann h.nardmann at secunet.de
Fri Oct 18 02:01:06 UTC 2002


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

On Freitag, 18. Oktober 2002 09:41, Jens Krüger wrote:
> 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, I just changed the factory.cpp file and now it works fine.

Thanks!

Now I am going to take a look at the generated code to see whether the syntax 
is ok.

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

iEYEARECAAYFAj2vzMsACgkQpm53PRScYyjbUQCgpfFZ02zy49gdIx6GU0iLam65
AygAmwfrPUFGK9q5aY2f79WDjqkiGoQ9
=UCe3
-----END PGP SIGNATURE-----





More information about the umbrello-devel mailing list