Files
cappuccino/Foundation/CPPredicate/CPExpression_self.j
T
cacaodev ca289e081e CPPredicate parsing support:
"($)path.($)variable"
 "SUBQUERY(collection, $x,$x = 2)"
 "sum:(arg1, ...)"
 "FUNCTION(target, selector, arg1, ...)
 "object[expression]"
 "set UNION|INTERSECT|MINUS otherset"
Fixed a bug where CPExpression_set was evaluating to an expression instead of a set.
Replaced parsing exceptions with a generic function indicating where it failed.
2010-11-07 17:56:22 +01:00

52 lines
741 B
Plaintext

@import "CPExpression.j"
@import "CPString.j"
@import "CPDictionary.j"
var evaluatedObject = nil;
@implementation CPExpression_self : CPExpression
{
}
+ (id)evaluatedObject
{
if (evaluatedObject == nil)
evaluatedObject = [CPExpression_self new];
return evaluatedObject;
}
- (id)init
{
[super initWithExpressionType:CPEvaluatedObjectExpressionType];
return self;
}
- (id)initWithCoder:(CPCoder)coder
{
return [CPExpression_self evaluatedObject];
}
- (void)encodeWithCoder:(CPCoder)coder
{
}
- (BOOL)isEqual:(id)object
{
return (object === self);
}
- (id)expressionValueWithObject:(id)object context:(CPDictionary)context
{
return object;
}
- (CPString)description
{
return @"SELF";
}
@end