[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: enums in kdoc
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       2000-02-27 16:12:54
[Download RAW message or body]



Sirtaj Singh Kang wrote:
> 
> On Fri, Feb 25, 2000 at 11:29:43PM +0100, Stephan Kulow wrote:
> > Hi!
> 
> > http://developer.kde.org/documentation/library/2.0-api/classref/kio/KIO.html
> > looks _very_ strange with this lenghty enum line. Can someone think
> > of a better solution? We also need to document what which value means
> > - is there a way to do this with kdoc? And I would like to see it
> > removing the real values. We put them there for better debugging,
> > but it doesn't really belong in the docu.
> 
> If you can come up with a good solution for what should be shown I will
> implement it, but I'm busy with two (KDE and non-KDE) projects right
> now so it will have to wait for a bit. Or you're welcome to send me a
> patch for kdoc now that you're a perl convert. :)
> 
> Documenting enum constants will be a bit harder though.

How about something like this:

/**
 * This enum stores the constants used to represent the state of something.
 */
enum MyState {
  //* @enum The object is active
  Active = 1,
  //* @enum The object is passive
  Passive = 2
};

/**
 * This is a bitflag enum
 */
enum MyFlags {
  //* @flag The first flag
  One = 0x1,
  Two = 0x2,
  Three = 0x4
};

Rich.

> 
> -Taj.
> 
> Sirtaj S. Kang       taj@kde.org         ssk@physics.unimelb.edu.au
> Univ of Melbourne       The "gui" in "Penguin" is pronounced "K-D-E"

-- 
     Richard Moore		rich@ipso-facto.freeserve.co.uk
http://www.robocast.com/	richard@robocast.com
http://developer.kde.org/	rich@kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic