Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
NSDictionary(OOExtractor) Category Reference

#include <OOCollectionExtractors.h>

Instance Methods

(char) - oo_charForKey:defaultValue:
 
(short) - oo_shortForKey:defaultValue:
 
(int- oo_intForKey:defaultValue:
 
(long- oo_longForKey:defaultValue:
 
(long long- oo_longLongForKey:defaultValue:
 
(NSInteger) - oo_integerForKey:defaultValue:
 
(unsigned char) - oo_unsignedCharForKey:defaultValue:
 
(unsigned short) - oo_unsignedShortForKey:defaultValue:
 
(unsigned int- oo_unsignedIntForKey:defaultValue:
 
(unsigned long- oo_unsignedLongForKey:defaultValue:
 
(unsigned long long- oo_unsignedLongLongForKey:defaultValue:
 
(NSUInteger) - oo_unsignedIntegerForKey:defaultValue:
 
(BOOL) - oo_boolForKey:defaultValue:
 
(BOOL) - oo_fuzzyBooleanForKey:defaultValue:
 
(float) - oo_floatForKey:defaultValue:
 
(double) - oo_doubleForKey:defaultValue:
 
(float) - oo_nonNegativeFloatForKey:defaultValue:
 
(double) - oo_nonNegativeDoubleForKey:defaultValue:
 
(id) - oo_objectForKey:defaultValue:
 
(id) - oo_objectOfClass:forKey:defaultValue:
 
(NSString *) - oo_stringForKey:defaultValue:
 
(NSArray *) - oo_arrayForKey:defaultValue:
 
(NSSet *) - oo_setForKey:defaultValue:
 
(NSDictionary *) - oo_dictionaryForKey:defaultValue:
 
(NSMutableDictionary *) - oo_mutableDictionaryForKey:defaultValue:
 
(NSData *) - oo_dataForKey:defaultValue:
 
(Vector) - oo_vectorForKey:defaultValue:
 
(HPVector) - oo_hpvectorForKey:defaultValue:
 
(Quaternion) - oo_quaternionForKey:defaultValue:
 
(char) - oo_charForKey:
 
(short) - oo_shortForKey:
 
(int- oo_intForKey:
 
(long- oo_longForKey:
 
(long long- oo_longLongForKey:
 
(NSInteger) - oo_integerForKey:
 
(unsigned char) - oo_unsignedCharForKey:
 
(unsigned short) - oo_unsignedShortForKey:
 
(unsigned int- oo_unsignedIntForKey:
 
(unsigned long- oo_unsignedLongForKey:
 
(unsigned long long- oo_unsignedLongLongForKey:
 
(NSUInteger) - oo_unsignedIntegerForKey:
 
(BOOL) - oo_boolForKey:
 
(BOOL) - oo_fuzzyBooleanForKey:
 
(float) - oo_floatForKey:
 
(double) - oo_doubleForKey:
 
(float) - oo_nonNegativeFloatForKey:
 
(double) - oo_nonNegativeDoubleForKey:
 
(id) - oo_objectOfClass:forKey:
 
(NSString *) - oo_stringForKey:
 
(NSArray *) - oo_arrayForKey:
 
(NSSet *) - oo_setForKey:
 
(NSDictionary *) - oo_dictionaryForKey:
 
(NSMutableDictionary *) - oo_mutableDictionaryForKey:
 
(NSData *) - oo_dataForKey:
 
(Vector) - oo_vectorForKey:
 
(HPVector) - oo_hpvectorForKey:
 
(Quaternion) - oo_quaternionForKey:
 

Detailed Description

Definition at line 139 of file OOCollectionExtractors.h.

Method Documentation

◆ oo_arrayForKey:

- (NSArray *) oo_arrayForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

704 :(id)key
705{
706 return [self oo_arrayForKey:key defaultValue:nil];
707}

◆ oo_arrayForKey:defaultValue:

- (NSArray *) oo_arrayForKey: (id) key
defaultValue: (NSArray *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

532 :(id)key defaultValue:(NSArray *)value
533{
534 return [self oo_objectOfClass:[NSArray class] forKey:key defaultValue:value];
535}

◆ oo_boolForKey:

- (BOOL) oo_boolForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

654 :(id)key
655{
656 return [self oo_boolForKey:key defaultValue:NO];
657}

◆ oo_boolForKey:defaultValue:

- (BOOL) oo_boolForKey: (id) key
defaultValue: (BOOL) value 

Definition at line 1558 of file OOCollectionExtractors.m.

464 :(id)key defaultValue:(BOOL)value
465{
466 return OOBooleanFromObject([self objectForKey:key], value);
467}
BOOL OOBooleanFromObject(id object, BOOL defaultValue)

◆ oo_charForKey:

- (char) oo_charForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

582 :(id)key
583{
584 return [self oo_charForKey:key defaultValue:0];
585}

◆ oo_charForKey:defaultValue:

- (char) oo_charForKey: (id) key
defaultValue: (char) value 

Definition at line 1558 of file OOCollectionExtractors.m.

392 :(id)key defaultValue:(char)value
393{
394 return OOCharFromObject([self objectForKey:key], value);
395}

◆ oo_dataForKey:

- (NSData *) oo_dataForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

728 :(id)key
729{
730 return [self oo_dataForKey:key defaultValue:nil];
731}

◆ oo_dataForKey:defaultValue:

- (NSData *) oo_dataForKey: (id) key
defaultValue: (NSData *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

557 :(id)key defaultValue:(NSData *)value
558{
559 return [self oo_objectOfClass:[NSData class] forKey:key defaultValue:value];
560}

◆ oo_dictionaryForKey:

- (NSDictionary *) oo_dictionaryForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

716 :(id)key
717{
718 return [self oo_dictionaryForKey:key defaultValue:nil];
719}

◆ oo_dictionaryForKey:defaultValue:

- (NSDictionary *) oo_dictionaryForKey: (id) key
defaultValue: (NSDictionary *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

544 :(id)key defaultValue:(NSDictionary *)value
545{
546 return [self oo_objectOfClass:[NSDictionary class] forKey:key defaultValue:value];
547}

◆ oo_doubleForKey:

- (double) oo_doubleForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

674 :(id)key
675{
676 return OODoubleFromObject([self objectForKey:key], 0.0);
677}
double OODoubleFromObject(id object, double defaultValue)

◆ oo_doubleForKey:defaultValue:

- (double) oo_doubleForKey: (id) key
defaultValue: (double) value 

Definition at line 1558 of file OOCollectionExtractors.m.

484 :(id)key defaultValue:(double)value
485{
486 return OODoubleFromObject([self objectForKey:key], value);
487}

◆ oo_floatForKey:

- (float) oo_floatForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

668 :(id)key
669{
670 return OOFloatFromObject([self objectForKey:key], 0.0f);
671}
float OOFloatFromObject(id object, float defaultValue)

◆ oo_floatForKey:defaultValue:

- (float) oo_floatForKey: (id) key
defaultValue: (float) value 

Definition at line 1558 of file OOCollectionExtractors.m.

478 :(id)key defaultValue:(float)value
479{
480 return OOFloatFromObject([self objectForKey:key], value);
481}

◆ oo_fuzzyBooleanForKey:

- (BOOL) oo_fuzzyBooleanForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

661 :(id)key
662{
663 return [self oo_fuzzyBooleanForKey:key defaultValue:0.0f];
664}

◆ oo_fuzzyBooleanForKey:defaultValue:

- (BOOL) oo_fuzzyBooleanForKey: (id) key
defaultValue: (float) value 

Definition at line 1558 of file OOCollectionExtractors.m.

471 :(id)key defaultValue:(float)value
472{
473 return OOFuzzyBooleanFromObject([self objectForKey:key], value);
474}
BOOL OOFuzzyBooleanFromObject(id object, float defaultValue)

◆ oo_hpvectorForKey:

- (HPVector) oo_hpvectorForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

740 :(id)key
741{
742 return [self oo_hpvectorForKey:key defaultValue:kZeroHPVector];
743}

◆ oo_hpvectorForKey:defaultValue:

- (HPVector) oo_hpvectorForKey: (id) key
defaultValue: (HPVector) value 

Definition at line 1558 of file OOCollectionExtractors.m.

569 :(id)key defaultValue:(HPVector)value
570{
571 return OOHPVectorFromObject([self objectForKey:key], value);
572}
HPVector OOHPVectorFromObject(id object, HPVector defaultValue)

◆ oo_integerForKey:

- (NSInteger) oo_integerForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

612 :(id)key
613{
614 return [self oo_integerForKey:key defaultValue:0];
615}

◆ oo_integerForKey:defaultValue:

- (NSInteger) oo_integerForKey: (id) key
defaultValue: (NSInteger) value 

Definition at line 1558 of file OOCollectionExtractors.m.

422 :(id)key defaultValue:(NSInteger)value
423{
424 return OOIntegerFromObject([self objectForKey:key], value);
425}
OOINLINE NSInteger OOIntegerFromObject(id object, NSInteger defaultValue)

◆ oo_intForKey:

- (int) oo_intForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

594 :(id)key
595{
596 return [self oo_intForKey:key defaultValue:0];
597}

◆ oo_intForKey:defaultValue:

- (int) oo_intForKey: (id) key
defaultValue: (int) value 

Definition at line 1558 of file OOCollectionExtractors.m.

404 :(id)key defaultValue:(int)value
405{
406 return OOIntFromObject([self objectForKey:key], value);
407}
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

◆ oo_longForKey:

- (long) oo_longForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

600 :(id)key
601{
602 return [self oo_longForKey:key defaultValue:0];
603}

◆ oo_longForKey:defaultValue:

- (long) oo_longForKey: (id) key
defaultValue: (long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

410 :(id)key defaultValue:(long)value
411{
412 return OOLongFromObject([self objectForKey:key], value);
413}
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque

◆ oo_longLongForKey:

- (long long) oo_longLongForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

606 :(id)key
607{
608 return [self oo_longLongForKey:key defaultValue:0];
609}

◆ oo_longLongForKey:defaultValue:

- (long long) oo_longLongForKey: (id) key
defaultValue: (long long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

416 :(id)key defaultValue:(long long)value
417{
418 return OOLongLongFromObject([self objectForKey:key], value);
419}
long long OOLongLongFromObject(id object, long long defaultValue)

◆ oo_mutableDictionaryForKey:

- (NSMutableDictionary *) oo_mutableDictionaryForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

722 :(id)key
723{
724 return [self oo_mutableDictionaryForKey:key defaultValue:nil];
725}

◆ oo_mutableDictionaryForKey:defaultValue:

- (NSMutableDictionary *) oo_mutableDictionaryForKey: (id) key
defaultValue: (NSDictionary *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

550 :(id)key defaultValue:(NSDictionary *)value
551{
552 return [self oo_objectOfClass:[NSMutableDictionary class] forKey:key defaultValue:value];
553}

◆ oo_nonNegativeDoubleForKey:

- (double) oo_nonNegativeDoubleForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

686 :(id)key
687{
688 return OONonNegativeDoubleFromObject([self objectForKey:key], 0.0);
689}
double OONonNegativeDoubleFromObject(id object, double defaultValue)

◆ oo_nonNegativeDoubleForKey:defaultValue:

- (double) oo_nonNegativeDoubleForKey: (id) key
defaultValue: (double) value 

Definition at line 1558 of file OOCollectionExtractors.m.

496 :(id)key defaultValue:(double)value
497{
498 return OONonNegativeDoubleFromObject([self objectForKey:key], value);
499}

◆ oo_nonNegativeFloatForKey:

- (float) oo_nonNegativeFloatForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

680 :(id)key
681{
682 return OONonNegativeFloatFromObject([self objectForKey:key], 0.0f);
683}
float OONonNegativeFloatFromObject(id object, float defaultValue)

◆ oo_nonNegativeFloatForKey:defaultValue:

- (float) oo_nonNegativeFloatForKey: (id) key
defaultValue: (float) value 

Definition at line 1558 of file OOCollectionExtractors.m.

490 :(id)key defaultValue:(float)value
491{
492 return OONonNegativeFloatFromObject([self objectForKey:key], value);
493}

◆ oo_objectForKey:defaultValue:

- (id) oo_objectForKey: (id) key
defaultValue: (id) value 

Definition at line 1558 of file OOCollectionExtractors.m.

502 :(id)key defaultValue:(id)value
503{
504 id objVal = [self objectForKey:key];
505 id result;
506
507 if (objVal != nil) result = objVal;
508 else result = value;
509
510 return result;
511}
return nil

◆ oo_objectOfClass:forKey:

- (id) oo_objectOfClass: (Class) class
forKey: (id) key 

Definition at line 1558 of file OOCollectionExtractors.m.

692 :(Class)class forKey:(id)key
693{
694 return [self oo_objectOfClass:class forKey:key defaultValue:nil];
695}

◆ oo_objectOfClass:forKey:defaultValue:

- (id) oo_objectOfClass: (Class) class
forKey: (id) key
defaultValue: (id) value 

Definition at line 1558 of file OOCollectionExtractors.m.

514 :(Class)class forKey:(id)key defaultValue:(id)value
515{
516 id objVal = [self objectForKey:key];
517 id result;
518
519 if ([objVal isKindOfClass:class]) result = objVal;
520 else result = value;
521
522 return result;
523}

◆ oo_quaternionForKey:

- (Quaternion) oo_quaternionForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

746 :(id)key
747{
748 return [self oo_quaternionForKey:key defaultValue:kIdentityQuaternion];
749}

◆ oo_quaternionForKey:defaultValue:

- (Quaternion) oo_quaternionForKey: (id) key
defaultValue: (Quaternion) value 

Definition at line 1558 of file OOCollectionExtractors.m.

575 :(id)key defaultValue:(Quaternion)value
576{
577 return OOQuaternionFromObject([self objectForKey:key], value);
578}
Quaternion OOQuaternionFromObject(id object, Quaternion defaultValue)

◆ oo_setForKey:

- (NSSet *) oo_setForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

710 :(id)key
711{
712 return [self oo_setForKey:key defaultValue:nil];
713}

◆ oo_setForKey:defaultValue:

- (NSSet *) oo_setForKey: (id) key
defaultValue: (NSSet *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

538 :(id)key defaultValue:(NSSet *)value
539{
540 return SetForObject([self objectForKey:key], value);
541}
static NSSet * SetForObject(id object, NSSet *defaultValue)

◆ oo_shortForKey:

- (short) oo_shortForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

588 :(id)key
589{
590 return [self oo_shortForKey:key defaultValue:0];
591}

◆ oo_shortForKey:defaultValue:

- (short) oo_shortForKey: (id) key
defaultValue: (short) value 

Definition at line 1558 of file OOCollectionExtractors.m.

398 :(id)key defaultValue:(short)value
399{
400 return OOShortFromObject([self objectForKey:key], value);
401}

◆ oo_stringForKey:

- (NSString *) oo_stringForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

698 :(id)key
699{
700 return [self oo_stringForKey:key defaultValue:nil];
701}

◆ oo_stringForKey:defaultValue:

- (NSString *) oo_stringForKey: (id) key
defaultValue: (NSString *) value 

Definition at line 1558 of file OOCollectionExtractors.m.

526 :(id)key defaultValue:(NSString *)value
527{
528 return StringForObject([self objectForKey:key], value);
529}
static NSString * StringForObject(id object, NSString *defaultValue)

◆ oo_unsignedCharForKey:

- (unsigned char) oo_unsignedCharForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

618 :(id)key
619{
620 return [self oo_unsignedCharForKey:key defaultValue:0];
621}

◆ oo_unsignedCharForKey:defaultValue:

- (unsigned char) oo_unsignedCharForKey: (id) key
defaultValue: (unsigned char) value 

Definition at line 1558 of file OOCollectionExtractors.m.

428 :(id)key defaultValue:(unsigned char)value
429{
430 return OOUnsignedCharFromObject([self objectForKey:key], value);
431}

◆ oo_unsignedIntegerForKey:

- (NSUInteger) oo_unsignedIntegerForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

642 :(id)key
643{
644 return [self oo_unsignedIntegerForKey:key defaultValue:0];
645}

◆ oo_unsignedIntegerForKey:defaultValue:

- (NSUInteger) oo_unsignedIntegerForKey: (id) key
defaultValue: (NSUInteger) value 

Definition at line 1558 of file OOCollectionExtractors.m.

458 :(id)key defaultValue:(NSUInteger)value
459{
460 return OOUIntegerFromObject([self objectForKey:key], value);
461}
OOINLINE NSInteger OOUIntegerFromObject(id object, NSUInteger defaultValue)

◆ oo_unsignedIntForKey:

- (unsigned int) oo_unsignedIntForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

630 :(id)key
631{
632 return [self oo_unsignedIntForKey:key defaultValue:0];
633}

◆ oo_unsignedIntForKey:defaultValue:

- (unsigned int) oo_unsignedIntForKey: (id) key
defaultValue: (unsigned int) value 

Definition at line 1558 of file OOCollectionExtractors.m.

440 :(id)key defaultValue:(unsigned int)value
441{
442 return OOUnsignedIntFromObject([self objectForKey:key], value);
443}

◆ oo_unsignedLongForKey:

- (unsigned long) oo_unsignedLongForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

636 :(id)key
637{
638 return [self oo_unsignedLongForKey:key defaultValue:0];
639}

◆ oo_unsignedLongForKey:defaultValue:

- (unsigned long) oo_unsignedLongForKey: (id) key
defaultValue: (unsigned long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

446 :(id)key defaultValue:(unsigned long)value
447{
448 return OOUnsignedLongFromObject([self objectForKey:key], value);
449}

◆ oo_unsignedLongLongForKey:

- (unsigned long long) oo_unsignedLongLongForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

648 :(id)key
649{
650 return [self oo_unsignedLongLongForKey:key defaultValue:0];
651}

◆ oo_unsignedLongLongForKey:defaultValue:

- (unsigned long long) oo_unsignedLongLongForKey: (id) key
defaultValue: (unsigned long long) value 

Definition at line 1558 of file OOCollectionExtractors.m.

452 :(id)key defaultValue:(unsigned long long)value
453{
454 return OOUnsignedLongLongFromObject([self objectForKey:key], value);
455}
unsigned long long OOUnsignedLongLongFromObject(id object, unsigned long long defaultValue)

◆ oo_unsignedShortForKey:

- (unsigned short) oo_unsignedShortForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

624 :(id)key
625{
626 return [self oo_unsignedShortForKey:key defaultValue:0];
627}

◆ oo_unsignedShortForKey:defaultValue:

- (unsigned short) oo_unsignedShortForKey: (id) key
defaultValue: (unsigned short) value 

Definition at line 1558 of file OOCollectionExtractors.m.

434 :(id)key defaultValue:(unsigned short)value
435{
436 return OOUnsignedShortFromObject([self objectForKey:key], value);
437}

◆ oo_vectorForKey:

- (Vector) oo_vectorForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

735 :(id)key
736{
737 return [self oo_vectorForKey:key defaultValue:kZeroVector];
738}

◆ oo_vectorForKey:defaultValue:

- (Vector) oo_vectorForKey: (id) key
defaultValue: (Vector) value 

Definition at line 1558 of file OOCollectionExtractors.m.

564 :(id)key defaultValue:(Vector)value
565{
566 return OOVectorFromObject([self objectForKey:key], value);
567}
Vector OOVectorFromObject(id object, Vector defaultValue)

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