+2005-08-04 Helge Hess <helge.hess@opengroupware.org>
+
+ * EOFilterDataSource.m, EOCompoundDataSource.m: code cleanups
+ (v4.5.168)
+
+2005-08-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * added EOKeyValueArchiving support to NGRuleEngine objects (v4.5.167)
+
2005-07-22 Helge Hess <helge.hess@opengroupware.org>
* FdExt.subproj/NSException+misc.m: added -isException and
return [[[self sources] objectAtIndex:0] classDescriptionForObjects];
e = [[self sources] objectEnumerator];
- while ((ds = [e nextObject])) {
+ while ((ds = [e nextObject]) != nil) {
EOClassDescription *cd;
- if ((cd = [ds classDescriptionForObjects]))
+ if ((cd = [ds classDescriptionForObjects]) != nil)
return cd;
}
/* all datasources failed to create .. */
ms = [NSMutableString stringWithCapacity:64];
[ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
- if (self->source) [ms appendFormat:@" source=%@", self->source];
- if (self->auxiliaryQualifier)
+ if (self->source != nil)
+ [ms appendFormat:@" source=%@", self->source];
+ if (self->auxiliaryQualifier != nil)
[ms appendFormat:@" qualifier=%@", self->auxiliaryQualifier];
- if (self->sortOrderings)
+ if (self->sortOrderings != nil)
[ms appendFormat:@" orderings=%@", self->sortOrderings];
- if (self->groupings)
- [ms appendFormat:@" groupings=%@", self->sortOrderings];
+ if (self->groupings != nil)
+ [ms appendFormat:@" groupings=%@", self->groupings];
[ms appendString:@">"];
return ms;
@end /* EOFilterDataSource */
+
@implementation NSDictionary(EOFilterDataSource)
- (NSArray *)flattenedArrayWithHint:(unsigned int)_hint
-# $Id$
+# compilation settings
ADDITIONAL_CPP_FLAGS += -Wall -Wno-import -Wno-protocol -O2
libNGExtensions_INCLUDE_DIRS += -I..
#define __NGRuleEngine_NGRule_H__
#import <Foundation/NSObject.h>
+#include <EOControl/EOKeyValueArchiver.h>
/*
NGRule
@class EOQualifier;
-@interface NGRule : NSObject
+@interface NGRule : NSObject < EOKeyValueArchiving >
{
EOQualifier *qualifier;
id action;
#define __NGRuleEngine_NGRuleAssignment_H__
#import <Foundation/NSObject.h>
+#include <EOControl/EOKeyValueArchiver.h>
/*
NGRuleAssignment
@class NSString;
-@interface NGRuleAssignment : NSObject
+@interface NGRuleAssignment : NSObject < EOKeyValueArchiving >
{
NSString *keyPath;
id value;
/*
- Copyright (C) 2003-2004 SKYRIX Software AG
+ Copyright (C) 2003-2005 SKYRIX Software AG
This file is part of SOPE.
return [self->action fireInContext:_ctx];
}
+/* key/value archiving */
+
+- (id)initWithKeyValueUnarchiver:(EOKeyValueUnarchiver *)_unarchiver {
+ return [self initWithQualifier:[_unarchiver decodeObjectForKey:@"lhs"]
+ action:[_unarchiver decodeObjectForKey:@"rhs"]
+ priority:[_unarchiver decodeIntForKey:@"author"]];
+}
+- (void)encodeWithKeyValueArchiver:(EOKeyValueArchiver *)_archiver {
+ [_archiver encodeInt:[self priority] forKey:@"author"];
+ [_archiver encodeObject:[self qualifier] forKey:@"lhs"];
+ [_archiver encodeObject:[self action] forKey:@"rhs"];
+}
+
/* representations */
- (NSString *)stringValue {
return self->value;
}
+/* key/value archiving */
+
+- (id)initWithKeyValueUnarchiver:(EOKeyValueUnarchiver *)_unarchiver {
+ return [self initWithKeyPath:[_unarchiver decodeObjectForKey:@"keyPath"]
+ value:[_unarchiver decodeObjectForKey:@"value"]];
+}
+- (void)encodeWithKeyValueArchiver:(EOKeyValueArchiver *)_archiver {
+ [_archiver encodeObject:[self keyPath] forKey:@"keyPath"];
+ [_archiver encodeObject:[self value] forKey:@"value"];
+}
+
/* description */
- (NSString *)valueStringValue {
# version
-SUBMINOR_VERSION:=166
+SUBMINOR_VERSION:=168
# v4.3.115 requires libFoundation v1.0.59
# v4.2.72 requires libEOControl v4.2.39