Proposal for addition: tristate class - 3-state logical type

Michael Pyne pynm0001 at comcast.net
Sat Sep 10 00:54:58 BST 2005


On Friday 09 September 2005 19:17, Olivier Goffart wrote:
> My objections are still the same:  it can be done with a simple int or an
> enum. (where, AFAIK, operators like ! and ~ works also)

Well ! shouldn't work anyways, because it can mean "!= true" or "== false", 
and with a tristate those two choices are not identical.  Similar arguments 
apply to ~.

A simple int is crap, and while an enum would work the ! and ~ operators 
couldn't be expected to have meaning anyways, and you'd also lose the 
operator overloading and bool ctors.

> Can you point me a place in the code where that class will be usefull ?

It would be useful for code that needs to return a code regarding user input 
where either the action was canceled, succeeded, or failed.  I think you can 
imagine that KDE has quite a bit of code that performs user interaction. ;)

To be honest I'm not sold on it needing to be in kdelibs but those specific 
objections are rather groundless IMO.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050909/9ba1f252/attachment.sig>


More information about the kde-core-devel mailing list