PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 3#import <BEE/BEE.h>
 4
 5@implementation BEEController
 6
 7- (id)init
 8{
 9  self = [super init];
10
11  BEEStorageController *sc = [BEEStorageController sharedStorageController];
12
13  ASSIGN(_sc, sc);
14
15  return self;
16}
17
18- (void)dealloc
19{
20  [_sc storeAllObjects];
21  RELEASE(_sc);
22
23  [super dealloc];
24}
25
26/* Foundation overridings */
27
28/* BEE specific */
29
30- (NSArray *)allObjects
31{
32  return [_sc allObjects];
33}
34
35- (id)objectWithId:(NSNumber *)oid
36{
37  return [_sc objectWithId:oid];
38}
39
40- (void)addObject:(id)o
41{
42  [_sc addObject:o];
43}
44
45- (void)deleteObject:(id)o
46{
47  [_sc deleteObject:o];
48}
49
50@end /* BEEController */
51
52@implementation BEEController ( private )
53
54@end /* BEEController ( private ) */