Implemented Evaluation
This commit is contained in:
@@ -34,4 +34,8 @@
|
|||||||
- (NSIndexPath *)indexPathByIncrementingLastIndex;
|
- (NSIndexPath *)indexPathByIncrementingLastIndex;
|
||||||
- (NSIndexPath *)indexPathByDecrementingLastIndex;
|
- (NSIndexPath *)indexPathByDecrementingLastIndex;
|
||||||
|
|
||||||
|
- (NSIndexPath *)indexPathWithLength:(NSUInteger)length; // use length indexes from the receiver, exception if too much
|
||||||
|
|
||||||
|
- (NSIndexPath *)commonIndexPathWith:(NSIndexPath *)indexPath;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "NSString+MPExpressionElement.h"
|
#import "NSString+MPExpressionElement.h"
|
||||||
|
#import "MPElementParser.h"
|
||||||
|
|
||||||
@implementation NSString (MPExpressionElement)
|
@implementation NSString (MPExpressionElement)
|
||||||
|
|
||||||
@@ -20,30 +21,9 @@
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (double)doubleValue
|
- (NSDecimalNumber *)evaluate:(MPParseError *__autoreleasing *)error
|
||||||
{
|
{
|
||||||
#warning Unimplemented Method
|
return [[[MPElementParser alloc] init] parseElement:self error:error].standaloneValue;
|
||||||
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
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user