Added the MPExpressionTree Classes
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#import "MPParenthesisFunction.h"
|
||||
#import "MPParenthesisFunctionLayout.h"
|
||||
#import "MPPowerFunctionLayout.h"
|
||||
#import "MPFractionFunctionLayout.h"
|
||||
#import "MPFractionFunction.h"
|
||||
|
||||
#import "NSIndexPath+MPAdditions.h"
|
||||
|
||||
@@ -31,6 +33,8 @@
|
||||
return [[MPParenthesisFunctionLayout alloc] initWithFunction:function parent:parent];
|
||||
} else if (class == [MPPowerFunction class]) {
|
||||
return [[MPPowerFunctionLayout alloc] initWithFunction:function parent:parent];
|
||||
} else if (class == [MPFractionFunction class]) {
|
||||
return [[MPFractionFunctionLayout alloc] initWithFunction:function parent:parent];
|
||||
}
|
||||
return [[self alloc] initWithFunction:function
|
||||
parent:parent];
|
||||
@@ -67,6 +71,11 @@
|
||||
return [self cachableObjectForIndex:actualIndex generator:generator];
|
||||
}
|
||||
|
||||
- (NSUInteger)numberOfChildren
|
||||
{
|
||||
return self.function.numberOfChildren;
|
||||
}
|
||||
|
||||
- (MPLayout *)childLayoutAtIndex:(NSUInteger)index
|
||||
{
|
||||
return [self cachableObjectForIndex:index generator:^id{
|
||||
|
||||
Reference in New Issue
Block a user