-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSSYManagedTreeObject.h
47 lines (34 loc) · 1.19 KB
/
SSYManagedTreeObject.h
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
#import <Cocoa/Cocoa.h>
#import "SSYManagedObject.h"
#import "SSYIndexee.h"
extern NSString* const constKeyChildren ;
extern NSString* const constKeyParent ;
extern NSString* const SSYManagedTreeObjectKey ;
extern NSString* const SSYManagedTreeChildrenChangedNotification ;
/*!
@brief A subclass of SSYManagedObject which has 'parent'
'children' and 'index' properties, so that it can be used as
a node in a tree.
@details I could put more stuff from the Stark class in here.
Examples: recursivelyPerformSelector:... et al, moveToBkmxParent... et al
*/
@interface SSYManagedTreeObject : SSYManagedObject <SSYIndexee> {
NSArray* m_cachedChildrenOrdered ;
}
@property (retain) NSSet* children ;
- (NSInteger)numberOfChildren ;
- (SSYManagedTreeObject*)childAtIndex:(NSInteger)index ;
- (NSArray*)childrenOrdered ;
- (void)deeplyForgetCachedChildrenOrdered ;
@property (retain) SSYManagedTreeObject* parent ;
/*!
@brief Removes all children from the receiver
@details I'm not sure if the implementation used could be made more efficient
*/
- (void)removeAllChildren ;
/*!
@brief Sets the value in the ivar index
*/
- (void)setIndexValue:(NSInteger)index ;
- (NSInteger)indexValue ;
@end