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

List:       kde-core-devel
Subject:    Re: enum's & KConfigBase
From:       Frans Englich <frans.englich () telia ! com>
Date:       2006-01-17 12:13:52
Message-ID: 200601171213.52346.frans.englich () telia ! com
[Download RAW message or body]

On Tuesday 17 January 2006 00:14, Stefan Teleman wrote:
> On Monday 16 January 2006 18:58, Thomas Braxton wrote:
> > True, but how many enums that are used in KDE would this really matter
> > for? If you had an enum that needed special handling you would just have
> > to write your own implementation of readEntry/writeEntry for that enum.
> > most enums in KDE that I've seen so far are more than compensated for
> > with an int, besides we aren't talking about the binary representation of
> > an enum, it's about the way it is saved as text in a config file.
>
> In an ideal world, it shouldn't matter much (definition of the Ideal World
> in this case: No Negative Enums :-).
>
> It does become a big huge mess when there's some enum initialized with a
> negative "magic" value,

Hold on.. you're saying the enum below is evil? Even if all I do is casting it 
to an int, but never enter KConfig?

        enum ComparisonResult
        {
            LessThan = -1,
            Equal = 0,
            GreaterThan = 1
        };


(But I think Thomas have a point; this enum discussion is OT and not related 
to the proposal.)


Cheers,

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

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