-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItem.h
60 lines (37 loc) · 1.12 KB
/
Item.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
48
49
50
51
52
53
54
55
56
57
58
59
//
// Item.h
// AvocadoTest1
//
// Created by Jake on 12-01-11.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MenuComponent.h"
extern NSString* ITEM_MODIFIED;
@class Option;
@class NSMutableNumber;
@interface Item : MenuComponent
{
//i.e. the number of this item that this
//one object represents
NSMutableNumber* numberOfItems;
NSDecimalNumber* basePrice;
NSMutableArray *options;
}
@property (retain) NSMutableNumber *numberOfItems;
@property (retain, readonly) NSMutableArray *options;
@property (retain, readonly) NSDecimalNumber* basePrice;
@property (retain, readonly) NSDecimalNumber* price;
-(Item *)init;
-(Item *)initFromData:(NSDictionary *) inputData;
-(Item *)copy;
-(void) addOption:(Option *) anOption;
-(void) optionAltered;
-(void) numberAltered;
-(BOOL) isEffectivelyEqual:(id) anItem;
-(NSComparisonResult) nameSort:(Item *)anItem;
-(NSComparisonResult) priceSort:(Item *)anItem;
- (NSDictionary*)orderRepresentation;
- (NSString *) reducedName;
- (NSString *) descriptionWithIndent:(NSInteger) indentLevel;
@end