Re: [Doxygen-users] Typedef Aliases Don't Work
Brought to you by:
dimitri
|
From: Scott P. <sco...@ho...> - 2001-06-08 02:42:48
|
I appreciate that sometimes you want the hotlinks to go to the typedef. =
But I am specifically using typedefs to hide the true name of some =
structs. I don't want my docs cluttered with the struct name since that =
is not what the programmers will ever use in their code.
A configuration option of some sort would work for me.
What I really want is a specific ALIAS option so that I could completely =
replace the actual struct name from ALL docs (even the doc page for the =
struct) and have my typedef name be the only thing that ever appears in =
the docs.
I have a header file that keeps a typedef defined as the 'latest =
version' of a struct that may evolve. The older legacy structs will =
still be available in the header but they will be undocumented.
e.g.
struct Data1
{
int x;
};
// latest version of 'Data'
struct Data2
{
int x;
int addedMember; // new feature needs new data
};
typedef Data2 Data;
So recompiling withthe latest headers will always use the latest structs =
without changing the source.
Scott
----- Original Message -----=20
From: Trevor Robinson=20
To: 'dox...@li...'=20
Sent: Thursday, June 07, 2001 5:22 PM
Subject: RE: [Doxygen-users] Typedef Aliases Don't Work
I didn't know what the documentation said, but I have seen the =
behavior you describe. However, I think it's good that Doxygen links to =
the typedef because sometimes you need to see the typedef. For example, =
take typedefs of template instantiations. Assuming you have "typedef =
things<stuff> junk", if clicking on "junk" just took you to "template =
<class T> things", you wouldn't know "stuff" was involved. Given the =
necessity of linking to the typedef here, and the desire for =
consistency, it seems like the correct fix is to change the =
documentation.
Personally, I also like linking to the typedef so I know where the =
typedef is defined, perhaps to know what header to #include. It would =
be confusing to click on "junk" and have the definition for "stuff" =
appear. Also, since Doxygen let's you document typedefs, it seems =
consistent to treat them like first-class entities when linking, even =
though the compiler just treats them like aliases.
That said, maybe this is one of those cases that deserves a =
configuration option.
-Trevor
-----Original Message-----
From: Scott Palmer [mailto:sco...@ho...]
Sent: Thursday, June 07, 2001 3:56 PM
To: dox...@li...
Subject: [Doxygen-users] Typedef Aliases Don't Work
The documentation for doxygen clearly states:
"Typedefs that involve classes, structs and unions, like
typedef struct StructName TypeName
create an alias for StructName, so links will be generated to =
StructName, when either StructName itself or TypeName is encountered."
However this is NOT true. The example HTML documentation does not =
even do this. Clicking on the name of the typedef in the example =
documenation in the online help brings you to documentation for the =
typedef itself NOT the associated struct.
This problem seems to have been around since at least 1.2.6, and is =
still present in 1.2.8.
Are there any workarounds? Is this a known problem?
Thanks,
Scott
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.255 / Virus Database: 128 - Release Date: 2001-05-17
|