Skip to content

Commit

Permalink
Add documentation for SDLPrioritizedObject
Browse files Browse the repository at this point in the history
Fix regression on return type on `nextObject` from `instancetype` to `id`

Fixes #143
  • Loading branch information
Joel Fischer committed Apr 20, 2015
1 parent 80ccacf commit 607239a
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@

@interface SDLPrioritizedObjectCollection : NSObject

/**
* Add a new object to a push-pop collection. The object will be added in a location based on the priority passed in.
*
* A lower priority number is considered to be "higher". This is because this class is generally used with RPC service numbers, and lower services preempt higher ones.
*
* @param object The object to be added to the priority collection
* @param priority The priority to use when determining the location of the object in the collection. A lower number is considered a higher priority
*/
- (void)addObject:(id)object withPriority:(NSInteger)priority;
- (instancetype)nextObject;

/**
* Retreive the highest priority object from the collection. This also removes the object.
*
* @return The highest priority object retrieved from the collection.
*/
- (id)nextObject;

@end

0 comments on commit 607239a

Please sign in to comment.