32#if OO_OXP_VERIFIER_ENABLED
34@interface OOOXPVerifierStage (OOPrivate)
50 _dependencies = [[NSMutableSet alloc] init];
51 _incompleteDependencies = [[NSMutableSet alloc] init];
52 _dependents = [[NSMutableSet alloc] init];
62 [_dependencies release];
63 [_incompleteDependencies release];
64 [_dependents release];
72 return [NSString stringWithFormat:@"<%@ %p>{\"%@\"}", [
self class], self, [
self name]];
78 return [[_verifier retain] autorelease];
95- (NSSet *)dependencies
121@implementation OOOXPVerifierStage (OOInternal)
125 _verifier = verifier;
131 NSEnumerator *directDepEnum =
nil;
134 if (stage ==
nil)
return NO;
137 if ([_dependencies containsObject:stage])
return YES;
140 for (directDepEnum = [_dependencies objectEnumerator]; (directDep = [directDepEnum nextObject]); )
142 if ([directDep isDependentOf:stage])
return YES;
151 [_dependencies addObject:dependency];
152 [_incompleteDependencies addObject:dependency];
166 assert(_canRun && !_hasRun);
173 @catch (NSException *exception)
175 OOLog(
@"verifyOXP.exception",
@"***** Exception while running verification stage \"%@\
": %@", [
self name], exception);
181 [_dependents makeObjectsPerformSelector:@selector(dependencyCompleted:) withObject:self];
187 assert(_canRun && !_hasRun);
191 [_dependents makeObjectsPerformSelector:@selector(dependencyCompleted:) withObject:self];
195- (void)dependencyRegistrationComplete
197 _canRun = [_incompleteDependencies count] == 0;
201- (NSSet *)resolvedDependencies
203 return _dependencies;
207- (NSSet *)resolvedDependents
215@implementation OOOXPVerifierStage (OOPrivate)
219 assert(![
self isDependentOf:dependent]);
221 [_dependents addObject:dependent];
227 [_incompleteDependencies removeObject:dependency];
228 if ([_incompleteDependencies
count] == 0) _canRun = YES;
void OOLogPushIndent(void)
void OOLogPopIndent(void)
#define OOLogGenericSubclassResponsibility()
#define OOLog(class, format,...)
void registerDepedent:(OOOXPVerifierStage *dependent)