references to nested structure members

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

references to nested structure members

chrisroelle
Hi -

First, my apologies if this is a silly or previously-answered question - I've googled and read the manuals but am still having trouble.

My question is - how can I get doxygen to generate references to members of nested structures, like in the example below.... the outer.outer_member1.inner_member and outer.outer_member2.inner_member strings don't appear as references.

Any advice appreciated,
CR

/// \file example.h
/// \brief Example of references to members of nested struct.
/// \author Chris Roelle
///
/// what I want to do is see these all as references....
/// \ref inner
/// \ref inner.inner_member
/// \ref outer
/// \ref outer.outer_member1
/// \ref outer.outer_member1.inner_member
/// \ref outer.outer_member2
/// \ref outer.outer_member2.inner_member

/// struct inner doc
struct inner_tag
{
  /// inner_member doc
  int inner_member;
};
/// typedef inner doc
typedef struct inner_tag inner;

/// struct outer doc
struct outer_tag
{
  /// outer_member1 doc
  struct inner_tag outer_member1;
  /// outer_member2 doc
  inner outer_member2;
};
/// typedef outer doc
typedef struct outer_tag outer;
Reply | Threaded
Open this post in threaded view
|

Re: references to nested structure members

Fabian Cenedese
At 23:24 24.10.2016, chrisroelle wrote:
>Hi -
>
>First, my apologies if this is a silly or previously-answered question -
>I've googled and read the manuals but am still having trouble.
>
>My question is - how can I get doxygen to generate references to members of
>nested structures, like in the example below.... the
>outer.outer_member1.inner_member and outer.outer_member2.inner_member
>strings don't appear as references.

Have you tried the class::member notation (not the object name)?

bye  Fabi


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: references to nested structure members

chrisroelle
Hi Fabian -
Thanks for the reply - here is what I've added, same result.... is this what you meant?

/// \ref outer::outer_member1
/// \ref outer::outer_member1::inner_member
/// \ref outer::outer_member2
/// \ref outer::outer_member2::inner_member
/// \ref outer::outer_member1
/// \ref outer::outer_member1.inner_member
/// \ref outer::outer_member2
/// \ref outer::outer_member2.inner_member
/// \ref outer.inner.inner_member
/// \ref outer::inner.inner_member
/// \ref outer.inner::inner_member
Reply | Threaded
Open this post in threaded view
|

Re: references to nested structure members

Dimitri van Heesch-2
In reply to this post by chrisroelle
The references should follow the structure as it is defined, i.e.
struct inner is not defined inside struct outer, so you
cannot refer to its members via the outer struct, you have to refer to them directly via inner struct.

If you actually nest the structures you can refer to then via their nesting scope, i.e.:

/// - \ref outer
/// - \ref outer::outer_member1
/// - \ref outer::inner_tag::inner_member

/// struct outer doc
struct outer_tag
{
  /// struct inner doc
  struct inner_tag
  {
    /// inner_member doc
    int inner_member;
  } outer_member1; ///< outer member
};

/// typedef outer struct
typedef struct outer_tag outer;

Regards,
  Dimitri


> On 24 Oct 2016, at 23:24 , chrisroelle <[hidden email]> wrote:
>
> Hi -
>
> First, my apologies if this is a silly or previously-answered question -
> I've googled and read the manuals but am still having trouble.
>
> My question is - how can I get doxygen to generate references to members of
> nested structures, like in the example below.... the
> outer.outer_member1.inner_member and outer.outer_member2.inner_member
> strings don't appear as references.
>
> Any advice appreciated,
> CR
>
> /// \file example.h
> /// \brief Example of references to members of nested struct.
> /// \author Chris Roelle
> ///
> /// what I want to do is see these all as references....
> /// \ref inner
> /// \ref inner.inner_member
> /// \ref outer
> /// \ref outer.outer_member1
> /// \ref outer.outer_member1.inner_member
> /// \ref outer.outer_member2
> /// \ref outer.outer_member2.inner_member
>
> /// struct inner doc
> struct inner_tag
> {
>  /// inner_member doc
>  int inner_member;
> };
> /// typedef inner doc
> typedef struct inner_tag inner;
>
> /// struct outer doc
> struct outer_tag
> {
>  /// outer_member1 doc
>  struct inner_tag outer_member1;
>  /// outer_member2 doc
>  inner outer_member2;
> };
> /// typedef outer doc
> typedef struct outer_tag outer;
>
>
>
> --
> View this message in context: http://doxygen.10944.n7.nabble.com/references-to-nested-structure-members-tp7739.html
> Sent from the Doxygen - Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> The Command Line: Reinvented for Modern Developers
> Did the resurgence of CLI tooling catch you by surprise?
> Reconnect with the command line and become more productive.
> Learn the new .NET and ASP.NET CLI. Get your free copy!
> http://sdm.link/telerik
> _______________________________________________
> Doxygen-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/doxygen-users


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: references to nested structure members

Fabian Cenedese
In reply to this post by chrisroelle
At 16:49 25.10.2016, chrisroelle wrote:
>Hi Fabian -
>Thanks for the reply - here is what I've added, same result.... is this what
>you meant?
>
>/// \ref outer::outer_member1

Partly, I also meant using the class name outer_tag instead of the
object name outer (but I haven't tried myself).

bye  Fabi


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users