API 0.9.5
Foundation/CPPredicate/CPExpression_self.j
Go to the documentation of this file.
00001 /*
00002  * CPExpression_self.j
00003  *
00004  * Created by cacaodev.
00005  * Copyright 2010.
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 
00023 var evaluatedObject = nil;
00024 @implementation CPExpression_self : CPExpression
00025 {
00026     id __doxygen__;
00027 }
00028 
00029 + (id)evaluatedObject
00030 {
00031     if (evaluatedObject == nil)
00032         evaluatedObject = [CPExpression_self new];
00033 
00034     return evaluatedObject;
00035 }
00036 
00037 - (id)init
00038 {
00039     self = [super initWithExpressionType:CPEvaluatedObjectExpressionType];
00040 
00041     return self;
00042 }
00043 
00044 - (id)initWithCoder:(CPCoder)coder
00045 {
00046     return [CPExpression_self evaluatedObject];
00047 }
00048 
00049 - (void)encodeWithCoder:(CPCoder)coder
00050 {
00051 }
00052 
00053 - (BOOL)isEqual:(id)object
00054 {
00055     return (object === self);
00056 }
00057 
00058 - (id)expressionValueWithObject:(id)object context:(CPDictionary)context
00059 {
00060     return object;
00061 }
00062 
00063 - (CPString)description
00064 {
00065     return @"SELF";
00066 }
00067 
00068 @end
00069 
 All Classes Files Functions Variables Defines