boost doxygen documentation - c++

I have been trying to generate doxygen documentation for boost, as a way to browse source tree and have man documentation.
However, doxygen has been running for past week or so on IBM power5, and I have no idea how much longer (right now I am on boost_1_43_0/boost/mpl/).
Is there prebuilt doxygen documentation, if not, is there any way to speed up documentation generation without losing cross-referencing in code browser?
I have been using older documentation located on tena-sda, but that is quite old.
thank you

I agree with you. However, doxygen cannot parse the complexity of C++ that Boost utilizes. Best bet is for you to grock (search) the source with a powerful IDE.

Even if it was working using doxygen to browse a source code is not really relevant. Here are two alternatives that I use daily :
grep is your friend ! It is very efficient and fast to find what you want in a source code, even if this one is large
Make development with an IDE that support live parsing like NetBeans, then you will have cross-references inside your whole code, even across libraries (like Boost) that it uses, inside the editor itself.

Related

Are there C++ refactoring patterns implemented as a set of Clang tools?

So I found that nice video on Clang tooling... And could not help but wonder: is there any sample codebase/compiled tooling suite for full project beautification and cleanup (alike C# resharper)?
Code formating on project scale such as: extra space at line end, unification of member/class naming, ways of how {}brackets are placed after if etc?
Clang's libtooling is fairly new so there's not too much based on it currently.
Also in my experience it's a pain to link against (there's no clang version of llvm-config and in the tutorials the devs seem to think people will build their tools inside of the full clang repo rather than as nice separate projects. The Ubuntu builds of clang only include libtooling as a static .a, no .so. Official LLVM nightly builds for Ubuntu don't seem to include the static libclangTooling.a at all.
There is include-what-you-use which is designed to remove unused header files.
There is clReflect which generates reflection bindings. (Not sure if this actually uses libtooling or just libclang, but its the same kind of thing.)
There is also refactorial that supports some other operations.
There are some tools included as part of clang. Most notably A c++11 migration tool. There is also a tool for modules (A feature being worked on for a future version of C++).
This stuff should be very useful and powerful once it takes off.
Personally I'm trying (unsuccessfully currently) to build a simple CLI re-factoring tool, cppmv which is designed to just let you rename classes, functions, variables, move them around namespaces and such while keeping their uses syncd but I don't have anything useful at this stage. Other tools could be cppls (to list namespaces, classes functions and so on). Maybe cppcp, if you want to copy something for some reason (you could have a 'template' class for example) but it seems less useful.
I was also looking at making a FUSE userspace filesystem that would let you mount and browse your project so you can use traditional 'mv' and 'cp' commands, but that was more of an excuse to learn FUSE rather than because it would be useful to do things that way. Although it might be possible to edit source code of specific classes and functions in their own separate individual 'files', although that wouldn't be useful for many things like IDEs since you would loose information about headers and such.
It would also be nice to have a live, 'see as you edit', ASTMatcher based tool, or some simple re-factoring scripting language bindings.
EDIT:
There is now also clang-format for code style formatting and (as of 3.4) a clang-format.py script for Vim integration. clang-apply-replacements "that finds files containing
serialized Replacements and applies those changes after deduplication
and detecting conflicts."
It might be worth looking at this video where some of this stuff is demoed.

Options for open source front end for C++

I am looking for options for an open source C++ compiler front-end (source parser/analyzer) that I could customize for my requirements. I do not need the back end implementation, just that it would help to find a fast and relatively bug free C++ front end that supports most standard features. Any suggestions?
[I did google, clang seems to be an option but i'd much prefer peer feedback before i begin with it.]
Arpan
Clang and GCC are the two main options. GCC is very complicated (or so I've heard), and Clang is very promising but is immature.
GCC-XML uses GCC's frontend to spit out an XML description of the source. GCC-XML's output is not a full abstract source tree (it doesn't contain function bodies), but it would be a lot easier to work with than GCC itself. (The latest release on the GCC-XML page is horribly out of date; if you don't want to mess around with tracking its CVS yourself, you might try downloading a tarball from, e.g., Debian's gccxml page.)
Depending on your exact requirements, other options might work:
CINT is a C / C++ interpreter. I'm told that it's not very strict in its adherence to C++ standards.
ROSE can take C and C++ source and lets you do a variety of transformations on it. The C and C++ front-end of ROSE is licensed from EDG, so it's not open source, but it is freely redistributable.
Projects such as Doxygen and SWIG include their own limited C++ parsers. Although these are only intended for extracting documentation and generating interfaces, respectively, they may meet your needs.
Edit: For further reading, see "Parsing C++", by Andrew Birkett.
Have you looked at LLVM clang?
For one of the refactoring efforts I've done, we used Elsa:
http://scottmcpeak.com/elkhound/sources/elsa/
with mixed results. Some parts of our code were too complicated or nonstandard for Elsa to deal with, and had to be preprocessed out for the refactoring.
You can use this with Oink:
http://danielwilkerson.com/oink/
if source analysis is what you're in the mood for.
Hope this helps!
The Digital Mars C++ compiler is not open source, but the source code is available for purchase (see http://www.digitalmars.com/shop.html) and you can customize it.
CLang is probably the way to go these days for a comprehensive solution, but if you're looking for something standalone that you can understand then check out this project on github:
https://github.com/robertoraggi/cplusplus
Out of the box it comes with a little command line utility to dump the AST, symbols, and IR code.
This is the C++ front end used in QTCreator. It does a decent job parsing most modern C++ code and even though the cplusplus front end hasn't been updated for a while, QTCreator is very actively used and developed. This code has quite a bit of mileage on it.

c/c++ XML library question

I know that a lot of c/c++ XML library questions have been asked already (I tried to read through all of them before getting to this).
Here are the things I'm going to need in my own project:
Excellent performance
SAX2
Validation
Open source
Cross platform
I was going to use Xerces-C, but I see that a simple SAX2 setup with nothing going on in the filter is taking 5 seconds to run. (Perhaps I'm doing something wrong here?)
I would like to use libxml++, but as I tried to get it set up on my MacBook, there were some crazy dependencies that took me all the way back to gtk-doc, at which point I sort of tabled the idea.
So now I'm at libxml2. Is this the way to go? Have I missed an important option, bearing in mind the five requirements above? I don't mind using a (good) c-library like libxml2, but a c++ interface would be nice. (I don't like Xerces-C's API very much.)
I am willing to bend on the SAX2 requirement if comparable functionality is available.
Having spent a goodly amount of time on this same problem, it was my conclusion that libxml2 is the best option available under your guidelines. The C interface is not too difficult to use and it's very fast.
There are some other good options for commercial libraries, but most of the other comparable open-source options are either painfully slow or are mired in a deep, annoying vat of dependency soup.
You say you need these things in your project, but don't give any idea of the pipeline. For example, we had a whole load of static XML files which needed to be loaded quickly, but only validated rarely. So validated using a separate process in batch (using RelaxNG as it was human writable markup ) and loaded the XML using expat. The system also used XMPP, so checked streaming input, but that didn't require validating against a schema (partly because it was streamed, and mostly because most of the possible errors were not expressible in a schema).
If you need a whole host of other facilities, you can consider Qt, which has good XML support. Be warned though, it's WAY more than an XML processing library; it's a full blown application framework with support for GUIs, networking and a whole host of other things.
Qt
You can also try Poco. It's another application framework, but not as huge as Qt (i.e. no GUI-related things etc.)
Poco
Lastly, if you don't mind a C library, you can use Expat. It's not SAX per se, but writing code using Expat is somewhat like SAX. It has C++ wrappers, but they're not officially part of the project IIRC, and may not be as well-maintained or designed. I'm not too sure though.
Expat
Hope this helps!
EDIT: I misread your original post: not too sure about the validation features of these libraries, I've never used them before.

Unzipping a directory in C++

I am creating a C++ program that will read a .docx's plain text. My plan of attack is to rename the .docx as a .zip and then unzip. I then will rename the .xml file containing the text of the document as a .txt and parse it out.
Right now I have figured out the renaming which was easy enough. I am now struggling with unzipping. I am very proficient in C++, but this is my first time I have been extending myself to real word applications and using it beyond the STL library.
At first I tried many wrappers for C++ from the zlib library, but have not been able to get any of them to compile or work properly (it may be due to environment being in Cygwin). For that reason it seems I have to default to using the messy zlib code to do this. But from all the documentation and examples I can find it only shows zlib being used to read a .zip that is a compression of one file not multiple files. I now don't know where to go from here and, like I said earlier, being completely new to the domain outside of STL I am feeling quite lost.
Any help or guidance is much appreciated!
Thanks,
Michael
I don't think zlib supports multi-file zips directly (could be wrong), so you may want to look for alternatives. As an aside, you might also want to consider switching from cygwin to MinGW, unless you really need the POSIX/UNIX compatibility that cygwin provides.
I've been dealing with a similar issue, but don't really have a great solution yet.
zlib does not currently support multiple files.
See: C/C++ Packing and Compression
zlib is for GZip compression, not ZIP compression (see here for details).
As a result you'd perhaps be better to shell out to the unzip utility provided in Cygwin and available for lots of platforms.

What Linux Full Text Indexing Tool Has A Good C++ API?

I'm looking to add full text indexing to a Linux desktop application written in C++. I am thinking that the easiest way to do this would be to call an existing library or utility. This article reviews various open source utilities available for the Gnome and KDE desktops; metatracker, recoll and stigi are all written in C++ so they each seem reasonable. But I cannot find any notable documentation on how to use them as libraries or through an API. I could, instead, use something like Clucene or Xapian, which are generic full text indexing libraries. They seem more straightforward but if I used them, I'd have to implement my own indexing daemon, an unappealing prospect.
Also, Xesam seems to be the latest thing, does anyone have any evidence that it works?
So, does anyone have experience using any of the applications or libraries? How did you use it and what documentation was useful?
I used CLucene, which you mentioned (and also Lucene.NET), and found it to be pretty good.
There's also Strigi which AFAIK works with Xesam and is the default used in KDE.
After further looking around, I found and worked with Recol. It believe that it has the best C++ interface to a full text search engine, in this case Xapian.
It is important to realize that clucene and Xapian are both highly complex libraries designed primarily for multi-user server applications. Cutting them down to a level appropriate for a client-system is not easy. If I remember correctly, Strigi has a complex, pure C interface which isn't adapted.
Clucene also doesn't seem to be that actively maintained currently and Xapian seems to be maintained. But the thing is the existence of recol, which allows you to index particular files without the massive, massive setup that raw Xapian or clucene requires - creating your own "stemming" set is not normally desirable, etc.