Oolite 1.91.0.7604-240417-a536cbe
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{
36@private
38 NSMutableSet *_dependencies;
40 NSMutableSet *_dependents;
42}
43
44- (OOOXPVerifier *)verifier;
45- (BOOL)completed;
46
47// Subclass responsibilities:
48
49/* Name of stage. Used for display and for dependency resolution; must be
50 unique. The name should be a phrase describing what will be done, like
51 "Scanning files" or "Verifying plist scripts".
52*/
53- (NSString *)name;
54
55/* Dependencies and dependents:
56 -dependencies returns a set of names of stages that must be run before this
57 one. If it contains the name of a stage that's not registered, this stage
58 cannot run.
59 -dependents returns a set of names of stages that should not be run before
60 this one. Unlike -dependencies, these are considered non-critical.
61*/
62- (NSSet *)dependencies;
63- (NSSet *)dependents;
64
65/* This is called once by the verifier.
66 When it is called, all the verifier stages listed in -requiredStages will
67 have run. At this point, it is possible to access them using the
68 verifier's -stageWithName: method in order to query them about results.
69 Stages whose dependencies have all run will be released, so the result of
70 calling -stageWithName: with a name not in -requiredStages is undefined.
71
72 shouldRun can be overridden to avoid running at all (without anything
73 being logged). For dependency resolution purposes, returning NO from
74 shouldRun counts as running; that is, it will stop this verifier stage
75 from running but will not stop dependencies from running.
76*/
77- (BOOL)shouldRun;
78- (void)run;
79
80@end
81
82#endif
NSMutableSet * _incompleteDependencies
NSMutableSet * _dependencies
NSMutableSet * _dependents
OOOXPVerifier * _verifier