37@interface OOModelVerifierStage (OOPrivate)
39- (void)checkModel:(NSString *)name
40 context:(NSString *)context
41 materials:(NSDictionary *)materials
42 shaders:(NSDictionary *)shaders;
54 NSNULL = [[NSNull null] retain];
55 _modelsToCheck = [[NSMutableSet alloc] init];
63 [_modelsToCheck release];
69+ (NSString *)nameForReverseDependencyForVerifier:(
OOOXPVerifier *)verifier
91 return [_modelsToCheck count] != 0;
97 NSEnumerator *nameEnum =
nil;
98 NSDictionary *info =
nil;
99 NSAutoreleasePool *pool =
nil;
100 NSString *name =
nil,
102 NSDictionary *materials =
nil,
105 OOLog(
@"verifyOXP.models.unimplemented",
@"%@",
@"TODO: implement model verifier.");
107 for (nameEnum = [_modelsToCheck objectEnumerator]; (info = [nameEnum nextObject]); )
109 pool = [[NSAutoreleasePool alloc] init];
111 name = [info objectForKey:@"name"];
112 context = [info objectForKey:@"context"];
114 materials = [info objectForKey:@"materials"];
115 if (materials ==
NSNULL) materials =
nil;
116 shaders = [info objectForKey:@"shaders"];
119 [
self checkModel:name
126 [_modelsToCheck release];
127 _modelsToCheck =
nil;
131- (BOOL) modelNamed:(NSString *)name
132 usedForEntry:(NSString *)entryName
133 inFile:(NSString *)fileName
134 withMaterials:(NSDictionary *)materials
135 andShaders:(NSDictionary *)shaders
138 NSDictionary *info =
nil;
139 NSString *context =
nil;
141 if (name ==
nil)
return NO;
143 if (entryName !=
nil) context = [NSString stringWithFormat:@"entry \"%@\" of %@", entryName, fileName];
144 else context = fileName;
146 fileScanner = [[
self verifier] fileScannerStage];
147 if (![fileScanner fileExists:name
149 referencedFrom:context
156 if (materials ==
nil) materials =
NSNULL;
159 info = [NSDictionary dictionaryWithObjectsAndKeys:
162 materials, @"materials",
166 [_modelsToCheck addObject:info];
174@implementation OOModelVerifierStage (OOPrivate)
177- (void)checkModel:(NSString *)name
178 context:(NSString *)context
179 materials:(NSDictionary *)materials
180 shaders:(NSDictionary *)shaders
182 OOLog(
@"verifyOXP.verbose.model.unimp",
@"- Pretending to verify model %@ referenced in %@.", name, context);