/Homepwner/Homepwner/BNRItemStore.h

https://bitbucket.org/dhirschl/bnr-3rd-edition · C Header · 34 lines · 20 code · 6 blank · 8 comment · 0 complexity · b5129ac8ff50b2a21fce15df1b7d1d51 MD5 · raw file

  1. //
  2. // BNRItemStore.h
  3. // Homepwner
  4. //
  5. // Created by Daniel Hirschlein on 8/30/12.
  6. // Copyright (c) 2012 Daniel Hirschlein. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <CoreData/CoreData.h>
  10. @class BNRItem;
  11. @interface BNRItemStore : NSObject
  12. {
  13. NSMutableArray *allItems;
  14. NSMutableArray *allAssetTypes;
  15. NSManagedObjectContext *context;
  16. NSManagedObjectModel *model;
  17. }
  18. // Notice that this is a class method and prefixed with a + instead of a -
  19. + (BNRItemStore *)sharedStore;
  20. - (NSArray *)allItems;
  21. - (BNRItem *)createItem;
  22. - (void)removeItem:(BNRItem *)p;
  23. - (void)moveItemAtIndex:(int)from toIndex:(int)to;
  24. - (NSString *)itemArchivePath;
  25. - (BOOL)saveChanges;
  26. - (void)loadAllItems;
  27. - (NSArray *)allAssetTypes;
  28. @end