Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed documentation in the common parts of Bolts. #51

Merged
merged 1 commit into from Aug 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Bolts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@
isa = PBXGroup;
children = (
8103FA5619900A84000BAE3F /* BoltsVersion.h */,
8103FA4E19900A84000BAE3F /* BFExecutor.h */,
8103FA4F19900A84000BAE3F /* BFExecutor.m */,
8103FA5419900A84000BAE3F /* Bolts.h */,
8103FA5519900A84000BAE3F /* Bolts.m */,
8103FA5019900A84000BAE3F /* BFTask.h */,
8103FA5119900A84000BAE3F /* BFTask.m */,
8103FA5219900A84000BAE3F /* BFTaskCompletionSource.h */,
8103FA5319900A84000BAE3F /* BFTaskCompletionSource.m */,
8103FA5419900A84000BAE3F /* Bolts.h */,
8103FA5519900A84000BAE3F /* Bolts.m */,
8103FA4E19900A84000BAE3F /* BFExecutor.h */,
8103FA4F19900A84000BAE3F /* BFExecutor.m */,
);
path = Common;
sourceTree = "<group>";
Expand Down
6 changes: 5 additions & 1 deletion Bolts/Common/BFExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,26 @@
+ (instancetype)mainThreadExecutor;

/*!
Returns a new executor that uses the given block execute continations.
Returns a new executor that uses the given block to execute continuations.
@param block The block to use.
*/
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;

/*!
Returns a new executor that runs continuations on the given queue.
@param queue The instance of `dispatch_queue_t` to dispatch all continuations onto.
*/
+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue;

/*!
Returns a new executor that runs continuations on the given queue.
@param queue The instance of `NSOperationQueue` to run all continuations on.
*/
+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue;

/*!
Runs the given block using this executor's particular strategy.
@param block The block to execute.
*/
- (void)execute:(void(^)())block;

Expand Down
4 changes: 4 additions & 0 deletions Bolts/Common/BFTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ typedef id(^BFContinuationBlock)(BFTask *task);

/*!
Creates a task that is already completed with the given result.
@param result The result for the task.
*/
+ (instancetype)taskWithResult:(id)result;

/*!
Creates a task that is already completed with the given error.
@param error The error for the task.
*/
+ (instancetype)taskWithError:(NSError *)error;

/*!
Creates a task that is already completed with the given exception.
@param exception The exception for the task.
*/
+ (instancetype)taskWithException:(NSException *)exception;

Expand All @@ -48,6 +51,7 @@ typedef id(^BFContinuationBlock)(BFTask *task);
/*!
Returns a task that will be completed (with result == nil) once
all of the input tasks have completed.
@param tasks An `NSArray` of the tasks to use as an input.
*/
+ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks;

Expand Down
5 changes: 5 additions & 0 deletions Bolts/Common/BFTaskCompletionSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,21 @@
/*!
Completes the task by setting the result.
Attempting to set this for a completed task will raise an exception.
@param result The result of the task.
*/
- (void)setResult:(id)result;

/*!
Completes the task by setting the error.
Attempting to set this for a completed task will raise an exception.
@param error The error for the task.
*/
- (void)setError:(NSError *)error;

/*!
Completes the task by setting an exception.
Attempting to set this for a completed task will raise an exception.
@param exception The exception for the task.
*/
- (void)setException:(NSException *)exception;

Expand All @@ -61,12 +64,14 @@

/*!
Sets the error of the task if it wasn't already completed.
@param error The error for the task.
@returns whether the new value was set.
*/
- (BOOL)trySetError:(NSError *)error;

/*!
Sets the exception of the task if it wasn't already completed.
@param exception The exception for the task.
@returns whether the new value was set.
*/
- (BOOL)trySetException:(NSException *)exception;
Expand Down
1 change: 1 addition & 0 deletions Bolts/Common/Bolts.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern NSInteger const kBFMultipleErrorsError;

/*!
Returns the version of the Bolts Framework as an NSString.
@returns The NSString representation of the current version.
*/
+ (NSString *)version;

Expand Down
1 change: 1 addition & 0 deletions Bolts/iOS/BFURL.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/*!
Creates a link target from a raw URL. Usually, this will be used to parse a URL passed into
an app delegate's handleOpenURL: method.
@param url The instance of `NSURL` to create BFURL from.
*/
+ (BFURL *)URLWithURL:(NSURL *)url;

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ fi
# Done
#

progress_message "Framework version info:" `perl -pe "s/.*@//" < $BOLTS_SRC/Bolts/BoltsVersion.h`
progress_message "Framework version info:" `perl -pe "s/.*@//" < $BOLTS_SRC/Bolts/Common/BoltsVersion.h`
common_success
2 changes: 1 addition & 1 deletion scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ -z "$BOLTS_SCRIPT" ]; then
BOLTS_OSX_FRAMEWORK=$BOLTS_OSX_BUILD/$BOLTS_FRAMEWORK_NAME

# The name of the docset
BOLTS_DOCSET_NAME=bolts.docset
BOLTS_DOCSET_NAME=Bolts.docset

# The path to the framework docs
BOLTS_FRAMEWORK_DOCS=$BOLTS_BUILD/$BOLTS_DOCSET_NAME
Expand Down