Internal Redesign:
- Combined MPExpression and MPMutableExpression - Abstracted children of MPExpression into MPExpressionElement protocol - Abstracted most of MPExpressionLayout and MPFunctionLayout into common superclass MPLayout
This commit is contained in:
49
MathPad/NSString+MPExpressionElement.m
Normal file
49
MathPad/NSString+MPExpressionElement.m
Normal file
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// NSString+MPExpressionElement.m
|
||||
// MathPad
|
||||
//
|
||||
// Created by Kim Wittenburg on 10.08.14.
|
||||
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSString+MPExpressionElement.h"
|
||||
|
||||
@implementation NSString (MPExpressionElement)
|
||||
|
||||
- (BOOL)isString
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isFunction
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (double)doubleValue
|
||||
{
|
||||
#warning Unimplemented Method
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (float)floatValue
|
||||
{
|
||||
return (float)[self doubleValue];
|
||||
}
|
||||
|
||||
- (int)intValue
|
||||
{
|
||||
return (int)[self doubleValue];
|
||||
}
|
||||
|
||||
- (NSInteger)integerValue
|
||||
{
|
||||
return (NSInteger)[self doubleValue];
|
||||
}
|
||||
|
||||
- (long long)longLongValue
|
||||
{
|
||||
return (long long)[self doubleValue];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user