-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChoice.h
62 lines (39 loc) · 1.19 KB
/
Choice.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
60
61
62
//
// Choice.h
// AvocadoTest1
//
// Created by Jake on 12-01-11.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MenuComponent.h"
@class Option;
extern NSString* CHOICE_PRICE_CHANGED;
extern NSString* CHOICE_SELECTED_CHANGED;
extern NSString* CHOICE_FREE_CHANGED;
extern NSString* CHOICE_CHANGED;
@interface Choice : MenuComponent
{
@protected
NSDecimalNumber* basePrice;
BOOL selected;
BOOL isFree;
}
@property (readonly) BOOL selected;
@property (readonly) BOOL isFree;
- (Choice *)initFromData:(NSDictionary *) inputData option:(Option*)anOption;
- (MenuComponent *)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;
- (Choice *)copy;
- (void)setBasePrice:(NSDecimalNumber *)aPrice;
- (void)setSelected:(BOOL)isSelected;
- (void)setSelectedUnsafe:(BOOL)isSelected;
- (void)toggleSelected;
- (void)setIsFree:(BOOL)free;
-(void)setIsFreeUnsafe:(BOOL)free;
- (NSDecimalNumber *)price;
- (NSComparisonResult)comparePrice:(Choice*)other;
- (BOOL)isEffectivelyEqual:(id)aChoice;
- (NSDictionary*)orderRepresentation;
- (NSString *)descriptionWithIndent:(NSInteger) indentLevel;
@end