Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update documentation formatting

  • Loading branch information...
commit 968eb90f6fcd2f8436d475ed2ed043e396ac9437 1 parent 2b6d62e
@tonyarnold tonyarnold authored
View
76 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalRecord.h
@@ -13,89 +13,87 @@
#pragma mark - Setup
/**
- * Initializes MagicalRecord's default contexts using the provided persistent store coordinator.
- *
- * @param coordinator Persistent Store Coordinator
+ Initializes MagicalRecord's default contexts using the provided persistent store coordinator.
+
+ @param coordinator Persistent Store Coordinator
*/
+ (void) MR_initializeDefaultContextWithCoordinator:(NSPersistentStoreCoordinator *)coordinator;
#pragma mark - Default Contexts
/**
- * @discussion Use this context for making and saving changes. All saves will be merged into the context returned by `MR_defaultContext` as well.
- *
- * @return Private context used for saving changes to disk on a background thread
+ Root context responsible for sending changes to the main persistent store coordinator that will be saved to disk.
+
+ @discussion Use this context for making and saving changes. All saves will be merged into the context returned by `MR_defaultContext` as well.
+
+ @return Private context used for saving changes to disk on a background thread
*/
+ (NSManagedObjectContext *) MR_rootSavingContext;
/**
- * @discussion Please do not use this context for saving changes, as it will block the main thread when doing so.
- *
- * @return Main queue context that can be observed for changes
+ @discussion Please do not use this context for saving changes, as it will block the main thread when doing so.
+
+ @return Main queue context that can be observed for changes
*/
+ (NSManagedObjectContext *) MR_defaultContext;
#pragma mark - Context Creation
/**
- * Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`, with it's parent context set to the root saving context.
- *
- * @return Private context with the parent set to the root saving context
+ Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`, with it's parent context set to the root saving context.
+ @return Private context with the parent set to the root saving context
*/
+ (NSManagedObjectContext *) MR_newContext NS_RETURNS_RETAINED;
/**
- * Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`, with it's parent context set to the root saving context.
- *
- * @param parentContext Context to set as the parent of the newly created private context
- *
- * @return Private context with the parent set to the provided context
+ Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`, with it's parent context set to the root saving context.
+
+ @param parentContext Context to set as the parent of the newly initialized context
+
+ @return Private context with the parent set to the provided context
*/
+ (NSManagedObjectContext *) MR_newContextWithParent:(NSManagedObjectContext *)parentContext NS_RETURNS_RETAINED;
/**
- * Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`, with it's persistent store coordinator set to the provided coordinator.
- *
- * @param coordinator Persistent Store Coordinator
- *
- * @return Private context with it's persistent store coordinator set to the provided coordinator
+ Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`, with it's persistent store coordinator set to the provided coordinator.
+
+ @param coordinator A persistent store coordinator
+
+ @return Private context with it's persistent store coordinator set to the provided coordinator
*/
+ (NSManagedObjectContext *) MR_newContextWithStoreCoordinator:(NSPersistentStoreCoordinator *)coordinator NS_RETURNS_RETAINED;
/**
- * Creates and returns a new managed object context of type `NSMainQueueConcurrencyType`.
- *
- * @return Main queue context
+ Initializes a context of type `NSMainQueueConcurrencyType`.
+ @return A context initialized using the `NSPrivateQueueConcurrencyType` concurrency type.
*/
+ (NSManagedObjectContext *) MR_newMainQueueContext NS_RETURNS_RETAINED;
/**
- * Creates and returns a new managed object context of type `NSPrivateQueueConcurrencyType`.
- *
- * @return Private context
+ Initializes a context of type `NSPrivateQueueConcurrencyType`.
+ @return A context initialized using the `NSPrivateQueueConcurrencyType` concurrency type.
*/
+ (NSManagedObjectContext *) MR_newPrivateQueueContext NS_RETURNS_RETAINED;
#pragma mark - Debugging
/**
- * Sets a working name for the context, which will be used in debug logs.
- *
- * @param workingName Name for the context
+ Sets a working name for the context, which will be used in debug logs.
+ @param workingName Name for the context
*/
- (void) MR_setWorkingName:(NSString *)workingName;
/**
- * @return Working name for the context
+ @return Working name for the context
*/
- (NSString *) MR_workingName;
/**
- * @return Description of this context
+ @return Description of this context
*/
- (NSString *) MR_description;
/**
- * @return Description of the parent contexts of this context
+ @return Description of the parent contexts of this context
*/
- (NSString *) MR_parentChain;
@@ -103,16 +101,16 @@
#pragma mark - Helpers
/**
- * Reset the default context.
+ Reset the default context.
*/
+ (void) MR_resetDefaultContext;
/**
- * Delete the provided objects from the context
- *
- * @param managedObjects an object conforming to NSFastEnumeration, containing NSManagedObjects
+ Delete the provided objects from the context
+
+ @param objects An object conforming to `NSFastEnumeration`, containing NSManagedObject instances
*/
-- (void) MR_deleteObjects:(id <NSFastEnumeration>)managedObjects;
+- (void) MR_deleteObjects:(id <NSFastEnumeration>)objects;
@end
View
4 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalRecord.m
@@ -149,9 +149,9 @@ + (void) MR_resetDefaultContext
[defaultContext reset];
}
-- (void) MR_deleteObjects:(id <NSFastEnumeration>)managedObjects
+- (void) MR_deleteObjects:(id <NSFastEnumeration>)objects
{
- for (NSManagedObject *managedObject in managedObjects)
+ for (NSManagedObject *managedObject in objects)
{
[self deleteObject:managedObject];
}
Please sign in to comment.
Something went wrong with that request. Please try again.