Jump to content
  • Advertisement
Sign in to follow this  
_moagstar_

Boost PreProcessor and Doxygen

This topic is 4178 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using BOOST_PP_LIST_FOR_EACH to generate member functions at compile time for each type in a list. However I'd also like to be able to use automatic document generation (I have traditionally used doxygen), but it appears the doxygen preprocessor is unable to expand this, and the functions are not appearing in the documentation. Does anyone know if there is a way I can configure doxygen so that these functions are parsed? Or is there an alternative (besides expanding the macros by hand - this defeats the object of using boost preprocessor), I have looked at using Loki::Typelist, although I'm not sure if there is a for_each type functionality for this, I recall running into difficulties trying to write my own custom for_each functionality with Loki typelists. Any pointers would be greatly appreciated, I don't want undocumented code, but on the same token I don't want to have to generate a whole bunch of code by hand if I can get the compiler to do it for me.

Share this post


Link to post
Share on other sites
Advertisement
:) Yeah I tried that (you're correct /P on MSVC will give you OBJNAME.i - this option is very useful for debugging pre-processor stuff), it ends up documenting EVERYTHING though, perhaps I can control this with #defines or something - I'll give this a test at lunch. I also need to change the compiler options to not strip out the comments (/C on MSVC for anyone thats interested ;)

Thanks for the advice, I think I'm going to try set this up as a seperate build configuration (Build Documentation or something like that) because it's going to take a bit of preprocessor jiggery pokery to get only the source into .i file that I want.

Share this post


Link to post
Share on other sites
If you cant get it working with #defines then have a look at boost.wave which is a fully standard compliant C++ preprocessor with a programmable iterator based interface which should let you write a small command line application to throw on as a post build step to generate the preprocessed file for doxygen.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!