// // 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:(NSUInteger)index; - (void)setChild:(MPExpression *)child atIndex:(NSUInteger)index; #pragma mark Evaluating Functions - (double)doubleValue; #pragma mark Working With Functions - (BOOL)isEqualToFunction:(MPFunction *)aFunction; @end @interface MPFunction (MPFunctionExtensionMethods) #pragma mark Children // May be overridden for performance improvements - (NSArray *)children; #pragma mark Evaluating Functions - (float)floatValue; - (int)intValue; - (NSInteger)integerValue; - (long long)longLongValue; - (NSString *)description; - (NSUInteger)hash; @end