From: Leandro L. <lu...@ll...> - 2003-10-15 18:49:02
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roland Gauweiler, el mi=C3=A9rcoles 15 de octubre a las 20:14 me escribi= ste: > Hi Mark, > > sorry, but I am not active at this time on xmi2code. But cc this mail = to > Leandro, he is the maintainer. > > Am Mittwoch, 15. Oktober 2003 14:32 schrieb Mark Lynch: > > Hi Roland, > > > > I've been playing around with xmi2code to generate both PHP > > and also Coldfusion components (CFC) as this is what I use > > in work. > > > > I have created the guts of the template to create Coldfusion > > but have run into a problem and due to the way coldfusion > > comments work. > > > > CF comments are similar to html comments except with an > > extra dash i.e. <!--- ---> > > > > The problem that I am having is that printDocumentation > > function in generator.cpp doesn't have support for a close > > comment and CF doesn't support single line comments like > > php or all the other supported languages. Well, the easyest way to go is to override printDocumentation in you generator class or not using it at all. PHP PEAR generator use /* (start= ) and */ (end) comment style and I have no problems implementing that... Maybe you can look at the php.pear generator: phppeargenerator.cpp Maybe it would be nice to have a a method in Generator to get the uggly xmi2code marks (like '+X2C') so you don't have to deal with them and can be changed (for some weird reason) smoothly in the future. If you want, you can add a postfix parameter to printDocumentation() in Generator, but please keep the current API so other generators don't hav= e to be changed. You can overload printDocumentation, make a general one: void Generator::printDocumentation(QTextStream& target, const IdBase* pObject, const QString& prefix, const QString& postfix, const QString& docuType, bool printId, const QString& firstLineLongComment) and overload it to keep the old one (who only call the general one with empty postfix): void Generator::printDocumentation(QTextStream& target, const IdBase* pObject, const QString& prefix, const QString& docuType, bool printId, const QString& firstLineLongComment) { printDocumentation(target, pObject, prefix, "", docuType, printId, firstLineLongComment); } I's this helpfull or I'm missing something? - -- LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation - ----------------------------------------------------------------------= -- E-Mail / JID: lu...@lu... GPG Fingerprint: D9E1 4545 0F4B 7928 E82C 375D 4B02 0FE0 B08B 4FB2 GPG Key: gpg --keyserver pks.lugmen.org.ar --recv-keys B08B4FB2 - ----------------------------------------------------------------------= -- Cada situaci=C3=B3n es el mejor axioma para progresar en el camino. =09=09-- Kalfrie: Durkhei. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/jZaQSwIP4LCLT7IRAojUAJwIL+at/Az0+821GmVk0xIB/mCfjACbBfwp ItzJqgxPpIJrQAleb7sVglk=3D =3DcKQ4 -----END PGP SIGNATURE----- |