diff options
author | Brian Cully <bjc@kublai.com> | 2008-04-14 21:45:08 -0400 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2008-04-14 21:45:08 -0400 |
commit | 17349a5e426dc7acf1216a3767a22f69974cbca0 (patch) | |
tree | 20029d02f07ab6257cccec36d34fb312f796e1d1 /Liaison/Group.h | |
download | liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.tar.gz liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.zip |
Initial commit.
Diffstat (limited to 'Liaison/Group.h')
-rw-r--r-- | Liaison/Group.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Liaison/Group.h b/Liaison/Group.h new file mode 100644 index 0000000..2112bff --- /dev/null +++ b/Liaison/Group.h @@ -0,0 +1,52 @@ +// +// Group.h +// Liaison +// +// Created by Brian Cully on Tue Feb 04 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +typedef enum _GroupType { LEAF, BRANCH } GroupType; + +@interface Group : NSObject <NSCoding> +{ + NSString *name; + GroupType type; + NSImage *icon; + NSMutableArray *children; + Group *parent; + + LiFileStore *theFileStore; +} ++ (Group *)groupWithName: (NSString *)aName; ++ (Group *)groupWithName: (NSString *)aName andType: (GroupType)aType; +- (Group *)initWithName: (NSString *)aName; +- (Group *)initWithName: (NSString *)aName andType: (GroupType)aType; + +- (id)initWithContentsOfFile: (NSString *)aFilename; +- (BOOL)writeToFile: (NSString *)aFilename; + +- (LiFileStore *)fileStore; +- (void)setFileStore: (LiFileStore *)aFileStore; + +- (NSString *)name; +- (GroupType)type; +- (void)setName: (NSString *)aName; +- (void)setType: (GroupType)aType; +- (NSImage *)icon; +- (void)setIcon: (NSImage *)anIcon; + +- (Group *)parent; + +- (int)numberOfChildren; +- (NSEnumerator *)childEnumerator; +- (BOOL)hasChild: (id)aChild; +- (void)addChild: (id)aChild; +- (void)removeChild: (id)aChild; +- (Group *)childNamed: (NSString *)aName; +- (void)removeChildNamed: (NSString *)aName; +- (id)childAtIndex: (int)index; +- (void)removeChildAtIndex: (int)index; +@property (retain) NSMutableArray *children; +@property (retain,getter=fileStore) LiFileStore *theFileStore; +@end |