logo       

Re: how to use the autodoc feature of new swig-1.3.22?: msg#00082

programming.swig

Subject: Re: how to use the autodoc feature of new swig-1.3.22?

Bo Peng wrote:
On Wed, Sep 08, 2004 at 09:59:53PM -0700, Robin Dunn wrote:

Try it like this:


%feature("docstring") N::A::func "some doc";


This works. Thanks.
BTW, is there a simpler way to insert multiline docstring than using %MACRO? Will things like

%feature("docstring") N::A::func {
document
}

work?

It should. I do it with quotes so the text gets syntax highlighted as text in my editor, like this:

%feature("docstring") N::A::func
"This is a
multi-line
document";


I also have a set of macros that I use that let me easily declare the function and the docstring all at once. See

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/_defs.i?rev=1.77&content-type=text/vnd.viewcvs-markup

I use it like this:

DocDeclStr(
void , SetSelection(int n),
"Sets the item at index 'n' to be the selected item.", "");


--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise