Re: NSStream's enum of NSStreamEventEndEncountered.
Re: NSStream's enum of NSStreamEventEndEncountered.
- Subject: Re: NSStream's enum of NSStreamEventEndEncountered.
- From: Quincey Morris <email@hidden>
- Date: Thu, 24 Jul 2014 13:43:34 -0700
On Jul 24, 2014, at 11:58 , edward taffel <email@hidden> wrote:
> NSStreamEventOpenCompleted = 1 << 0,
>
> a point of style?
Supposition:
It’s point of API self-documentation. The shift indicates that this is a bit mask (or bit field) value, and hence that the enum’s members can usefully be OR’ed together. Unshifted, the members would be whole values, and therefore mutually exclusive.
But I wouldn’t necessarily expect that the SDK is 100% consistent in this regard.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden