Re: [Doxygen-users] Doyxgen 1.2.7: \ingroup group1 group2 still allowed?
Brought to you by:
dimitri
From: Patrick O. <Pat...@pa...> - 2001-05-07 07:58:31
|
On Fri, May 04, 2001 at 10:21:28PM +0200, Dimitri van Heesch wrote: > On Fri, May 04, 2001 at 03:12:54PM +0200, Patrick Ohly wrote: > > Hi all! > > > > According to the documentation (and implementation) of > > \ingroup an entity may be put into several different > > groups at once. > > Yes, but... > > > > > However, later on in groupdef.cpp:addMemberToGroups() > > this is detected and triggers a warning (groupdef.cpp, line 617): > > > > Member ... found in multiple groups.! > > The member will be put in group ..., and not group ... > > > > The class MemberDef also allows to set only one GroupDef: > > setGroupDef(GroupDef *gd) { group=gd; } > > ... members are an exception. Anything else can be in multiple groups. So the comment "Add a member to all groups it is contained in" for groupdef.cpp:addMemberToGroups() is not accurate, is it? Only one group is possible. Anyway, now I understand the problem. > > - A \defgroup @{ @} in one place overrides an \addtogroup @{ @} > > in another place (e.g. header files uses \defgroup, C files use > > \addtogroup) - this is currently impossible to implement, but > > something that I have been missing for quite a while. > > Well if it is impossible to implement, then feel free to try > the impossible :-) I will ;-) Of course it's not impossible, but requires more information than currently available for an Entry: for each entry in Entry::groups addMemberToGroups() needs to know where the definition came from to resolve the conflict. I guess I will change Entry::groups to a list of pairs of group name and a definition where the group name came from (\ingroup, @{ @}, member group). Okay? BTW, does it make sense to put members of structures into groups? /** * Test class * \ingroup Group1 Group2 */ struct test { /** * \ingroup Group1 * test a */ int a; }; This works, but then Group1 is said to contain a variable a, which is described as test::a. Okay, I guess if someone really wants to do that with \ingroup then he should be able to do so. However, the same thing happens with /** \defgroup Group1 First Group */ /*@{*/ /** Test class * \ingroup Group1 Group2 */ struct test { /** * test a */ int a; }; /*@}*/ The automatic grouping is applied to test::a, which is probably regarded as a bug and not a feature by most, isn't it? One more thing: may I change \addtogroup so that it doesn't require a \defgroup, but might create the group itself? The reason is that in our documentation there is no unique place where we could use \defgroup, so I'd rather like to use \addtogroup everywhere and let doxygen sort it all out. The current semantic of \addtogroup wouldn't be changed, only extended by allowing an optional group title. Bye, Patrick -- // pallas GmbH ............ Patrick Ohly ............. Hermuelheimer Str. 10 Software-Engineer D-50321 Bruehl, Germany po...@pa... fax +49-(0)2232-1896-29 phone +49-(0)2232-1896-30 http://www.pallas.com .......................................................... |