PageRenderTime 31ms CodeModel.GetById 20ms app.highlight 10ms RepoModel.GetById 0ms app.codeStats 0ms

/packages/cocoaint/src/foundation/NSExpression.inc

https://github.com/slibre/freepascal
Pascal | 101 lines | 51 code | 18 blank | 32 comment | 0 complexity | 3b8001e53993cd40e15401200e5a3984 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
  1{ Parsed from Foundation.framework NSExpression.h }
  2
  3{$ifdef TYPES}
  4{$ifndef NSEXPRESSION_PAS_T}
  5{$define NSEXPRESSION_PAS_T}
  6
  7{ Constants }
  8
  9const
 10  NSConstantValueExpressionType = 0;
 11  NSEvaluatedObjectExpressionType = 1;
 12  NSVariableExpressionType = 2;
 13  NSKeyPathExpressionType = 3;
 14  NSFunctionExpressionType = 4;
 15  NSUnionSetExpressionType = 5;
 16  NSIntersectSetExpressionType = 6;
 17  NSMinusSetExpressionType = 7;
 18  NSSubqueryExpressionType = 13;
 19  NSAggregateExpressionType = 14;
 20  NSBlockExpressionType = 19;
 21
 22{ Types }
 23type
 24  NSExpressionType = NSUInteger;
 25  NSExpressionTypePtr = ^NSExpressionType;
 26
 27{$endif}
 28{$endif}
 29
 30{$ifdef RECORDS}
 31{$ifndef NSEXPRESSION_PAS_R}
 32{$define NSEXPRESSION_PAS_R}
 33
 34{$endif}
 35{$endif}
 36
 37{$ifdef FUNCTIONS}
 38{$ifndef NSEXPRESSION_PAS_F}
 39{$define NSEXPRESSION_PAS_F}
 40
 41{$endif}
 42{$endif}
 43
 44{$ifdef EXTERNAL_SYMBOLS}
 45{$ifndef NSEXPRESSION_PAS_S}
 46{$define NSEXPRESSION_PAS_S}
 47
 48{$endif}
 49{$endif}
 50
 51{$ifdef FORWARD}
 52  NSExpression = objcclass;
 53  NSExpressionPointer = ^NSExpression;
 54  NSExpressionPtr = NSExpressionPointer;
 55
 56{$endif}
 57
 58{$ifdef CLASSES}
 59{$ifndef NSEXPRESSION_PAS_C}
 60{$define NSEXPRESSION_PAS_C}
 61
 62{ NSExpression }
 63  NSExpression = objcclass external (NSObject, NSCodingProtocol, NSCopyingProtocol)
 64  private
 65    _reserved: Pointer;
 66    _expressionType: NSExpressionType;
 67    
 68  public
 69    class function expressionForConstantValue(obj: id): NSExpression; message 'expressionForConstantValue:';
 70    class function expressionForEvaluatedObject: NSExpression; message 'expressionForEvaluatedObject';
 71    class function expressionForVariable(string_: NSString): NSExpression; message 'expressionForVariable:';
 72    class function expressionForKeyPath(keyPath_: NSString): NSExpression; message 'expressionForKeyPath:';
 73    class function expressionForFunction_arguments(name: NSString; parameters: NSArray): NSExpression; message 'expressionForFunction:arguments:';
 74    class function expressionForAggregate(subexpressions: NSArray): NSExpression; message 'expressionForAggregate:';
 75    class function expressionForUnionSet_with(left: NSExpression; right: NSExpression): NSExpression; message 'expressionForUnionSet:with:';
 76    class function expressionForIntersectSet_with(left: NSExpression; right: NSExpression): NSExpression; message 'expressionForIntersectSet:with:';
 77    class function expressionForMinusSet_with(left: NSExpression; right: NSExpression): NSExpression; message 'expressionForMinusSet:with:';
 78    class function expressionForSubquery_usingIteratorVariable_predicate(expression: NSExpression; variable_: NSString; predicate_: id): NSExpression; message 'expressionForSubquery:usingIteratorVariable:predicate:';
 79    class function expressionForFunction_selectorName_arguments(target: NSExpression; name: NSString; parameters: NSArray): NSExpression; message 'expressionForFunction:selectorName:arguments:';
 80    function initWithExpressionType(type_: NSExpressionType): id; message 'initWithExpressionType:';
 81    function expressionType: NSExpressionType; message 'expressionType';
 82    function constantValue: id; message 'constantValue';
 83    function keyPath: NSString; message 'keyPath';
 84    function function_: NSString; message 'function';
 85    function variable: NSString; message 'variable';
 86    function operand: NSExpression; message 'operand';
 87    function arguments: NSArray; message 'arguments';
 88    function collection: id; message 'collection';
 89    function predicate: NSPredicate; message 'predicate';
 90    function leftExpression: NSExpression; message 'leftExpression';
 91    function rightExpression: NSExpression; message 'rightExpression';
 92    function expressionValueWithObject_context(object_: id; context: NSMutableDictionary): id; message 'expressionValueWithObject:context:';
 93
 94    { Adopted Protocols }
 95    procedure encodeWithCoder(aCoder: NSCoder);
 96    function initWithCoder(aDecoder: NSCoder): id;
 97    function copyWithZone(zone_: NSZonePtr): id;
 98  end;
 99
100{$endif}
101{$endif}