Created
September 20, 2012 17:23
-
-
Save matzew/3757190 to your computer and use it in GitHub Desktop.
AGDataManager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* AGDataManager manages different AGStore implementations. It is basically a | |
* factory that hides the concrete instanciation of a specific AGStore implementation. | |
* The class offers simple APIs to add, remove or get access to a 'data store'. | |
* | |
* NOTE: Right now, there is NO automatic data sync. This is up to the user. | |
*/ | |
@interface AGDataManager : NSObject | |
/** | |
* Creates a new default (in memory) AGStore implemention. | |
* | |
* @param storeName The name of the actual data store object. | |
*/ | |
-(id<AGStore>)add:(NSString*) storeName; | |
/** | |
* Creates a new AGStore implemention. The actual type is determined by the type argument. | |
* | |
* @param storeName The name of the actual data store object. | |
* @param type The type of the new data store object. | |
*/ | |
-(id<AGStore>)add:(NSString*) storeName type:(NSString*) type; | |
/** | |
* Removes a AGStore implemention from the AGDataManager. The store to be removed | |
* is determined by the storeName argument. | |
* | |
* @param storeName The name of the actual data store object. | |
*/ | |
-(id<AGStore>)remove:(NSString*) storeName; | |
/** | |
* Loads a given AGStore implemention, based on the given storeName argument. | |
* | |
* @param storeName The name of the actual data store object. | |
*/ | |
-(id<AGStore>)get:(NSString*) storeName; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment