Oolite 1.91.0.7665-250419-c535bfe
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
OOOXPVerifierStage Class Reference

#include <OOOXPVerifierStage.h>

+ Inheritance diagram for OOOXPVerifierStage:
+ Collaboration diagram for OOOXPVerifierStage:

Instance Methods

(OOOXPVerifier *) - verifier
 
(BOOL) - completed
 
(NSString *) - name
 
(NSSet *) - dependencies
 
(NSSet *) - dependents
 
(BOOL) - shouldRun
 
(void) - run
 
(id) - init [implementation]
 
(void) - dealloc [implementation]
 
(id) - description [implementation]
 
(void) - setVerifier: [implementation]
 
(BOOL) - isDependentOf: [implementation]
 
(void) - registerDependency: [implementation]
 
(void) - dependencyRegistrationComplete [implementation]
 
(BOOL) - canRun [implementation]
 
(void) - performRun [implementation]
 
(void) - noteSkipped [implementation]
 
(NSSet *) - resolvedDependencies [implementation]
 
(NSSet *) - resolvedDependents [implementation]
 
(void) - registerDepedent: [implementation]
 
(void) - dependencyCompleted: [implementation]
 

Private Attributes

OOOXPVerifier_verifier
 
NSMutableSet * _dependencies
 
NSMutableSet * _incompleteDependencies
 
NSMutableSet * _dependents
 
BOOL _canRun
 
BOOL _hasRun
 

Detailed Description

Definition at line 34 of file OOOXPVerifierStage.h.

Method Documentation

◆ canRun

- (BOOL) canRun
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 158 of file OOOXPVerifierStage.m.

159{
160 return _canRun;
161}

◆ completed

- (BOOL) completed

Definition at line 82 of file OOOXPVerifierStage.m.

83{
84 return _hasRun;
85}

References _hasRun, and completed.

Referenced by completed.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dealloc

- (void) dealloc
implementation

Reimplemented in OOAIStateMachineVerifierStage, OOFileScannerVerifierStage, OOModelVerifierStage, and OOTextureVerifierStage.

Definition at line 60 of file OOOXPVerifierStage.m.

61{
62 [_dependencies release];
63 [_incompleteDependencies release];
64 [_dependents release];
65
66 [super dealloc];
67}

References dealloc.

Referenced by OOAIStateMachineVerifierStage::dealloc, OOFileScannerVerifierStage::dealloc, OOModelVerifierStage::dealloc, dealloc, and OOTextureVerifierStage::dealloc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependencies

- (NSSet *) dependencies

Reimplemented in OOFileHandlingVerifierStage, and OOListUnusedFilesStage.

Definition at line 95 of file OOOXPVerifierStage.m.

96{
97 return nil;
98}
return nil

References dependencies, and nil.

Referenced by OOOXPVerifier(OOPrivate)::buildDependencyGraph, and dependencies.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependencyCompleted:

- (void) dependencyCompleted: (OOOXPVerifierStage *) dependency
implementation

Provided by category OOOXPVerifierStage(OOPrivate).

Definition at line 225 of file OOOXPVerifierStage.m.

225 :(OOOXPVerifierStage *)dependency
226{
227 [_incompleteDependencies removeObject:dependency];
228 if ([_incompleteDependencies count] == 0) _canRun = YES;
229}
unsigned count
NSMutableSet * _incompleteDependencies

◆ dependencyRegistrationComplete

- (void) dependencyRegistrationComplete
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 195 of file OOOXPVerifierStage.m.

196{
197 _canRun = [_incompleteDependencies count] == 0;
198}

◆ dependents

- (NSSet *) dependents

Reimplemented in OOCheckShipDataPListVerifierStage, OOFileHandlingVerifierStage, and OOTextureHandlingStage.

Definition at line 101 of file OOOXPVerifierStage.m.

102{
103 return nil;
104}

References dependents, and nil.

Referenced by OOOXPVerifier(OOPrivate)::buildDependencyGraph, and dependents.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ description

- (id) description
implementation

Definition at line 70 of file OOOXPVerifierStage.m.

71{
72 return [NSString stringWithFormat:@"<%@ %p>{\"%@\"}", [self class], self, [self name]];
73}

References description, and name.

Referenced by description.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init

- (id) init
implementation

Reimplemented in OOModelVerifierStage, and OOTextureVerifierStage.

Definition at line 44 of file OOOXPVerifierStage.m.

45{
46 self = [super init];
47
48 if (self != nil)
49 {
50 _dependencies = [[NSMutableSet alloc] init];
51 _incompleteDependencies = [[NSMutableSet alloc] init];
52 _dependents = [[NSMutableSet alloc] init];
53 _canRun = NO;
54 }
55
56 return self;
57}
NSMutableSet * _dependencies
NSMutableSet * _dependents

References _canRun, _dependencies, _dependents, _incompleteDependencies, init, and nil.

Referenced by OOModelVerifierStage::init, init, and OOTextureVerifierStage::init.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isDependentOf:

- (BOOL) isDependentOf: (OOOXPVerifierStage *) stage
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 129 of file OOOXPVerifierStage.m.

129 :(OOOXPVerifierStage *)stage
130{
131 NSEnumerator *directDepEnum = nil;
132 OOOXPVerifierStage *directDep = nil;
133
134 if (stage == nil) return NO;
135
136 // Direct dependency check.
137 if ([_dependencies containsObject:stage]) return YES;
138
139 // Recursive dependency check.
140 for (directDepEnum = [_dependencies objectEnumerator]; (directDep = [directDepEnum nextObject]); )
141 {
142 if ([directDep isDependentOf:stage]) return YES;
143 }
144
145 return NO;
146}

◆ name

- (NSString *) name

Reimplemented in OOAIStateMachineVerifierStage, OOCheckDemoShipsPListVerifierStage, OOCheckEquipmentPListVerifierStage, OOCheckJSSyntaxVerifierStage, OOCheckPListSyntaxVerifierStage, OOCheckRequiresPListVerifierStage, OOCheckShipDataPListVerifierStage, OOFileScannerVerifierStage, OOModelVerifierStage, and OOTextureVerifierStage.

Definition at line 88 of file OOOXPVerifierStage.m.

89{
91 return nil;
92}
#define OOLogGenericSubclassResponsibility()
Definition OOLogging.h:129

References name, nil, and OOLogGenericSubclassResponsibility.

Referenced by OOOXPVerifier(OOPrivate)::buildDependencyGraph, description, OOOXPVerifier(OOPrivate)::dumpDebugGraphviz, name, and OOOXPVerifier::registerStage:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ noteSkipped

- (void) noteSkipped
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 185 of file OOOXPVerifierStage.m.

186{
187 assert(_canRun && !_hasRun);
188
189 _hasRun = YES;
190 _canRun = NO;
191 [_dependents makeObjectsPerformSelector:@selector(dependencyCompleted:) withObject:self];
192}

◆ performRun

- (void) performRun
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 164 of file OOOXPVerifierStage.m.

165{
166 assert(_canRun && !_hasRun);
167
169 @try
170 {
171 [self run];
172 }
173 @catch (NSException *exception)
174 {
175 OOLog(@"verifyOXP.exception", @"***** Exception while running verification stage \"%@\": %@", [self name], exception);
176 }
178
179 _hasRun = YES;
180 _canRun = NO;
181 [_dependents makeObjectsPerformSelector:@selector(dependencyCompleted:) withObject:self];
182}
void OOLogPushIndent(void)
Definition OOLogging.m:316
void OOLogPopIndent(void)
Definition OOLogging.m:340
#define OOLog(class, format,...)
Definition OOLogging.h:88

◆ registerDepedent:

- (void) registerDepedent: (OOOXPVerifierStage *) dependent
implementation

Provided by category OOOXPVerifierStage(OOPrivate).

Definition at line 217 of file OOOXPVerifierStage.m.

217 :(OOOXPVerifierStage *)dependent
218{
219 assert(![self isDependentOf:dependent]);
220
221 [_dependents addObject:dependent];
222}

Referenced by OOOXPVerifierStage(OOInternal)::registerDependency:.

+ Here is the caller graph for this function:

◆ registerDependency:

- (void) registerDependency: (OOOXPVerifierStage *) dependency
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 149 of file OOOXPVerifierStage.m.

149 :(OOOXPVerifierStage *)dependency
150{
151 [_dependencies addObject:dependency];
152 [_incompleteDependencies addObject:dependency];
153
154 [dependency registerDepedent:self];
155}
void registerDepedent:(OOOXPVerifierStage *dependent)

◆ resolvedDependencies

- (NSSet *) resolvedDependencies
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 201 of file OOOXPVerifierStage.m.

202{
203 return _dependencies;
204}

Referenced by OOOXPVerifier(OOPrivate)::dumpDebugGraphviz.

+ Here is the caller graph for this function:

◆ resolvedDependents

- (NSSet *) resolvedDependents
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 207 of file OOOXPVerifierStage.m.

208{
209 return _dependents;
210}

Referenced by OOOXPVerifier(OOPrivate)::dumpDebugGraphviz.

+ Here is the caller graph for this function:

◆ run

- (void) run

Reimplemented in OOAIStateMachineVerifierStage, OOCheckDemoShipsPListVerifierStage, OOCheckEquipmentPListVerifierStage, OOCheckJSSyntaxVerifierStage, OOCheckPListSyntaxVerifierStage, OOCheckRequiresPListVerifierStage, OOCheckShipDataPListVerifierStage, OOFileScannerVerifierStage, OOListUnusedFilesStage, OOModelVerifierStage, and OOTextureVerifierStage.

Definition at line 113 of file OOOXPVerifierStage.m.

References OOLogGenericSubclassResponsibility, and run.

Referenced by OOOXPVerifierStage(OOInternal)::performRun, and run.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setVerifier:

- (void) setVerifier: (OOOXPVerifier *) verifier
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 123 of file OOOXPVerifierStage.m.

123 :(OOOXPVerifier *)verifier
124{
125 _verifier = verifier; // Not retained.
126}
OOOXPVerifier * verifier()
OOOXPVerifier * _verifier

Referenced by OOOXPVerifier::registerStage:.

+ Here is the caller graph for this function:

◆ shouldRun

- (BOOL) shouldRun

Reimplemented in OOAIStateMachineVerifierStage, OOCheckDemoShipsPListVerifierStage, OOCheckEquipmentPListVerifierStage, OOCheckJSSyntaxVerifierStage, OOCheckPListSyntaxVerifierStage, OOCheckRequiresPListVerifierStage, OOCheckShipDataPListVerifierStage, OOModelVerifierStage, and OOTextureVerifierStage.

Definition at line 107 of file OOOXPVerifierStage.m.

108{
109 return YES;
110}

References shouldRun.

Referenced by shouldRun.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ verifier

- (OOOXPVerifier *) verifier

Definition at line 76 of file OOOXPVerifierStage.m.

77{
78 return [[_verifier retain] autorelease];
79}

References verifier.

Referenced by OOFileScannerVerifierStage(OOPrivate)::checkConfigFiles, OOFileScannerVerifierStage(OOPrivate)::checkKnownFiles, OOCheckShipDataPListVerifierStage(OOPrivate)::checkModel, OOFileScannerVerifierStage(OOPrivate)::checkRootFolders, OOTextureVerifierStage(OOPrivate)::checkTextureNamed:inFolder:, OOFileScannerVerifierStage(OOPrivate)::constructReadMeNames, OOFileHandlingVerifierStage::dependencies, OOCheckShipDataPListVerifierStage::dependents, OOFileHandlingVerifierStage::dependents, OOTextureHandlingStage::dependents, OOModelVerifierStage::modelNamed:usedForEntry:inFile:withMaterials:andShaders:, OOCheckDemoShipsPListVerifierStage::run, OOCheckEquipmentPListVerifierStage::run, OOCheckJSSyntaxVerifierStage::run, OOCheckPListSyntaxVerifierStage::run, OOCheckRequiresPListVerifierStage::run, OOCheckShipDataPListVerifierStage::run, OOTextureVerifierStage::run, OOFileScannerVerifierStage(OOPrivate)::scanForFiles, OOCheckDemoShipsPListVerifierStage::shouldRun, OOCheckEquipmentPListVerifierStage::shouldRun, OOCheckJSSyntaxVerifierStage::shouldRun, OOCheckRequiresPListVerifierStage::shouldRun, OOCheckShipDataPListVerifierStage::shouldRun, OOTextureVerifierStage::shouldRun, OOAIStateMachineVerifierStage::stateMachineNamed:usedByShip:, OOTextureVerifierStage::textureNamed:usedInContext:, OOAIStateMachineVerifierStage(Private)::validateAI:, and verifier.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _canRun

- (BOOL) _canRun
private

Definition at line 41 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _dependencies

- (NSMutableSet*) _dependencies
private

Definition at line 38 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _dependents

- (NSMutableSet*) _dependents
private

Definition at line 40 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _hasRun

- (BOOL) _hasRun
private

Definition at line 41 of file OOOXPVerifierStage.h.

Referenced by completed.

◆ _incompleteDependencies

- (NSMutableSet*) _incompleteDependencies
private

Definition at line 39 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _verifier

- (OOOXPVerifier*) _verifier
private

Definition at line 37 of file OOOXPVerifierStage.h.


The documentation for this class was generated from the following files: