Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOModelVerifierStage Class Reference

#include <OOModelVerifierStage.h>

+ Inheritance diagram for OOModelVerifierStage:
+ Collaboration diagram for OOModelVerifierStage:

Instance Methods

(BOOL) - modelNamed:usedForEntry:inFile:withMaterials:andShaders:
 
(id) - init [implementation]
 
(void) - dealloc [implementation]
 
(NSString *) - name [implementation]
 
(BOOL) - shouldRun [implementation]
 
(void) - run [implementation]
 
(void) - checkModel:context:materials:shaders: [implementation]
 
- Instance Methods inherited from OOTextureHandlingStage
(NSSet *) - dependents [implementation]
 
- Instance Methods inherited from OOFileHandlingVerifierStage
(NSSet *) - dependencies [implementation]
 
- Instance Methods inherited from OOOXPVerifierStage
(OOOXPVerifier *) - verifier
 
(BOOL) - completed
 
(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]
 

Class Methods

(NSString *) + nameForReverseDependencyForVerifier:
 

Private Attributes

NSMutableSet * _modelsToCheck
 

Detailed Description

Definition at line 33 of file OOModelVerifierStage.h.

Method Documentation

◆ checkModel:context:materials:shaders:

- (void) checkModel: (NSString *) name
context: (NSString *) context
materials: (NSDictionary *) materials
shaders: (NSDictionary *) shaders 
implementation

Provided by category OOModelVerifierStage(OOPrivate).

Definition at line 34 of file OOModelVerifierStage.m.

177 :(NSString *)name
178 context:(NSString *)context
179 materials:(NSDictionary *)materials
180 shaders:(NSDictionary *)shaders
181{
182 OOLog(@"verifyOXP.verbose.model.unimp", @"- Pretending to verify model %@ referenced in %@.", name, context);
183 // FIXME: this should check DAT files.
184}
#define OOLog(class, format,...)
Definition OOLogging.h:88

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 34 of file OOModelVerifierStage.m.

62{
63 [_modelsToCheck release];
64
65 [super dealloc];
66}

◆ init

- (id) init
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 34 of file OOModelVerifierStage.m.

50{
51 self = [super init];
52 if (self != nil)
53 {
54 NSNULL = [[NSNull null] retain];
55 _modelsToCheck = [[NSMutableSet alloc] init];
56 }
57 return self;
58}
static id NSNULL
return nil

◆ modelNamed:usedForEntry:inFile:withMaterials:andShaders:

- (BOOL) modelNamed: (NSString *) name
usedForEntry: (NSString *) entryName
inFile: (NSString *) fileName
withMaterials: (NSDictionary *) materials
andShaders: (NSDictionary *) shaders 

Definition at line 34 of file OOModelVerifierStage.m.

131 :(NSString *)name
132 usedForEntry:(NSString *)entryName
133 inFile:(NSString *)fileName
134 withMaterials:(NSDictionary *)materials
135 andShaders:(NSDictionary *)shaders
136{
137 OOFileScannerVerifierStage *fileScanner = nil;
138 NSDictionary *info = nil;
139 NSString *context = nil;
140
141 if (name == nil) return NO;
142
143 if (entryName != nil) context = [NSString stringWithFormat:@"entry \"%@\" of %@", entryName, fileName];
144 else context = fileName;
145
146 fileScanner = [[self verifier] fileScannerStage];
147 if (![fileScanner fileExists:name
148 inFolder:@"Models"
149 referencedFrom:context
150 checkBuiltIn:YES])
151 {
152 return NO;
153 }
154
155 if (context == nil) context = NSNULL;
156 if (materials == nil) materials = NSNULL;
157 if (shaders == nil) shaders = NSNULL;
158
159 info = [NSDictionary dictionaryWithObjectsAndKeys:
160 name, @"name",
161 context, @"context",
162 materials, @"materials",
163 shaders, @"shaders",
164 nil];
165
166 [_modelsToCheck addObject:info];
167
168 return YES;
169}

◆ name

- (NSString *) name
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 34 of file OOModelVerifierStage.m.

84{
85 return kStageName;
86}
static NSString *const kStageName

◆ nameForReverseDependencyForVerifier:

+ (NSString *) nameForReverseDependencyForVerifier: (OOOXPVerifier *) verifier

Definition at line 34 of file OOModelVerifierStage.m.

70{
71 OOModelVerifierStage *stage = [verifier stageWithName:kStageName];
72 if (stage == nil)
73 {
74 stage = [[OOModelVerifierStage alloc] init];
75 [verifier registerStage:stage];
76 [stage release];
77 }
78
79 return kStageName;
80}
OOOXPVerifier * verifier()
id stageWithName:(NSString *name)
void registerStage:(OOOXPVerifierStage *stage)

◆ run

- (void) run
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 34 of file OOModelVerifierStage.m.

96{
97 NSEnumerator *nameEnum = nil;
98 NSDictionary *info = nil;
99 NSAutoreleasePool *pool = nil;
100 NSString *name = nil,
101 *context = nil;
102 NSDictionary *materials = nil,
103 *shaders = nil;
104
105 OOLog(@"verifyOXP.models.unimplemented", @"%@", @"TODO: implement model verifier.");
106
107 for (nameEnum = [_modelsToCheck objectEnumerator]; (info = [nameEnum nextObject]); )
108 {
109 pool = [[NSAutoreleasePool alloc] init];
110
111 name = [info objectForKey:@"name"];
112 context = [info objectForKey:@"context"];
113 if (context == NSNULL) context = nil;
114 materials = [info objectForKey:@"materials"];
115 if (materials == NSNULL) materials = nil;
116 shaders = [info objectForKey:@"shaders"];
117 if (shaders == NSNULL) shaders = nil;
118
119 [self checkModel:name
120 context:context
121 materials:materials
122 shaders:shaders];
123
124 [pool release];
125 }
126 [_modelsToCheck release];
128}

◆ shouldRun

- (BOOL) shouldRun
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 34 of file OOModelVerifierStage.m.

90{
91 return [_modelsToCheck count] != 0;
92}

Member Data Documentation

◆ _modelsToCheck

- (NSMutableSet*) _modelsToCheck
private

Definition at line 36 of file OOModelVerifierStage.h.


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