1
votes

I have a function which exposes all of my required C++ functions to Lua, there are various tables representing different aspects of my "Scripting API", what I wish to do is use doxygen to make a scripting reference using the C++ code that exposes these script functions.

I have tried to make 'fake' classes in the body of the function, which successfully makes a new entry with the name I have given it, for instance if I make a table named 'Math' which has several functions exposed on it, how would I also make 'fake' member functions in this 'fake' class, I have tried to simply pass in \fn defining the function, however it does not show up as they are not actually real members to add a description to. How would I create this sort of effect in doxygen without hand righting a verbatim definition of every class, but instead treat the comment block as if it were a real class with real members?

2

2 Answers

1
votes

It sounds like you're trying to document Lua code as if they were C++. Maybe it's possible, but it's probably more trouble than it's worth.

If you're trying to document Lua code with doxygen, maybe you could try doxygen-lua.

If your Lua API is small, you could just write a page by hand, with \ref's to the relavent C++ code. (Kind of hacky, but I've done this before.)

You could also consider using some other doc generator for your Lua API, such as LuaDoc, or anything else listed on the lua-users wiki DocumentingLuaCode.

1
votes

I ended up writing a fake .doxy file which had typenames similar to lua values, apparently doxygen will document any type to throw at it.