Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOCheckPListSyntaxVerifierStage Class Reference

#include <OOCheckPListSyntaxVerifierStage.h>

+ Inheritance diagram for OOCheckPListSyntaxVerifierStage:
+ Collaboration diagram for OOCheckPListSyntaxVerifierStage:

Instance Methods

(NSString *) - name [implementation]
 
(BOOL) - shouldRun [implementation]
 
(void) - run [implementation]
 
- Instance Methods inherited from OOFileHandlingVerifierStage
(NSSet *) - dependencies [implementation]
 
(NSSet *) - dependents [implementation]
 
- Instance Methods inherited from OOOXPVerifierStage
(OOOXPVerifier *) - verifier
 
(BOOL) - completed
 
(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]
 

Detailed Description

Definition at line 32 of file OOCheckPListSyntaxVerifierStage.h.

Method Documentation

◆ name

- (NSString *) name
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 33 of file OOCheckPListSyntaxVerifierStage.m.

39{
40 return kStageName;
41}
static NSString *const kStageName

References kStageName.

◆ run

- (void) run
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 33 of file OOCheckPListSyntaxVerifierStage.m.

51{
52 OOFileScannerVerifierStage *fileScanner = nil;
53
54
55 fileScanner = [[self verifier] fileScannerStage];
56
57 NSArray *plists = [[[self verifier] configurationDictionaryForKey:@"knownFiles"] oo_arrayForKey:@"Config"];
58 NSArray *arrayPlists = [[[self verifier] configurationDictionaryForKey:@"knownFiles"] oo_arrayForKey:@"ConfigArrays"];
59 NSArray *dictionaryPlists = [[[self verifier] configurationDictionaryForKey:@"knownFiles"] oo_arrayForKey:@"ConfigDictionaries"];
60
61 NSString *plistName = nil;
62 foreach (plistName, plists)
63 {
64 if ([fileScanner fileExists:plistName
65 inFolder:@"Config"
66 referencedFrom:nil
67 checkBuiltIn:NO])
68 {
69 OOLog(@"verifyOXP.syntaxCheck",@"Checking %@",plistName);
70 id retrieve = [fileScanner plistNamed:plistName
71 inFolder:@"Config"
73 checkBuiltIn:NO];
74 if (retrieve != nil)
75 {
76 if ([retrieve isKindOfClass:[NSArray class]])
77 {
78 if (![arrayPlists containsObject:plistName])
79 {
80 OOLog(@"verifyOXP.syntaxCheck.error",@"%@ should be an array but isn't.",plistName);
81 }
82 }
83 else if ([retrieve isKindOfClass:[NSDictionary class]])
84 {
85 if (![dictionaryPlists containsObject:plistName])
86 {
87 OOLog(@"verifyOXP.syntaxCheck.error",@"%@ should be an array but isn't.",plistName);
88 }
89 }
90 else
91 {
92 OOLog(@"verifyOXP.syntaxCheck.error",@"%@ is neither an array nor a dictionary.",plistName);
93 }
94 }
95 }
96 }
97
98}
#define OOLog(class, format,...)
Definition OOLogging.h:88
return nil
id plistNamed:inFolder:referencedFrom:checkBuiltIn:(NSString *file,[inFolder] NSString *folder,[referencedFrom] NSString *context,[checkBuiltIn] BOOL checkBuiltIn)

◆ shouldRun

- (BOOL) shouldRun
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 33 of file OOCheckPListSyntaxVerifierStage.m.

45{
46 return YES;
47}

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