Skip to content

Commit

Permalink
Merge pull request #410 from gnustep/NSExpression_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa authored Jun 11, 2024
2 parents a541a46 + d3d53ab commit ced4cd0
Show file tree
Hide file tree
Showing 4 changed files with 432 additions and 29 deletions.
50 changes: 43 additions & 7 deletions Headers/Foundation/NSExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
Written by: Dr. H. Nikolaus Schaller
Created: 2005
This file is part of the GNUstep Base Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
*/

#ifndef __NSExpression_h_GNUSTEP_BASE_INCLUDE
#define __NSExpression_h_GNUSTEP_BASE_INCLUDE
Expand All @@ -40,12 +40,26 @@ extern "C" {

enum
{
NSConstantValueExpressionType=0,
NSConstantValueExpressionType = 0,
NSEvaluatedObjectExpressionType,
NSVariableExpressionType,
NSKeyPathExpressionType,
NSFunctionExpressionType,
NSKeyPathCompositionExpressionType
NSKeyPathCompositionExpressionType,
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
NSUnionSetExpressionType,
NSIntersectSetExpressionType,
NSMinusSetExpressionType,
NSSubqueryExpressionType = 13,
NSAggregateExpressionType = 14,
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
NSAnyKeyExpressionType = 15,
#endif
NSBlockExpressionType = 19,
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
NSConditionalExpressionType = 20
#endif
};
typedef NSUInteger NSExpressionType;

Expand All @@ -64,6 +78,24 @@ GS_EXPORT_CLASS
+ (NSExpression *) expressionForKeyPath: (NSString *)path;
+ (NSExpression *) expressionForVariable: (NSString *)string;

#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
+ (NSExpression *) expressionForIntersectSet: (NSExpression *)left
with: (NSExpression *)right;
+ (NSExpression *) expressionForAggregate: (NSArray *)subExpressions;
+ (NSExpression *) expressionForUnionSet: (NSExpression *)left
with: (NSExpression *)right;
+ (NSExpression *) expressionForMinusSet: (NSExpression *)left
with: (NSExpression *)right;
#endif

#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
+ (NSExpression *) expressionWithFormat: (NSString *)format, ...;
+ (NSExpression *) expressionWithFormat: (NSString *)format
arguments: (va_list)args;
+ (NSExpression *) expressionWithFormat: (NSString *)format
argumentArray: (NSArray *)args;
#endif

- (NSArray *) arguments;
- (id) constantValue;
- (NSExpressionType) expressionType;
Expand All @@ -75,6 +107,11 @@ GS_EXPORT_CLASS
- (NSExpression *) operand;
- (NSString *) variable;

#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
- (id) collection;
- (NSExpression *) leftExpression;
- (NSExpression *) rightExpression;
#endif
@end

#if defined(__cplusplus)
Expand All @@ -84,4 +121,3 @@ GS_EXPORT_CLASS
#endif /* 100400 */

#endif /* __NSExpression_h_GNUSTEP_BASE_INCLUDE */

20 changes: 0 additions & 20 deletions MISSING
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ Missing macros:
NS_ENUM_AVAILABLE_IOS
NS_AVAILABLE_IOS

Missing headers:
==
NONE

-------------------------------------------------------------
FoundationErrors:
NSXPCConnectionInterrupted
Expand Down Expand Up @@ -159,26 +155,10 @@ NSException:
NSExpression:
@class NSPredicate

NSUnionSetExpressionType
NSIntersectSetExpressionType
NSMinusSetExpressionType
NSSubqueryExpressionType
NSAggregateExpressionType

+ expressionWithFormat:argumentArray:
+ expressionWithFormat:
+ expressionWithFormat:arguments:
+ expressionForAggregate:
+ expressionForUnionSet:with:
+ expressionForIntersectSet:with
+ expressionForMinusSet:with:
+ expressionForSubquery:usingIteratorVariable:predicate:
+ expressionForFunction:selectorName:arguments:
+ expressionForBlock:arguments:
- collection
- predicate
- leftExpression
- rightExpression
- expressionBlock
-------------------------------------------------------------
NSFileHandle:
Expand Down
Loading

0 comments on commit ced4cd0

Please sign in to comment.