forked from natikgadzhi/XNMaths
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XNAbstractFunction.h
53 lines (39 loc) · 1.38 KB
/
XNAbstractFunction.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
//
// XNAbstractFunction.h
// XNMaths
//
// XNAbstractFunction is a scalar function of any number of arguments
//
// Created by Нат Гаджибалаев on 23.12.09.
// Copyright 2009 Нат Гаджибалаев. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class GCMathParser;
#pragma mark -
#pragma mark XNAbstractFunction class interface
@interface XNAbstractFunction : NSObject {
// function expression;
NSString *expression;
// arguments dictionary
NSMutableDictionary *arguments;
// maths parser
GCMathParser *parser;
}
#pragma mark -
#pragma mark Properties
@property(retain) NSString *expression;
@property(retain) NSMutableDictionary *arguments;
#pragma mark -
#pragma mark Class initialization
+ (XNAbstractFunction*) functionWithExpression: (NSString*)aExpression;
+ (XNAbstractFunction*) functionWithExpression: (NSString*)aExpression andArguments: (NSArray *)anArgumentNames;
#pragma mark -
#pragma mark Instance inititalization
- (XNAbstractFunction*) initWithExpression: (NSString*)aExpression;
- (XNAbstractFunction*) initWithExpression: (NSString*)aExpression andArguments: (NSArray *)anArgumentNames;
#pragma mark -
#pragma mark Working with values and arguments
- (void) setValue: (CGFloat) aValue forArgument: (NSString *)anArgumentName;
- (CGFloat) valueWithArguments: (NSDictionary *) anArgumentsDictionary;
- (CGFloat) valueWithCurrentArguments;
@end