[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: R++ based XML Generator.
From: "Steven T. Hatton" <hattons () globalsymmetry ! com>
Date: 2005-09-02 23:35:17
Message-ID: 200509021935.17482.hattons () globalsymmetry ! com
[Download RAW message or body]
I created an XML generator derived from the r++ DefalutVisitor. Someone may
find it modestly useful. If nothing else, it might be useful as a
cut-n-paste template for something that is actually useful.
There are a few things commented out, and a few more that probably should be
commented out. If an attribute is commented out, or if the value parameter
to sth::XmlTree::_setAttribute(name, value) is quoted, that means something
wasn't working either in my code, or in r++.
My code is here:
http://baldur.globalsymmetry.com/open-source/org/kde/kdevelop/rxx/sth/
I made a few changes to the r++ code, and I'm not sure if my code depends on
any of them. IOW, I don't know if my code will compile against the r++ in
the svn. I do know that I used exceptions, and that r++ was built with
-fno-exceptions in the svn. You can remove the exceptions fairly easily
since they are thrown from a single helper function.
I used a tiny bit of Qt4, but I believe converting it to Qt3 is trivial.
All that the code currently does is create a QDomDocument and streams it to a
std::ostream passed as a parameter to the constructor. This is an example of
the XML generated:
http://baldur.globalsymmetry.com/open-source/org/kde/kdevelop/rxx/HelloWorld.xml
I find the default xml rendering provided by Mozilla to be a useful means of
viewing the file. KXMLEditor also works well.
If I've accomplished nothing else, I've demonstrated that r++'s AST makes a
very pretty dot graph:
http://baldur.globalsymmetry.com/open-source/org/kde/kdevelop/rxx/doc/html/inherits.html
To get the really cool frames for the Doxygen output go here:
http://baldur.globalsymmetry.com/open-source/org/kde/kdevelop/rxx/doc/html/index.html
--
Regards,
Steven
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic