//
//  OADecimalNumberExpression.m
//  drachma
//
//  Created by Niko Matsakis on 11/25/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#import "OADecimalNumberExpression.h"
#import "OAExpressionEvaluator.h"

@implementation OADecimalNumberExpression

+ (Class) transfomedValueClass
{
    return [NSString class];
}

+ (BOOL) allowsReverseTransformation
{
    return YES;
}

- (NSString*)transformedValue:(NSDecimalNumber*)value
{
    return [value description];
}

- (NSDecimalNumber*)reverseTransformedValue:(NSString*)value
{
    return evaluateExpressionUsingNSDecimalNumber(value);
}

@end
