34 lines
767 B
C
Raw Normal View History

2002-02-23 03:40:24 +00:00
#import <Foundation/Foundation.h>
@interface Element : NSObject
{
2002-03-21 04:03:44 +00:00
NSString *type;
NSString *label;
union // for resource data only, ignored for templates
{
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;
- (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