forked from natikgadzhi/XNMaths
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XNFunction.h
52 lines (42 loc) · 1.18 KB
/
XNFunction.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
//
// XNFunction.m
//
// XNFunction class.
// XNFunction represents a numeric function with a numeric argument.
//
// Created by Нат Гаджибалаев on 07.11.09.
// Copyright 2009 Нат Гаджибалаев. All rights reserved.
//
#pragma mark -
#pragma mark Imports
#import <Cocoa/Cocoa.h>
@class GCMathParser;
@class XNFloatRange;
@class XNLineData;
#pragma mark -
#pragma mark XNFunction class interface
@interface XNFunction: NSObject
{
// the expression to evalute.
NSString *expression;
// parser object.
// we need the object to pass the params
// and than call #evalute method on it.
GCMathParser *parser;
}
#pragma mark -
#pragma mark Properties
@property(retain) NSString *expression;
#pragma mark -
#pragma mark Class initialization
+ (XNFunction*) functionWithExpression: (NSString*)aExpression;
#pragma mark -
#pragma mark Instance inititalization
- (XNFunction*) initWithExpression: (NSString*)aExpression;
#pragma mark -`
#pragma mark Value getters
- (CGFloat) valueWithFloat: (CGFloat) a_X;
#pragma mark -
#pragma mark Private (data related)
- (XNLineData *) createLineDataInRange: (XNFloatRange*)range withQuality: (NSUInteger) lineQuality;
@end