[Doxygen-develop] Feature request: \prev tag
Brought to you by:
dimitri
From: Jaap S. <s98...@ho...> - 2002-03-30 13:52:20
|
Hello people, I have an idea for a new tag in Doxygen. I don't know how hard it would be to implement it, or whether you even have time for it. But it would certainly be usefull to me. Every now and then I have a list of flags or attributes that all more or less the same comment for them. simple example: const unsigned long BIT_0 = 1<<0; //!< Number with only bit 0 set. const unsigned long BIT_1 = 1<<2; //!< Number with only bit 1 set. const unsigned long BIT_2 = 1<<3; //!< Number with only bit 2 set. ... const unsigned long BIT_31 = 1<<31; //!< Number with only bit 31 set. Apart from the un-usefullness of this example (i've seen better examples, but can't think of any now) this copy pasting of comments should be avoided ofcourse. This is already possible in Doxygen by using groups. Just wrap all those constants in a (sub-)group and comment that group. Example (can't remember the exact syntax here): /*! \defgroup BitDefines These constants BIT_N represent numbers where only bit N is set. */ //!{ const unsigned long BIT_0 = 1<<0; const unsigned long BIT_1 = 1<<2; .. const unsigned long BIT_31 = 1<<31; //!} However, this is a hassle, and clutters the comments-style if used in between loads of other code. What if we could do the following: const unsigned long BIT_0 = 1<<0; //!< BIT_N has only bit N set. const unsigned long BIT_1 = 1<<2; //!< \prev const unsigned long BIT_2 = 1<<3; //!< \prev etc. So the previous comment is used for the current comment too. Mmmmm, now I read this email, this doesn't sound like a very usefull tag. However, I can recall some moments during coding where I could have used it. Ah well, never mind... Cheers, Jape _________________________________________________________________ Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail: http://www.hotmail.com/nl |