Skip to content
Browse files

Improve documentation.

  • Loading branch information...
1 parent 9597016 commit 06f7f7710e3317c7ce9da82b0fa43167c808b816 @danielctull committed Jan 8, 2011
Showing with 45 additions and 23 deletions.
  1. +11 −0 DTResurrectionController.h
  2. +8 −2 DTResurrectionKit.h
  3. +26 −21 DTResurrector.h
View
11 DTResurrectionController.h
@@ -28,11 +28,22 @@ extern NSString *const DTResurrectionKitPathDebug;
}
+/**
+ */
@property (nonatomic, assign) BOOL hasResurrected;
+
+
+/**
+ */
@property (nonatomic, assign) BOOL debugMode;
//- (IBAction)loadResurrection:(id)sender;
//- (IBAction)saveResurrection:(id)sender;
+
+/**
+ @param path
+
+ */
- (void)resurrectWithArchivePath:(NSString *)path;
@end
View
10 DTResurrectionKit.h
@@ -12,21 +12,27 @@
from the resurrection system.
*/
@protocol DTResurrection
-/** @brief Initialiser DTResurrectionKit uses to restore the object.
+
+
+
+/** Initialiser DTResurrectionKit uses to restore the object.
As shown in DTResurrector, you can save
@param resurrector The resurrector doing the restoration.
*/
- (id)initWithResurrector:(DTResurrector *)resurrector;
-/** @brief Method DTResurrectionKit uses to save the object metadata.
+
+
+/** Method DTResurrectionKit uses to save the object metadata.
@param resurrector The resurrector doing the saving.
*/
- (void)encodeToResurrector:(DTResurrector *)resurrector;
@end
+
#import "DTResurrector.h"
#import "DTResurrectionController.h"
View
47 DTResurrector.h
@@ -40,54 +40,59 @@
NSArray *modalViewControllerParents, *modalViewControllerChildren;
}
-@property (nonatomic, retain, readonly) NSArray *modalViewControllerParents, *modalViewControllerChildren;
+@property (nonatomic, retain, readonly) NSArray *modalViewControllerParents;
+@property (nonatomic, retain, readonly) NSArray *modalViewControllerChildren;
- (void)viewController:(UIViewController *)parentVC unpackedModalViewController:(UIViewController *)childVC;
-
+/** Used to test if an the given object is a core object within resurrection kit.
+
+ Core objects in the system are currently members of the classes NSNumber, NSString, NSData and NSDate.
+ If you want to store any other type of object, you will need to implement the initWithResurrector: and
+ encodeToResurrector: methods from the DTResurrection protocol.
+
+ The reason the list of core objects is not the same as any object that conforms to NSCoding is that the
+ resurrection system keeps a reference of the objects it is saving, and if it comes across the same object
+ again, it won't need to query it again, and instead will use the existing refernce.
+
+ @param object The object to test.
+ @return YES if the object is a core object, NO if not.
+ */
- (BOOL)objectIsCoreObject:(id)object;
-/** @name Convert graph hierarchy
- @{
- */
-/** @brief Encodes the graph hierarchy starting at the given object.
+/// @name Convert graph hierarchy
+
+/** Encodes the graph hierarchy starting at the given object.
@param object The root object of the graph.
- return A dictionary representing the object graph.
+
+ @return A dictionary representing the object graph.
*/
- (NSDictionary *)deconstructWithRootObject:(NSObject<DTResurrection> *)object;
/** @brief Restores a graph hierarchy using a dictionary representation.
@param dictionary A dictionary representing the object graph.
- return The root object of the graph.
+ @return The root object of the graph.
*/
- (id)resurrect:(NSDictionary *)dictionary;
-/**
- @}
- */
-
-/** @name Storing values
- @{
- */
+/// @name Storing values
-/** @brief Use to save metadata about the object.
+/** Use to save metadata about the object.
@param object The object to be saved.
@param key The key to identify the object.
*/
- (void)setObject:(id)object forKey:(NSString *)key;
-/** @brief Use to retrive metadata about the object.
+
+
+/** Use to retrive metadata about the object.
@param key The key to identify the object.
*/
- (id)objectForKey:(NSString *)key;
-/**
- @}
- */
-
@end

0 comments on commit 06f7f77

Please sign in to comment.
Something went wrong with that request. Please try again.