Oolite
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 171 of file OOModelVerifierStage.m.

171 :(NSString*)name
172 context:(NSString*)context
173 materials:(NSDictionary*)materials
174 shaders:(NSDictionary*)shaders
175{
176 OOLog(@"verifyOXP.verbose.model.unimp", @"- Pretending to verify model %@ referenced in %@.", name, context);
177 // FIXME: this should check DAT files.
178}
#define OOLog(class, format,...)
Definition OOLogging.h:84

Referenced by run.

Here is the caller graph for this function:

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 57 of file OOModelVerifierStage.m.

58{
59 [_modelsToCheck release];
60
61 [super dealloc];
62}

References dealloc, and OOOXPVerifierStage::dealloc.

Referenced by dealloc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init

- (id) init
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 47 of file OOModelVerifierStage.m.

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

References _modelsToCheck, init, OOOXPVerifierStage::init, nil, and NSNULL.

Referenced by init.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ modelNamed:usedForEntry:inFile:withMaterials:andShaders:

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

Definition at line 122 of file OOModelVerifierStage.m.

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

References OOOXPVerifier::fileScannerStage, name, nil, NSNULL, and OOOXPVerifierStage::verifier.

Here is the call graph for this function:

◆ name

- (NSString *) name
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 76 of file OOModelVerifierStage.m.

77{
78 return kStageName;
79}
static NSString *const kStageName

References kStageName, and name.

Referenced by modelNamed:usedForEntry:inFile:withMaterials:andShaders:, name, and run.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nameForReverseDependencyForVerifier:

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

Definition at line 64 of file OOModelVerifierStage.m.

64 :(OOOXPVerifier*)verifier
65{
66 OOModelVerifierStage* stage = [verifier stageWithName:kStageName];
67 if (stage == nil) {
68 stage = [[OOModelVerifierStage alloc] init];
69 [verifier registerStage:stage];
70 [stage release];
71 }
72
73 return kStageName;
74}
OOOXPVerifier * verifier()
id stageWithName:(NSString *name)
void registerStage:(OOOXPVerifierStage *stage)

References kStageName, nil, OOOXPVerifier::registerStage:, and OOOXPVerifier::stageWithName:.

Referenced by OOCheckShipDataPListVerifierStage::dependents.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run

- (void) run
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 86 of file OOModelVerifierStage.m.

87{
88 NSDictionary* info = nil;
89 NSAutoreleasePool* pool = nil;
90 NSString *name = nil,
91 *context = nil;
92 NSDictionary *materials = nil,
93 *shaders = nil;
94
95 OOLog(@"verifyOXP.models.unimplemented", @"%@", @"TODO: implement model verifier.");
96
97 foreach (info, _modelsToCheck) {
98 pool = [[NSAutoreleasePool alloc] init];
99
100 name = [info objectForKey:@"name"];
101 context = [info objectForKey:@"context"];
102 if (context == NSNULL)
103 context = nil;
104 materials = [info objectForKey:@"materials"];
105 if (materials == NSNULL)
106 materials = nil;
107 shaders = [info objectForKey:@"shaders"];
108 if (shaders == NSNULL)
109 shaders = nil;
110
111 [self checkModel:name
112 context:context
113 materials:materials
114 shaders:shaders];
115
116 [pool release];
117 }
118 [_modelsToCheck release];
120}

References _modelsToCheck, checkModel:context:materials:shaders:, name, nil, NSNULL, OOLog, and run.

Referenced by run.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shouldRun

- (BOOL) shouldRun
implementation

Reimplemented from OOOXPVerifierStage.

Definition at line 81 of file OOModelVerifierStage.m.

82{
83 return [_modelsToCheck count] != 0;
84}

References shouldRun.

Referenced by shouldRun.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _modelsToCheck

- (NSMutableSet*) _modelsToCheck
private

Definition at line 35 of file OOModelVerifierStage.h.

Referenced by init, and run.


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