Jump to content
  • Advertisement
Sign in to follow this  
IndrekSnt

Doxygen + script commands?

This topic is 2648 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

Hi,

I wonder if it were somehow possible with doxygen to also document script functions, classes and variables from the source of the game itself..

For example, I have a header for maps. There's a doxygen documented class and some wrapper functions for calling C++ code from luascripts. What I would like to do is document the functions the way the would be accessed from the luascripts (with the same arguments and return values).

However, Doxygen seems to skip all functions that it can't find. Even then, would it even be possible to divide function descriptions into several pages? For example, Lua documentation separated under the related pages section. I guess it could be split into another module by using \addtogroup - this should still do the job.

Separate pages (\page) can be added with sections (\section, \subsection) and stuff so that I could just go and write all the Lua functions with all the formatting manually. It would be cool if it were possible to document the Lua functions exactly the same way as C++ code.

All suggestions are welcome,
Thank You

Share this post


Link to post
Share on other sites
Advertisement
There has in the past been some discussion on the Doxygen mailing list about documenting Lua, yet as far as I know there is no publicly available code to accomplish this.

Instead have a look at LuaDoc on luaForge, which can generate documents such as this

edit:
Sorry it seems I have totally got the wrong end of the stick. You are wanting to document lua_CFunctions which doesn't really make sense as they can take upto N params and have N returns. Where N depends on the version IIRC.

Share this post


Link to post
Share on other sites
Thanks for the response.

I'm calling C++ functions with constant number of arguments (no va_lists) from Lua.

If I understand correctly, LuaDoc works on Lua source files, so I probably wouldn't be able to document functions, which are wrapped to C++ functions (registered from the C++ source code itself).

Share this post


Link to post
Share on other sites
Nearly a year since the last post but LDoc has just been released which can document C functions.
ANN thread: http://article.gmane.org/gmane.comp.lang.lua.general/80043

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!