Added MPExpression and MPFunction Interfaces
This commit is contained in:
47
MathPad/MPFunction.h
Normal file
47
MathPad/MPFunction.h
Normal file
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// MPFunction.h
|
||||
// MathPad
|
||||
//
|
||||
// Created by Kim Wittenburg on 18.04.14.
|
||||
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
||||
//
|
||||
|
||||
@class MPFunction, MPExpression;
|
||||
|
||||
@interface MPFunction : NSObject
|
||||
|
||||
#pragma mark Creation Methods
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
#pragma mark Children
|
||||
|
||||
- (NSUInteger)numberOfChildren;
|
||||
- (MPExpression *)childAtIndex;
|
||||
- (void)setChild:(MPExpression *)child atIndex:(NSUInteger)index;
|
||||
|
||||
#pragma mark Evaluating Functions
|
||||
|
||||
- (double)doubleValue;
|
||||
|
||||
@end
|
||||
|
||||
@interface MPFunction (MPFunctionExtensionMethods)
|
||||
|
||||
#pragma mark Children
|
||||
|
||||
- (NSArray *)children;
|
||||
|
||||
#pragma mark Evaluating Expressions
|
||||
|
||||
- (float)floatValue;
|
||||
- (int)intValue;
|
||||
- (NSInteger)integerValue;
|
||||
- (long long)longLongValue;
|
||||
- (NSString *)stringValue;
|
||||
|
||||
- (NSString *)description;
|
||||
|
||||
- (NSUInteger)hash;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user