-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathInterface.m
52 lines (42 loc) · 1.76 KB
/
Interface.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Interface.m
// data_m
//
// Created by Mike Fluff on 4/9/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "Interface.h"
#import "Device.h"
#import "VIF.h"
@implementation Interface
@dynamic id;
@dynamic netmask;
@dynamic mac;
@dynamic ip;
@dynamic device;
@dynamic vifs;
- (void)addVifsObject:(VIF *)value {
NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
[self willChangeValueForKey:@"vifs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
[[self primitiveValueForKey:@"vifs"] addObject:value];
[self didChangeValueForKey:@"vifs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
[changedObjects release];
}
- (void)removeVifsObject:(VIF *)value {
NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
[self willChangeValueForKey:@"vifs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
[[self primitiveValueForKey:@"vifs"] removeObject:value];
[self didChangeValueForKey:@"vifs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
[changedObjects release];
}
- (void)addVifs:(NSSet *)value {
[self willChangeValueForKey:@"vifs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
[[self primitiveValueForKey:@"vifs"] unionSet:value];
[self didChangeValueForKey:@"vifs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}
- (void)removeVifs:(NSSet *)value {
[self willChangeValueForKey:@"vifs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
[[self primitiveValueForKey:@"vifs"] minusSet:value];
[self didChangeValueForKey:@"vifs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}
@end