![]() |
Oolite 1.91.0.7658-250404-b1488af
|
import "OOCocoa.h"
import "OOStringParsing.h"
import "OOCollectionExtractors.h"
#include <limits.h>
import "OOMaths.h"
Go to the source code of this file.
Macros | |
#define | PEEK() |
Functions | |
static NSSet * | SetForObject (id object, NSSet *defaultValue) |
static NSString * | StringForObject (id object, NSString *defaultValue) |
long long | OOLongLongFromObject (id object, long long defaultValue) |
unsigned long long | OOUnsignedLongLongFromObject (id object, unsigned long long defaultValue) |
static BOOL | IsSpaceOrTab (int value) |
static BOOL | IsZeroString (NSString *string) |
static BOOL | BooleanFromString (NSString *string, BOOL defaultValue) |
static float | FuzzyBooleanProbabilityFromString (NSString *string, float defaultValue) |
BOOL | OOBooleanFromObject (id object, BOOL defaultValue) |
BOOL | OOFuzzyBooleanFromObject (id object, float defaultValue) |
float | OOFloatFromObject (id object, float defaultValue) |
double | OODoubleFromObject (id object, double defaultValue) |
float | OONonNegativeFloatFromObject (id object, float defaultValue) |
double | OONonNegativeDoubleFromObject (id object, double defaultValue) |
Vector | OOVectorFromObject (id object, Vector defaultValue) |
HPVector | OOHPVectorFromObject (id object, HPVector defaultValue) |
Quaternion | OOQuaternionFromObject (id object, Quaternion defaultValue) |
NSDictionary * | OOPropertyListFromVector (Vector value) |
NSDictionary * | OOPropertyListFromHPVector (HPVector value) |
NSDictionary * | OOPropertyListFromQuaternion (Quaternion value) |
#define PEEK | ( | ) |
Referenced by IsZeroString().
|
static |
Definition at line 1255 of file OOCollectionExtractors.m.
References IsZeroString().
Referenced by OOBooleanFromObject().
|
static |
Definition at line 1276 of file OOCollectionExtractors.m.
References IsZeroString().
Referenced by OOFuzzyBooleanFromObject().
|
inlinestatic |
Definition at line 1228 of file OOCollectionExtractors.m.
Referenced by IsZeroString().
|
static |
Definition at line 1234 of file OOCollectionExtractors.m.
References count, IsSpaceOrTab(), and PEEK.
Referenced by BooleanFromString(), FuzzyBooleanProbabilityFromString(), OODoubleFromObject(), OOFloatFromObject(), and OOFuzzyBooleanFromObject().
BOOL OOBooleanFromObject | ( | id | object, |
BOOL | defaultValue ) |
Definition at line 1297 of file OOCollectionExtractors.m.
References BooleanFromString().
Referenced by OOMacDebugger::configurationBoolValueForKey:, OODebugMonitor(Private)::jsEngine:context:error:stackSkip:showingLocation:withMessage:, OODebugMonitor(Private)::jsEngine:context:logMessage:ofClass:, OODebugMonitor(Private)::normalizeConfigValue:forKey:, NSArray(OOExtractor)::oo_boolAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_boolForKey:defaultValue:, NSUserDefaults(OOExtractor)::oo_boolForKey:defaultValue:, OOOXPVerifier(OOPrivate)::setUpLogOverrides, Verify_Boolean(), and Verify_FuzzyBoolean().
double OODoubleFromObject | ( | id | object, |
double | defaultValue ) |
Definition at line 1363 of file OOCollectionExtractors.m.
References IsZeroString().
Referenced by Universe::addEntity:, NSArray(OOExtractor)::oo_doubleAtIndex:, NSArray(OOExtractor)::oo_doubleAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_doubleForKey:, NSUserDefaults(OOExtractor)::oo_doubleForKey:, NSDictionary(OOExtractor)::oo_doubleForKey:defaultValue:, NSUserDefaults(OOExtractor)::oo_doubleForKey:defaultValue:, Verify_Float(), Verify_FuzzyBoolean(), and Verify_PositiveFloat().
float OOFloatFromObject | ( | id | object, |
float | defaultValue ) |
Definition at line 1346 of file OOCollectionExtractors.m.
References IsZeroString().
Referenced by NSArray(OOExtractor)::oo_floatAtIndex:, NSArray(OOExtractor)::oo_floatAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_floatForKey:, NSDictionary(OOExtractor)::oo_floatForKey:defaultValue:, NSUserDefaults(OOExtractor)::oo_floatForKey:defaultValue:, and OOFuzzyBooleanFromObject().
BOOL OOFuzzyBooleanFromObject | ( | id | object, |
float | defaultValue ) |
Definition at line 1317 of file OOCollectionExtractors.m.
References FuzzyBooleanProbabilityFromString(), IsZeroString(), OOFloatFromObject(), and randf().
Referenced by StationEntity::hasShipyard, NSArray(OOExtractor)::oo_fuzzyBooleanAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_fuzzyBooleanForKey:defaultValue:, and NSUserDefaults(OOExtractor)::oo_fuzzyBooleanForKey:defaultValue:.
HPVector OOHPVectorFromObject | ( | id | object, |
HPVector | defaultValue ) |
Definition at line 1445 of file OOCollectionExtractors.m.
References count, nil, and ScanHPVectorFromString().
Referenced by NSDictionary(OOExtractor)::oo_hpvectorForKey:defaultValue:.
Definition at line 1201 of file OOCollectionExtractors.m.
Referenced by NSArray(OOExtractor)::oo_longLongAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_longLongForKey:defaultValue:, NSUserDefaults(OOExtractor)::oo_longLongForKey:defaultValue:, and Verify_Integer().
double OONonNegativeDoubleFromObject | ( | id | object, |
double | defaultValue ) |
Definition at line 1393 of file OOCollectionExtractors.m.
Referenced by NSArray(OOExtractor)::oo_nonNegativeDoubleAtIndex:, NSArray(OOExtractor)::oo_nonNegativeDoubleAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_nonNegativeDoubleForKey:, NSUserDefaults(OOExtractor)::oo_nonNegativeDoubleForKey:, NSDictionary(OOExtractor)::oo_nonNegativeDoubleForKey:defaultValue:, and NSUserDefaults(OOExtractor)::oo_nonNegativeDoubleForKey:defaultValue:.
float OONonNegativeFloatFromObject | ( | id | object, |
float | defaultValue ) |
Definition at line 1380 of file OOCollectionExtractors.m.
Referenced by NSArray(OOExtractor)::oo_nonNegativeFloatAtIndex:, NSArray(OOExtractor)::oo_nonNegativeFloatAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_nonNegativeFloatForKey:, NSUserDefaults(OOExtractor)::oo_nonNegativeFloatForKey:, NSDictionary(OOExtractor)::oo_nonNegativeFloatForKey:defaultValue:, and NSUserDefaults(OOExtractor)::oo_nonNegativeFloatForKey:defaultValue:.
NSDictionary * OOPropertyListFromHPVector | ( | HPVector | value | ) |
Definition at line 1527 of file OOCollectionExtractors.m.
NSDictionary * OOPropertyListFromQuaternion | ( | Quaternion | value | ) |
Definition at line 1537 of file OOCollectionExtractors.m.
NSDictionary * OOPropertyListFromVector | ( | Vector | value | ) |
Definition at line 1518 of file OOCollectionExtractors.m.
Quaternion OOQuaternionFromObject | ( | id | object, |
Quaternion | defaultValue ) |
Definition at line 1480 of file OOCollectionExtractors.m.
References count, nil, and ScanQuaternionFromString().
Referenced by NSArray(OOExtractor)::oo_quaternionAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_quaternionForKey:defaultValue:, and Verify_Quaternion().
Definition at line 1214 of file OOCollectionExtractors.m.
Referenced by NSArray(OOExtractor)::oo_unsignedLongLongAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_unsignedLongLongForKey:defaultValue:, NSUserDefaults(OOExtractor)::oo_unsignedLongLongForKey:defaultValue:, OODeciCreditsFromObject(), and Verify_PositiveInteger().
Vector OOVectorFromObject | ( | id | object, |
Vector | defaultValue ) |
Definition at line 1407 of file OOCollectionExtractors.m.
References count, nil, and ScanVectorFromString().
Referenced by NSArray(OOExtractor)::oo_vectorAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_vectorForKey:defaultValue:, and Verify_Vector().
|
static |
Definition at line 1549 of file OOCollectionExtractors.m.
Referenced by NSArray(OOExtractor)::oo_setAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_setForKey:defaultValue:, and NSUserDefaults(OOExtractor)::oo_setForKey:defaultValue:.
|
static |
Definition at line 1558 of file OOCollectionExtractors.m.
Referenced by NSArray(OOExtractor)::oo_stringAtIndex:defaultValue:, NSDictionary(OOExtractor)::oo_stringForKey:defaultValue:, and NSUserDefaults(OOExtractor)::oo_stringForKey:defaultValue:.