/BEE.framework/BEE/BEEController.m

http://eeframework.googlecode.com/ · Objective C · 54 lines · 34 code · 17 blank · 3 comment · 0 complexity · 2057776208f6ab571021dd8c9fc2ff7f MD5 · raw file

  1. // -*- objc -*-
  2. #import <BEE/BEE.h>
  3. @implementation BEEController
  4. - (id)init
  5. {
  6. self = [super init];
  7. BEEStorageController *sc = [BEEStorageController sharedStorageController];
  8. ASSIGN(_sc, sc);
  9. return self;
  10. }
  11. - (void)dealloc
  12. {
  13. [_sc storeAllObjects];
  14. RELEASE(_sc);
  15. [super dealloc];
  16. }
  17. /* Foundation overridings */
  18. /* BEE specific */
  19. - (NSArray *)allObjects
  20. {
  21. return [_sc allObjects];
  22. }
  23. - (id)objectWithId:(NSNumber *)oid
  24. {
  25. return [_sc objectWithId:oid];
  26. }
  27. - (void)addObject:(id)o
  28. {
  29. [_sc addObject:o];
  30. }
  31. - (void)deleteObject:(id)o
  32. {
  33. [_sc deleteObject:o];
  34. }
  35. @end /* BEEController */
  36. @implementation BEEController ( private )
  37. @end /* BEEController ( private ) */