Oolite
Loading...
Searching...
No Matches
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 144 of file OOOXPVerifierStage.m.

145{
146 return _canRun;
147}

◆ completed

- (BOOL) completed

Definition at line 76 of file OOOXPVerifierStage.m.

77{
78 return _hasRun;
79}

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 57 of file OOOXPVerifierStage.m.

58{
59 [_dependencies release];
60 [_incompleteDependencies release];
61 [_dependents release];
62
63 [super dealloc];
64}

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 87 of file OOOXPVerifierStage.m.

88{
89 return nil;
90}
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 202 of file OOOXPVerifierStage.m.

202 :(OOOXPVerifierStage*)dependency
203{
204 [_incompleteDependencies removeObject:dependency];
206 _canRun = YES;
207}
unsigned count
NSMutableSet * _incompleteDependencies

◆ dependencyRegistrationComplete

- (void) dependencyRegistrationComplete
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 176 of file OOOXPVerifierStage.m.

177{
178 _canRun = [_incompleteDependencies count] == 0;
179}

◆ dependents

- (NSSet *) dependents

Reimplemented in OOCheckShipDataPListVerifierStage, OOFileHandlingVerifierStage, and OOTextureHandlingStage.

Definition at line 92 of file OOOXPVerifierStage.m.

93{
94 return nil;
95}

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 66 of file OOOXPVerifierStage.m.

67{
68 return [NSString stringWithFormat:@"<%@ %p>{\"%@\"}", [self class], self, [self name]];
69}

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 43 of file OOOXPVerifierStage.m.

44{
45 self = [super init];
46
47 if (self != nil) {
48 _dependencies = [[NSMutableSet alloc] init];
49 _incompleteDependencies = [[NSMutableSet alloc] init];
50 _dependents = [[NSMutableSet alloc] init];
51 _canRun = NO;
52 }
53
54 return self;
55}
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 116 of file OOOXPVerifierStage.m.

116 :(OOOXPVerifierStage*)stage
117{
118 OOOXPVerifierStage* directDep = nil;
119
120 if (stage == nil)
121 return NO;
122
123 // Direct dependency check.
124 if ([_dependencies containsObject:stage])
125 return YES;
126
127 // Recursive dependency check.
128 foreach (directDep, _dependencies) {
129 if ([directDep isDependentOf:stage])
130 return YES;
131 }
132
133 return NO;
134}

◆ name

- (NSString *) name

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

Definition at line 81 of file OOOXPVerifierStage.m.

82{
84 return nil;
85}
#define OOLogGenericSubclassResponsibility()
Definition OOLogging.h:141

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 167 of file OOOXPVerifierStage.m.

168{
169 assert(_canRun && !_hasRun);
170
171 _hasRun = YES;
172 _canRun = NO;
173 [_dependents makeObjectsPerformSelector:@selector(dependencyCompleted:) withObject:self];
174}

◆ performRun

- (void) performRun
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 149 of file OOOXPVerifierStage.m.

150{
151 assert(_canRun && !_hasRun);
152
154 @try {
155 [self run];
156 }
157 @catch (NSException* exception) {
158 OOLog(@"verifyOXP.exception", @"***** Exception while running verification stage \"%@\": %@", [self name], exception);
159 }
161
162 _hasRun = YES;
163 _canRun = NO;
164 [_dependents makeObjectsPerformSelector:@selector(dependencyCompleted:) withObject:self];
165}
void OOLogPushIndent(void)
Definition OOLogging.m:301
void OOLogPopIndent(void)
Definition OOLogging.m:323
#define OOLog(class, format,...)
Definition OOLogging.h:84

◆ registerDepedent:

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

Provided by category OOOXPVerifierStage(OOPrivate).

Definition at line 195 of file OOOXPVerifierStage.m.

195 :(OOOXPVerifierStage*)dependent
196{
197 assert(![self isDependentOf:dependent]);
198
199 [_dependents addObject:dependent];
200}

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 136 of file OOOXPVerifierStage.m.

136 :(OOOXPVerifierStage*)dependency
137{
138 [_dependencies addObject:dependency];
139 [_incompleteDependencies addObject:dependency];
140
141 [dependency registerDepedent:self];
142}
void registerDepedent:(OOOXPVerifierStage *dependent)

◆ resolvedDependencies

- (NSSet *) resolvedDependencies
implementation

Provided by category OOOXPVerifierStage(OOInternal).

Definition at line 181 of file OOOXPVerifierStage.m.

182{
183 return _dependencies;
184}

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 186 of file OOOXPVerifierStage.m.

187{
188 return _dependents;
189}

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 102 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 111 of file OOOXPVerifierStage.m.

111 :(OOOXPVerifier*)verifier
112{
113 _verifier = verifier; // Not retained.
114}
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 97 of file OOOXPVerifierStage.m.

98{
99 return YES;
100}

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 71 of file OOOXPVerifierStage.m.

72{
73 return [[_verifier retain] autorelease];
74}

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 40 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _dependencies

- (NSMutableSet*) _dependencies
private

Definition at line 37 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _dependents

- (NSMutableSet*) _dependents
private

Definition at line 39 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _hasRun

- (BOOL) _hasRun
private

Definition at line 40 of file OOOXPVerifierStage.h.

Referenced by completed.

◆ _incompleteDependencies

- (NSMutableSet*) _incompleteDependencies
private

Definition at line 38 of file OOOXPVerifierStage.h.

Referenced by init.

◆ _verifier

- (OOOXPVerifier*) _verifier
private

Definition at line 36 of file OOOXPVerifierStage.h.


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