Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
NSUserDefaults(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:
 
(NSData *) - oo_dataForKey:defaultValue:
 
(char) - oo_charForKey:
 
(short) - oo_shortForKey:
 
(int- oo_intForKey:
 
(long- oo_longForKey:
 
(long long- oo_longLongForKey:
 
(unsigned char) - oo_unsignedCharForKey:
 
(unsigned short) - oo_unsignedShortForKey:
 
(unsigned int- oo_unsignedIntForKey:
 
(unsigned long- oo_unsignedLongForKey:
 
(unsigned long long- oo_unsignedLongLongForKey:
 
(BOOL) - oo_fuzzyBooleanForKey:
 
(double) - oo_doubleForKey:
 
(float) - oo_nonNegativeFloatForKey:
 
(double) - oo_nonNegativeDoubleForKey:
 
(id) - oo_objectOfClass:forKey:
 
(NSSet *) - oo_setForKey:
 

Detailed Description

Definition at line 230 of file OOCollectionExtractors.h.

Method Documentation

◆ oo_arrayForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

897 :(id)key defaultValue:(NSArray *)value
898{
899 return [self oo_objectOfClass:[NSArray class] forKey:key defaultValue:value];
900}

◆ oo_boolForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

829 :(id)key defaultValue:(BOOL)value
830{
831 return OOBooleanFromObject([self objectForKey:key], value);
832}
BOOL OOBooleanFromObject(id object, BOOL defaultValue)

◆ oo_charForKey:

- (char) oo_charForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

921 :(id)key
922{
923 return [self oo_charForKey:key defaultValue:0];
924}

◆ oo_charForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

757 :(id)key defaultValue:(char)value
758{
759 return OOCharFromObject([self objectForKey:key], value);
760}

◆ oo_dataForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

915 :(id)key defaultValue:(NSData *)value
916{
917 return [self oo_objectOfClass:[NSData class] forKey:key defaultValue:value];
918}

◆ oo_dictionaryForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

909 :(id)key defaultValue:(NSDictionary *)value
910{
911 return [self oo_objectOfClass:[NSDictionary class] forKey:key defaultValue:value];
912}

◆ oo_doubleForKey:

- (double) oo_doubleForKey: (NSString *) key

Definition at line 1558 of file OOCollectionExtractors.m.

989 :(NSString *)key
990{
991 return OODoubleFromObject([self objectForKey:key], 0.0);
992}
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.

849 :(id)key defaultValue:(double)value
850{
851 return OODoubleFromObject([self objectForKey:key], value);
852}

◆ oo_floatForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

843 :(id)key defaultValue:(float)value
844{
845 return OOFloatFromObject([self objectForKey:key], value);
846}
float OOFloatFromObject(id object, float defaultValue)

◆ oo_fuzzyBooleanForKey:

- (BOOL) oo_fuzzyBooleanForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

982 :(id)key
983{
984 return [self oo_fuzzyBooleanForKey:key defaultValue:0.0f];
985}

◆ oo_fuzzyBooleanForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

836 :(id)key defaultValue:(float)value
837{
838 return OOFuzzyBooleanFromObject([self objectForKey:key], value);
839}
BOOL OOFuzzyBooleanFromObject(id object, float defaultValue)

◆ oo_integerForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

787 :(id)key defaultValue:(NSInteger)value
788{
789 return OOIntegerFromObject([self objectForKey:key], value);
790}
OOINLINE NSInteger OOIntegerFromObject(id object, NSInteger defaultValue)

◆ oo_intForKey:

- (int) oo_intForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

933 :(id)key
934{
935 return [self oo_intForKey:key defaultValue:0];
936}

◆ oo_intForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

769 :(id)key defaultValue:(int)value
770{
771 return OOIntFromObject([self objectForKey:key], value);
772}
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

◆ oo_longForKey:

- (long) oo_longForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

939 :(id)key
940{
941 return [self oo_longForKey:key defaultValue:0];
942}

◆ oo_longForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

775 :(id)key defaultValue:(long)value
776{
777 return OOLongFromObject([self objectForKey:key], value);
778}
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.

945 :(id)key
946{
947 return [self oo_longLongForKey:key defaultValue:0];
948}

◆ oo_longLongForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

781 :(id)key defaultValue:(long long)value
782{
783 return OOLongLongFromObject([self objectForKey:key], value);
784}
long long OOLongLongFromObject(id object, long long defaultValue)

◆ oo_nonNegativeDoubleForKey:

- (double) oo_nonNegativeDoubleForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

1001 :(id)key
1002{
1003 return OONonNegativeDoubleFromObject([self objectForKey:key], 0.0);
1004}
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.

861 :(id)key defaultValue:(double)value
862{
863 return OONonNegativeDoubleFromObject([self objectForKey:key], value);
864}

◆ oo_nonNegativeFloatForKey:

- (float) oo_nonNegativeFloatForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

995 :(id)key
996{
997 return OONonNegativeFloatFromObject([self objectForKey:key], 0.0f);
998}
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.

855 :(id)key defaultValue:(float)value
856{
857 return OONonNegativeFloatFromObject([self objectForKey:key], value);
858}

◆ oo_objectForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

867 :(id)key defaultValue:(id)value
868{
869 id objVal = [self objectForKey:key];
870 id result;
871
872 if (objVal != nil) result = objVal;
873 else result = value;
874
875 return result;
876}
return nil

◆ oo_objectOfClass:forKey:

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

Definition at line 1558 of file OOCollectionExtractors.m.

1007 :(Class)class forKey:(id)key
1008{
1009 return [self oo_objectOfClass:class forKey:key defaultValue:nil];
1010}

◆ oo_objectOfClass:forKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

879 :(Class)class forKey:(id)key defaultValue:(id)value
880{
881 id objVal = [self objectForKey:key];
882 id result;
883
884 if ([objVal isKindOfClass:class]) result = objVal;
885 else result = value;
886
887 return result;
888}

◆ oo_setForKey:

- (NSSet *) oo_setForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

1013 :(id)key
1014{
1015 return [self oo_setForKey:key defaultValue:nil];
1016}

◆ oo_setForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

903 :(id)key defaultValue:(NSSet *)value
904{
905 return SetForObject([self objectForKey:key], value);
906}
static NSSet * SetForObject(id object, NSSet *defaultValue)

◆ oo_shortForKey:

- (short) oo_shortForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

927 :(id)key
928{
929 return [self oo_shortForKey:key defaultValue:0];
930}

◆ oo_shortForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

763 :(id)key defaultValue:(short)value
764{
765 return OOShortFromObject([self objectForKey:key], value);
766}

◆ oo_stringForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

891 :(id)key defaultValue:(NSString *)value
892{
893 return StringForObject([self objectForKey:key], value);
894}
static NSString * StringForObject(id object, NSString *defaultValue)

◆ oo_unsignedCharForKey:

- (unsigned char) oo_unsignedCharForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

951 :(id)key
952{
953 return [self oo_unsignedCharForKey:key defaultValue:0];
954}

◆ oo_unsignedCharForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

793 :(id)key defaultValue:(unsigned char)value
794{
795 return OOUnsignedCharFromObject([self objectForKey:key], value);
796}

◆ oo_unsignedIntegerForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

823 :(id)key defaultValue:(NSUInteger)value
824{
825 return OOUIntegerFromObject([self objectForKey:key], value);
826}
OOINLINE NSInteger OOUIntegerFromObject(id object, NSUInteger defaultValue)

◆ oo_unsignedIntForKey:

- (unsigned int) oo_unsignedIntForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

963 :(id)key
964{
965 return [self oo_unsignedIntForKey:key defaultValue:0];
966}

◆ oo_unsignedIntForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

805 :(id)key defaultValue:(unsigned int)value
806{
807 return OOUnsignedIntFromObject([self objectForKey:key], value);
808}

◆ oo_unsignedLongForKey:

- (unsigned long) oo_unsignedLongForKey: (id) key

Definition at line 1558 of file OOCollectionExtractors.m.

969 :(id)key
970{
971 return [self oo_unsignedLongForKey:key defaultValue:0];
972}

◆ oo_unsignedLongForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

811 :(id)key defaultValue:(unsigned long)value
812{
813 return OOUnsignedLongFromObject([self objectForKey:key], value);
814}

◆ oo_unsignedLongLongForKey:

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

Definition at line 1558 of file OOCollectionExtractors.m.

975 :(id)key
976{
977 return [self oo_unsignedLongLongForKey:key defaultValue:0];
978}

◆ oo_unsignedLongLongForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

817 :(id)key defaultValue:(unsigned long long)value
818{
819 return OOUnsignedLongLongFromObject([self objectForKey:key], value);
820}
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.

957 :(id)key
958{
959 return [self oo_unsignedShortForKey:key defaultValue:0];
960}

◆ oo_unsignedShortForKey:defaultValue:

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

Definition at line 1558 of file OOCollectionExtractors.m.

799 :(id)key defaultValue:(unsigned short)value
800{
801 return OOUnsignedShortFromObject([self objectForKey:key], value);
802}

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