ResKnife/Cocoa/Plug-Ins/Template Editor/Element.h

36 lines
887 B
C
Raw Normal View History

2002-02-23 03:40:24 +00:00
#import <Foundation/Foundation.h>
@interface Element : NSObject
{
NSString *type;
NSString *label;
NSMutableArray *subelements; // elements of a list type have a sub-array of elements
union // for resource data only, ignored for templates
2002-03-21 04:03:44 +00:00
{
NSString *string;
NSNumber *number;
NSData *data;
BOOL boolean;
} elementData;
2002-02-23 03:40:24 +00:00
}
- (id)initWithType:(NSString *)typeValue andLabel:(NSString *)labelValue;
+ (id)elementOfType:(NSString *)typeValue withLabel:(NSString *)labelValue;
2002-03-21 04:03:44 +00:00
- (NSString *)label;
- (NSString *)type;
- (NSMutableArray *)subelements;
2002-03-21 04:03:44 +00:00
- (unsigned long)typeAsLong;
- (NSString *)string;
- (void)setString:(NSString *)string;
- (NSNumber *)number;
- (void)setNumber:(NSNumber *)number;
- (long)numberAsLong;
- (void)setNumberWithLong:(long)number;
- (NSData *)data;
- (void)setData:(NSData *)data;
- (BOOL)boolean;
- (void)setBoolean:(BOOL)boolean;
2002-02-23 03:40:24 +00:00
@end