Quantcast

Doxygen/docstring support?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Doxygen/docstring support?

Jeremy Cowles
Hey swig-users,

Is there a way to have swig pick up Doxygen comments and use them as method documentation in the target language?

I saw the autodoc and docstring features, but the source is already decorated like this:

    /// Return true if this prim is a model group based on its kind metadata,
    /// false otherwise.  If this prim is a group, it is also necessarily a
    /// model.
    bool IsGroup() const;

I would love to just pickup that string and associate it with the function.

--
Jeremy

------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doxygen/docstring support?

Vadim Zeitlin-13
On Wed, 21 Sep 2016 15:15:51 +0000 Jeremy Cowles <[hidden email]> wrote:

JC> Hey swig-users,
JC>
JC> Is there a way to have swig pick up Doxygen comments and use them as method
JC> documentation in the target language?
JC>
JC> I saw the autodoc and docstring features, but the source is already
JC> decorated like this:
JC>
JC>     /// Return true if this prim is a model group based on its kind
JC> metadata,
JC>     /// false otherwise.  If this prim is a group, it is also necessarily a
JC>     /// model.
JC>     bool IsGroup() const;
JC>
JC> I would love to just pickup that string and associate it with the function.

 This is the goal of the "doxygen" branch, the latest (but not really that
recent as I still haven't finished my last merge with the master) version
of which is available at https://github.com/vadz/swig You're, of course,
welcome to try using it in your code but it's not part of the official SWIG
tree (yet, anyhow).

 Regards,
VZ

------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doxygen/docstring support?

Jeremy Cowles
Ah, ok, thanks!

On Wed, Sep 21, 2016 at 9:37 AM Vadim Zeitlin <[hidden email]> wrote:
On Wed, 21 Sep 2016 15:15:51 +0000 Jeremy Cowles <[hidden email]> wrote:

JC> Hey swig-users,
JC>
JC> Is there a way to have swig pick up Doxygen comments and use them as method
JC> documentation in the target language?
JC>
JC> I saw the autodoc and docstring features, but the source is already
JC> decorated like this:
JC>
JC>     /// Return true if this prim is a model group based on its kind
JC> metadata,
JC>     /// false otherwise.  If this prim is a group, it is also necessarily a
JC>     /// model.
JC>     bool IsGroup() const;
JC>
JC> I would love to just pickup that string and associate it with the function.

 This is the goal of the "doxygen" branch, the latest (but not really that
recent as I still haven't finished my last merge with the master) version
of which is available at https://github.com/vadz/swig You're, of course,
welcome to try using it in your code but it's not part of the official SWIG
tree (yet, anyhow).

 Regards,
VZ
------------------------------------------------------------------------------
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user

------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doxygen/docstring support?

Martin Siggel
Hi Jeremy,

there's also the doxy2swig tool, that creates a swig input file from a
doxygen xml output:
http://www.enricozini.org/blog/2007/tips/swig-doxygen-docstring/

We use it quite successfully in our software TiGL:
https://github.com/DLR-SC/tigl/blob/master/bindings/python_internal/CMakeLists.txt#L20

Martin

2016-09-21 18:42 GMT+02:00 Jeremy Cowles <[hidden email]>:

> Ah, ok, thanks!
>
> On Wed, Sep 21, 2016 at 9:37 AM Vadim Zeitlin <[hidden email]> wrote:
>>
>> On Wed, 21 Sep 2016 15:15:51 +0000 Jeremy Cowles <[hidden email]>
>> wrote:
>>
>> JC> Hey swig-users,
>> JC>
>> JC> Is there a way to have swig pick up Doxygen comments and use them as
>> method
>> JC> documentation in the target language?
>> JC>
>> JC> I saw the autodoc and docstring features, but the source is already
>> JC> decorated like this:
>> JC>
>> JC>     /// Return true if this prim is a model group based on its kind
>> JC> metadata,
>> JC>     /// false otherwise.  If this prim is a group, it is also
>> necessarily a
>> JC>     /// model.
>> JC>     bool IsGroup() const;
>> JC>
>> JC> I would love to just pickup that string and associate it with the
>> function.
>>
>>  This is the goal of the "doxygen" branch, the latest (but not really that
>> recent as I still haven't finished my last merge with the master) version
>> of which is available at https://github.com/vadz/swig You're, of course,
>> welcome to try using it in your code but it's not part of the official
>> SWIG
>> tree (yet, anyhow).
>>
>>  Regards,
>> VZ
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Swig-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/swig-user
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Swig-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/swig-user
>

------------------------------------------------------------------------------
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doxygen/docstring support?

Jeremy Cowles
That's awesome -- but any name remapping is going to cause the docs to fall off, yes?
Was that a problem in practice for you?

On Wed, Sep 21, 2016 at 12:57 PM Martin Siggel <[hidden email]> wrote:
Hi Jeremy,

there's also the doxy2swig tool, that creates a swig input file from a
doxygen xml output:
http://www.enricozini.org/blog/2007/tips/swig-doxygen-docstring/

We use it quite successfully in our software TiGL:
https://github.com/DLR-SC/tigl/blob/master/bindings/python_internal/CMakeLists.txt#L20

Martin

2016-09-21 18:42 GMT+02:00 Jeremy Cowles <[hidden email]>:
> Ah, ok, thanks!
>
> On Wed, Sep 21, 2016 at 9:37 AM Vadim Zeitlin <[hidden email]> wrote:
>>
>> On Wed, 21 Sep 2016 15:15:51 +0000 Jeremy Cowles <[hidden email]>
>> wrote:
>>
>> JC> Hey swig-users,
>> JC>
>> JC> Is there a way to have swig pick up Doxygen comments and use them as
>> method
>> JC> documentation in the target language?
>> JC>
>> JC> I saw the autodoc and docstring features, but the source is already
>> JC> decorated like this:
>> JC>
>> JC>     /// Return true if this prim is a model group based on its kind
>> JC> metadata,
>> JC>     /// false otherwise.  If this prim is a group, it is also
>> necessarily a
>> JC>     /// model.
>> JC>     bool IsGroup() const;
>> JC>
>> JC> I would love to just pickup that string and associate it with the
>> function.
>>
>>  This is the goal of the "doxygen" branch, the latest (but not really that
>> recent as I still haven't finished my last merge with the master) version
>> of which is available at https://github.com/vadz/swig You're, of course,
>> welcome to try using it in your code but it's not part of the official
>> SWIG
>> tree (yet, anyhow).
>>
>>  Regards,
>> VZ
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Swig-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/swig-user
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Swig-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/swig-user
>

------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doxygen/docstring support?

Martin Siggel
I didn't try out remapping.

2016-09-21 22:32 GMT+02:00 Jeremy Cowles <[hidden email]>:

> That's awesome -- but any name remapping is going to cause the docs to fall
> off, yes?
> Was that a problem in practice for you?
>
> On Wed, Sep 21, 2016 at 12:57 PM Martin Siggel <[hidden email]>
> wrote:
>>
>> Hi Jeremy,
>>
>> there's also the doxy2swig tool, that creates a swig input file from a
>> doxygen xml output:
>> http://www.enricozini.org/blog/2007/tips/swig-doxygen-docstring/
>>
>> We use it quite successfully in our software TiGL:
>>
>> https://github.com/DLR-SC/tigl/blob/master/bindings/python_internal/CMakeLists.txt#L20
>>
>> Martin
>>
>> 2016-09-21 18:42 GMT+02:00 Jeremy Cowles <[hidden email]>:
>> > Ah, ok, thanks!
>> >
>> > On Wed, Sep 21, 2016 at 9:37 AM Vadim Zeitlin <[hidden email]>
>> > wrote:
>> >>
>> >> On Wed, 21 Sep 2016 15:15:51 +0000 Jeremy Cowles
>> >> <[hidden email]>
>> >> wrote:
>> >>
>> >> JC> Hey swig-users,
>> >> JC>
>> >> JC> Is there a way to have swig pick up Doxygen comments and use them
>> >> as
>> >> method
>> >> JC> documentation in the target language?
>> >> JC>
>> >> JC> I saw the autodoc and docstring features, but the source is already
>> >> JC> decorated like this:
>> >> JC>
>> >> JC>     /// Return true if this prim is a model group based on its kind
>> >> JC> metadata,
>> >> JC>     /// false otherwise.  If this prim is a group, it is also
>> >> necessarily a
>> >> JC>     /// model.
>> >> JC>     bool IsGroup() const;
>> >> JC>
>> >> JC> I would love to just pickup that string and associate it with the
>> >> function.
>> >>
>> >>  This is the goal of the "doxygen" branch, the latest (but not really
>> >> that
>> >> recent as I still haven't finished my last merge with the master)
>> >> version
>> >> of which is available at https://github.com/vadz/swig You're, of
>> >> course,
>> >> welcome to try using it in your code but it's not part of the official
>> >> SWIG
>> >> tree (yet, anyhow).
>> >>
>> >>  Regards,
>> >> VZ
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> _______________________________________________
>> >> Swig-user mailing list
>> >> [hidden email]
>> >> https://lists.sourceforge.net/lists/listinfo/swig-user
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Swig-user mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/swig-user
>> >

------------------------------------------------------------------------------
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...