Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
NSArray(OOExtractor) Category Reference

#include <OOCollectionExtractors.h>

Instance Methods

(char) - oo_charAtIndex:defaultValue:
 
(short) - oo_shortAtIndex:defaultValue:
 
(int- oo_intAtIndex:defaultValue:
 
(long- oo_longAtIndex:defaultValue:
 
(long long- oo_longLongAtIndex:defaultValue:
 
(NSInteger) - oo_integerAtIndex:defaultValue:
 
(unsigned char) - oo_unsignedCharAtIndex:defaultValue:
 
(unsigned short) - oo_unsignedShortAtIndex:defaultValue:
 
(unsigned int- oo_unsignedIntAtIndex:defaultValue:
 
(unsigned long- oo_unsignedLongAtIndex:defaultValue:
 
(unsigned long long- oo_unsignedLongLongAtIndex:defaultValue:
 
(NSUInteger) - oo_unsignedIntegerAtIndex:defaultValue:
 
(BOOL) - oo_boolAtIndex:defaultValue:
 
(BOOL) - oo_fuzzyBooleanAtIndex:defaultValue:
 
(float) - oo_floatAtIndex:defaultValue:
 
(double) - oo_doubleAtIndex:defaultValue:
 
(float) - oo_nonNegativeFloatAtIndex:defaultValue:
 
(double) - oo_nonNegativeDoubleAtIndex:defaultValue:
 
(id) - oo_objectAtIndex:defaultValue:
 
(id) - oo_objectOfClass:atIndex:defaultValue:
 
(NSString *) - oo_stringAtIndex:defaultValue:
 
(NSArray *) - oo_arrayAtIndex:defaultValue:
 
(NSSet *) - oo_setAtIndex:defaultValue:
 
(NSDictionary *) - oo_dictionaryAtIndex:defaultValue:
 
(NSData *) - oo_dataAtIndex:defaultValue:
 
(Vector) - oo_vectorAtIndex:defaultValue:
 
(Quaternion) - oo_quaternionAtIndex:defaultValue:
 
(char) - oo_charAtIndex:
 
(short) - oo_shortAtIndex:
 
(int- oo_intAtIndex:
 
(long- oo_longAtIndex:
 
(long long- oo_longLongAtIndex:
 
(NSInteger) - oo_integerAtIndex:
 
(unsigned char) - oo_unsignedCharAtIndex:
 
(unsigned short) - oo_unsignedShortAtIndex:
 
(unsigned int- oo_unsignedIntAtIndex:
 
(unsigned long- oo_unsignedLongAtIndex:
 
(unsigned long long- oo_unsignedLongLongAtIndex:
 
(NSUInteger) - oo_unsignedIntegerAtIndex:
 
(BOOL) - oo_boolAtIndex:
 
(BOOL) - oo_fuzzyBooleanAtIndex:
 
(float) - oo_floatAtIndex:
 
(double) - oo_doubleAtIndex:
 
(float) - oo_nonNegativeFloatAtIndex:
 
(double) - oo_nonNegativeDoubleAtIndex:
 
(id) - oo_objectAtIndex:
 
(id) - oo_objectOfClass:atIndex:
 
(NSString *) - oo_stringAtIndex:
 
(NSArray *) - oo_arrayAtIndex:
 
(NSSet *) - oo_setAtIndex:
 
(NSDictionary *) - oo_dictionaryAtIndex:
 
(NSData *) - oo_dataAtIndex:
 
(Vector) - oo_vectorAtIndex:
 
(Quaternion) - oo_quaternionAtIndex:
 

Detailed Description

Definition at line 53 of file OOCollectionExtractors.h.

Method Documentation

◆ oo_arrayAtIndex:

- (NSArray *) oo_arrayAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

350 :(NSUInteger)index
351{
352 return [self oo_arrayAtIndex:index defaultValue:nil];
353}

◆ oo_arrayAtIndex:defaultValue:

- (NSArray *) oo_arrayAtIndex: (NSUInteger) index
defaultValue: (NSArray *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

183 :(NSUInteger)index defaultValue:(NSArray *)value
184{
185 return [self oo_objectOfClass:[NSArray class] atIndex:index defaultValue:value];
186}

◆ oo_boolAtIndex:

- (BOOL) oo_boolAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

293 :(NSUInteger)index
294{
295 return [self oo_boolAtIndex:index defaultValue:NO];
296}

◆ oo_boolAtIndex:defaultValue:

- (BOOL) oo_boolAtIndex: (NSUInteger) index
defaultValue: (BOOL) value 

Definition at line 1558 of file OOCollectionExtractors.m.

115 :(NSUInteger)index defaultValue:(BOOL)value
116{
117 return OOBooleanFromObject([self oo_objectAtIndex:index], value);
118}
BOOL OOBooleanFromObject(id object, BOOL defaultValue)

◆ oo_charAtIndex:

- (char) oo_charAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

221 :(NSUInteger)index
222{
223 return [self oo_charAtIndex:index defaultValue:0];
224}

◆ oo_charAtIndex:defaultValue:

- (char) oo_charAtIndex: (NSUInteger) index
defaultValue: (char) value 

Definition at line 1558 of file OOCollectionExtractors.m.

43 :(NSUInteger)index defaultValue:(char)value
44{
45 return OOCharFromObject([self oo_objectAtIndex:index], value);
46}

◆ oo_dataAtIndex:

- (NSData *) oo_dataAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

368 :(NSUInteger)index
369{
370 return [self oo_dataAtIndex:index defaultValue:nil];
371}

◆ oo_dataAtIndex:defaultValue:

- (NSData *) oo_dataAtIndex: (NSUInteger) index
defaultValue: (NSData *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

201 :(NSUInteger)index defaultValue:(NSData *)value
202{
203 return [self oo_objectOfClass:[NSData class] atIndex:index defaultValue:value];
204}

◆ oo_dictionaryAtIndex:

- (NSDictionary *) oo_dictionaryAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

362 :(NSUInteger)index
363{
364 return [self oo_dictionaryAtIndex:index defaultValue:nil];
365}

◆ oo_dictionaryAtIndex:defaultValue:

- (NSDictionary *) oo_dictionaryAtIndex: (NSUInteger) index
defaultValue: (NSDictionary *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

195 :(NSUInteger)index defaultValue:(NSDictionary *)value
196{
197 return [self oo_objectOfClass:[NSDictionary class] atIndex:index defaultValue:value];
198}

◆ oo_doubleAtIndex:

- (double) oo_doubleAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

313 :(NSUInteger)index
314{
315 return OODoubleFromObject([self oo_objectAtIndex:index], 0.0);
316}
double OODoubleFromObject(id object, double defaultValue)

◆ oo_doubleAtIndex:defaultValue:

- (double) oo_doubleAtIndex: (NSUInteger) index
defaultValue: (double) value 

Definition at line 1558 of file OOCollectionExtractors.m.

135 :(NSUInteger)index defaultValue:(double)value
136{
137 return OODoubleFromObject([self oo_objectAtIndex:index], value);
138}

◆ oo_floatAtIndex:

- (float) oo_floatAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

307 :(NSUInteger)index
308{
309 return OOFloatFromObject([self oo_objectAtIndex:index], 0.0f);
310}
float OOFloatFromObject(id object, float defaultValue)

◆ oo_floatAtIndex:defaultValue:

- (float) oo_floatAtIndex: (NSUInteger) index
defaultValue: (float) value 

Definition at line 1558 of file OOCollectionExtractors.m.

129 :(NSUInteger)index defaultValue:(float)value
130{
131 return OOFloatFromObject([self oo_objectAtIndex:index], value);
132}

◆ oo_fuzzyBooleanAtIndex:

- (BOOL) oo_fuzzyBooleanAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

300 :(NSUInteger)index
301{
302 return [self oo_fuzzyBooleanAtIndex:index defaultValue:0.0f];
303}

◆ oo_fuzzyBooleanAtIndex:defaultValue:

- (BOOL) oo_fuzzyBooleanAtIndex: (NSUInteger) index
defaultValue: (float) value 

Definition at line 1558 of file OOCollectionExtractors.m.

122 :(NSUInteger)index defaultValue:(float)value
123{
124 return OOFuzzyBooleanFromObject([self oo_objectAtIndex:index], value);
125}
BOOL OOFuzzyBooleanFromObject(id object, float defaultValue)

◆ oo_intAtIndex:

- (int) oo_intAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

233 :(NSUInteger)index
234{
235 return [self oo_intAtIndex:index defaultValue:0];
236}

◆ oo_intAtIndex:defaultValue:

- (int) oo_intAtIndex: (NSUInteger) index
defaultValue: (int) value 

Definition at line 1558 of file OOCollectionExtractors.m.

55 :(NSUInteger)index defaultValue:(int)value
56{
57 return OOIntFromObject([self oo_objectAtIndex:index], value);
58}
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

◆ oo_integerAtIndex:

- (NSInteger) oo_integerAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

251 :(NSUInteger)index
252{
253 return [self oo_integerAtIndex:index defaultValue:0];
254}

◆ oo_integerAtIndex:defaultValue:

- (NSInteger) oo_integerAtIndex: (NSUInteger) index
defaultValue: (NSInteger) value 

Definition at line 1558 of file OOCollectionExtractors.m.

73 :(NSUInteger)index defaultValue:(NSInteger)value
74{
75 return OOIntegerFromObject([self oo_objectAtIndex:index], value);
76}
OOINLINE NSInteger OOIntegerFromObject(id object, NSInteger defaultValue)

◆ oo_longAtIndex:

- (long) oo_longAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

239 :(NSUInteger)index
240{
241 return [self oo_longAtIndex:index defaultValue:0];
242}

◆ oo_longAtIndex:defaultValue:

- (long) oo_longAtIndex: (NSUInteger) index
defaultValue: (long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

61 :(NSUInteger)index defaultValue:(long)value
62{
63 return OOLongFromObject([self oo_objectAtIndex:index], value);
64}
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque

◆ oo_longLongAtIndex:

- (long long) oo_longLongAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

245 :(NSUInteger)index
246{
247 return [self oo_longLongAtIndex:index defaultValue:0];
248}

◆ oo_longLongAtIndex:defaultValue:

- (long long) oo_longLongAtIndex: (NSUInteger) index
defaultValue: (long long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

67 :(NSUInteger)index defaultValue:(long long)value
68{
69 return OOLongLongFromObject([self oo_objectAtIndex:index], value);
70}
long long OOLongLongFromObject(id object, long long defaultValue)

◆ oo_nonNegativeDoubleAtIndex:

- (double) oo_nonNegativeDoubleAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

325 :(NSUInteger)index
326{
327 return OONonNegativeDoubleFromObject([self oo_objectAtIndex:index], 0.0);
328}
double OONonNegativeDoubleFromObject(id object, double defaultValue)

◆ oo_nonNegativeDoubleAtIndex:defaultValue:

- (double) oo_nonNegativeDoubleAtIndex: (NSUInteger) index
defaultValue: (double) value 

Definition at line 1558 of file OOCollectionExtractors.m.

147 :(NSUInteger)index defaultValue:(double)value
148{
149 return OONonNegativeDoubleFromObject([self oo_objectAtIndex:index], value);
150}

◆ oo_nonNegativeFloatAtIndex:

- (float) oo_nonNegativeFloatAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

319 :(NSUInteger)index
320{
321 return OONonNegativeFloatFromObject([self oo_objectAtIndex:index], 0.0f);
322}
float OONonNegativeFloatFromObject(id object, float defaultValue)

◆ oo_nonNegativeFloatAtIndex:defaultValue:

- (float) oo_nonNegativeFloatAtIndex: (NSUInteger) index
defaultValue: (float) value 

Definition at line 1558 of file OOCollectionExtractors.m.

141 :(NSUInteger)index defaultValue:(float)value
142{
143 return OONonNegativeFloatFromObject([self oo_objectAtIndex:index], value);
144}

◆ oo_objectAtIndex:

- (id) oo_objectAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

331 :(NSUInteger)index
332{
333 if (index < [self count]) return [self objectAtIndex:index];
334 else return nil;
335}
unsigned count
return nil

◆ oo_objectAtIndex:defaultValue:

- (id) oo_objectAtIndex: (NSUInteger) index
defaultValue: (id) value 

Definition at line 1558 of file OOCollectionExtractors.m.

153 :(NSUInteger)index defaultValue:(id)value
154{
155 id objVal = [self oo_objectAtIndex:index];
156 id result;
157
158 if (objVal != nil) result = objVal;
159 else result = value;
160
161 return result;
162}

◆ oo_objectOfClass:atIndex:

- (id) oo_objectOfClass: (Class) class
atIndex: (NSUInteger) index 

Definition at line 1558 of file OOCollectionExtractors.m.

338 :(Class)class atIndex:(NSUInteger)index
339{
340 return [self oo_objectOfClass:class atIndex:index defaultValue:nil];
341}

◆ oo_objectOfClass:atIndex:defaultValue:

- (id) oo_objectOfClass: (Class) class
atIndex: (NSUInteger) index
defaultValue: (id) value 

Definition at line 1558 of file OOCollectionExtractors.m.

165 :(Class)class atIndex:(NSUInteger)index defaultValue:(id)value
166{
167 id objVal = [self oo_objectAtIndex:index];
168 NSString *result;
169
170 if ([objVal isKindOfClass:class]) result = objVal;
171 else result = value;
172
173 return result;
174}

◆ oo_quaternionAtIndex:

- (Quaternion) oo_quaternionAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

381 :(NSUInteger)index
382{
383 return [self oo_quaternionAtIndex:index defaultValue:kIdentityQuaternion];
384}

◆ oo_quaternionAtIndex:defaultValue:

- (Quaternion) oo_quaternionAtIndex: (NSUInteger) index
defaultValue: (Quaternion) value 

Definition at line 1558 of file OOCollectionExtractors.m.

214 :(NSUInteger)index defaultValue:(Quaternion)value
215{
216 return OOQuaternionFromObject([self oo_objectAtIndex:index], value);
217}
Quaternion OOQuaternionFromObject(id object, Quaternion defaultValue)

◆ oo_setAtIndex:

- (NSSet *) oo_setAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

356 :(NSUInteger)index
357{
358 return [self oo_setAtIndex:index defaultValue:nil];
359}

◆ oo_setAtIndex:defaultValue:

- (NSSet *) oo_setAtIndex: (NSUInteger) index
defaultValue: (NSSet *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

189 :(NSUInteger)index defaultValue:(NSSet *)value
190{
191 return SetForObject([self oo_objectAtIndex:index], value);
192}
static NSSet * SetForObject(id object, NSSet *defaultValue)

◆ oo_shortAtIndex:

- (short) oo_shortAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

227 :(NSUInteger)index
228{
229 return [self oo_shortAtIndex:index defaultValue:0];
230}

◆ oo_shortAtIndex:defaultValue:

- (short) oo_shortAtIndex: (NSUInteger) index
defaultValue: (short) value 

Definition at line 1558 of file OOCollectionExtractors.m.

49 :(NSUInteger)index defaultValue:(short)value
50{
51 return OOShortFromObject([self oo_objectAtIndex:index], value);
52}

◆ oo_stringAtIndex:

- (NSString *) oo_stringAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

344 :(NSUInteger)index
345{
346 return [self oo_stringAtIndex:index defaultValue:nil];
347}

◆ oo_stringAtIndex:defaultValue:

- (NSString *) oo_stringAtIndex: (NSUInteger) index
defaultValue: (NSString *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

177 :(NSUInteger)index defaultValue:(NSString *)value
178{
179 return StringForObject([self oo_objectAtIndex:index], value);
180}
static NSString * StringForObject(id object, NSString *defaultValue)

◆ oo_unsignedCharAtIndex:

- (unsigned char) oo_unsignedCharAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

257 :(NSUInteger)index
258{
259 return [self oo_unsignedCharAtIndex:index defaultValue:0];
260}

◆ oo_unsignedCharAtIndex:defaultValue:

- (unsigned char) oo_unsignedCharAtIndex: (NSUInteger) index
defaultValue: (unsigned char) value 

Definition at line 1558 of file OOCollectionExtractors.m.

79 :(NSUInteger)index defaultValue:(unsigned char)value
80{
81 return OOUnsignedCharFromObject([self oo_objectAtIndex:index], value);
82}

◆ oo_unsignedIntAtIndex:

- (unsigned int) oo_unsignedIntAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

269 :(NSUInteger)index
270{
271 return [self oo_unsignedIntAtIndex:index defaultValue:0];
272}

◆ oo_unsignedIntAtIndex:defaultValue:

- (unsigned int) oo_unsignedIntAtIndex: (NSUInteger) index
defaultValue: (unsigned int) value 

Definition at line 1558 of file OOCollectionExtractors.m.

91 :(NSUInteger)index defaultValue:(unsigned int)value
92{
93 return OOUnsignedIntFromObject([self oo_objectAtIndex:index], value);
94}

◆ oo_unsignedIntegerAtIndex:

- (NSUInteger) oo_unsignedIntegerAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

287 :(NSUInteger)index
288{
289 return [self oo_unsignedIntegerAtIndex:index defaultValue:0];
290}

◆ oo_unsignedIntegerAtIndex:defaultValue:

- (NSUInteger) oo_unsignedIntegerAtIndex: (NSUInteger) index
defaultValue: (NSUInteger) value 

Definition at line 1558 of file OOCollectionExtractors.m.

109 :(NSUInteger)index defaultValue:(NSUInteger)value
110{
111 return OOUIntegerFromObject([self oo_objectAtIndex:index], value);
112}
OOINLINE NSInteger OOUIntegerFromObject(id object, NSUInteger defaultValue)

◆ oo_unsignedLongAtIndex:

- (unsigned long) oo_unsignedLongAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

275 :(NSUInteger)index
276{
277 return [self oo_unsignedLongAtIndex:index defaultValue:0];
278}

◆ oo_unsignedLongAtIndex:defaultValue:

- (unsigned long) oo_unsignedLongAtIndex: (NSUInteger) index
defaultValue: (unsigned long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

97 :(NSUInteger)index defaultValue:(unsigned long)value
98{
99 return OOUnsignedLongFromObject([self oo_objectAtIndex:index], value);
100}

◆ oo_unsignedLongLongAtIndex:

- (unsigned long long) oo_unsignedLongLongAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

281 :(NSUInteger)index
282{
283 return [self oo_unsignedLongLongAtIndex:index defaultValue:0];
284}

◆ oo_unsignedLongLongAtIndex:defaultValue:

- (unsigned long long) oo_unsignedLongLongAtIndex: (NSUInteger) index
defaultValue: (unsigned long long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

103 :(NSUInteger)index defaultValue:(unsigned long long)value
104{
105 return OOUnsignedLongLongFromObject([self oo_objectAtIndex:index], value);
106}
unsigned long long OOUnsignedLongLongFromObject(id object, unsigned long long defaultValue)

◆ oo_unsignedShortAtIndex:

- (unsigned short) oo_unsignedShortAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

263 :(NSUInteger)index
264{
265 return [self oo_unsignedShortAtIndex:index defaultValue:0];
266}

◆ oo_unsignedShortAtIndex:defaultValue:

- (unsigned short) oo_unsignedShortAtIndex: (NSUInteger) index
defaultValue: (unsigned short) value 

Definition at line 1558 of file OOCollectionExtractors.m.

85 :(NSUInteger)index defaultValue:(unsigned short)value
86{
87 return OOUnsignedShortFromObject([self oo_objectAtIndex:index], value);
88}

◆ oo_vectorAtIndex:

- (Vector) oo_vectorAtIndex: (NSUInteger) index

Definition at line 1558 of file OOCollectionExtractors.m.

375 :(NSUInteger)index
376{
377 return [self oo_vectorAtIndex:index defaultValue:kZeroVector];
378}

◆ oo_vectorAtIndex:defaultValue:

- (Vector) oo_vectorAtIndex: (NSUInteger) index
defaultValue: (Vector) value 

Definition at line 1558 of file OOCollectionExtractors.m.

208 :(NSUInteger)index defaultValue:(Vector)value
209{
210 return OOVectorFromObject([self oo_objectAtIndex:index], value);
211}
Vector OOVectorFromObject(id object, Vector defaultValue)

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