Oolite
Loading...
Searching...
No Matches
OOOXPVerifierStage.h
Go to the documentation of this file.
1/*
2
3OOOXPVerifierStage.h
4
5Pipeline stage for OXP verification pipeline managed by OOOXPVerifier.
6
7
8Copyright (C) 2007-2013 Jens Ayton
9
10Permission is hereby granted, free of charge, to any person obtaining a copy
11of this software and associated documentation files (the "Software"), to deal
12in the Software without restriction, including without limitation the rights
13to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14copies of the Software, and to permit persons to whom the Software is
15furnished to do so, subject to the following conditions:
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26SOFTWARE.
27
28*/
29
30#import "OOOXPVerifier.h"
31
32#if OO_OXP_VERIFIER_ENABLED
33
34@interface OOOXPVerifierStage : NSObject {
35@private
37 NSMutableSet* _dependencies;
39 NSMutableSet* _dependents;
41}
42
43- (OOOXPVerifier*)verifier;
44- (BOOL)completed;
45
46// Subclass responsibilities:
47
48/* Name of stage. Used for display and for dependency resolution; must be
49 unique. The name should be a phrase describing what will be done, like
50 "Scanning files" or "Verifying plist scripts".
51*/
52- (NSString*)name;
53
54/* Dependencies and dependents:
55 -dependencies returns a set of names of stages that must be run before this
56 one. If it contains the name of a stage that's not registered, this stage
57 cannot run.
58 -dependents returns a set of names of stages that should not be run before
59 this one. Unlike -dependencies, these are considered non-critical.
60*/
61- (NSSet*)dependencies;
62- (NSSet*)dependents;
63
64/* This is called once by the verifier.
65 When it is called, all the verifier stages listed in -requiredStages will
66 have run. At this point, it is possible to access them using the
67 verifier's -stageWithName: method in order to query them about results.
68 Stages whose dependencies have all run will be released, so the result of
69 calling -stageWithName: with a name not in -requiredStages is undefined.
70
71 shouldRun can be overridden to avoid running at all (without anything
72 being logged). For dependency resolution purposes, returning NO from
73 shouldRun counts as running; that is, it will stop this verifier stage
74 from running but will not stop dependencies from running.
75*/
76- (BOOL)shouldRun;
77- (void)run;
78
79@end
80
81#endif
NSMutableSet * _incompleteDependencies
NSMutableSet * _dependencies
NSMutableSet * _dependents
OOOXPVerifier * _verifier