Oolite 1.91.0.7645-241119-222d325
|
import "OOJSSystemInfo.h"
import "OOJavaScriptEngine.h"
import "PlayerEntityScriptMethods.h"
import "Universe.h"
import "OOJSVector.h"
import "OOIsNumberLiteral.h"
import "OOConstToString.h"
import "OOSystemDescriptionManager.h"
import "OOJSScript.h"
Go to the source code of this file.
Classes | |
class | OOSystemInfo |
Enumerations | |
enum | { kSystemInfo_coordinates , kSystemInfo_internalCoordinates , kSystemInfo_galaxyID , kSystemInfo_systemID } |
Functions | |
static JSBool | SystemInfoDeleteProperty (JSContext *context, JSObject *this, jsid propID, jsval *value) |
static JSBool | SystemInfoGetProperty (JSContext *context, JSObject *this, jsid propID, jsval *value) |
static JSBool | SystemInfoSetProperty (JSContext *context, JSObject *this, jsid propID, JSBool strict, jsval *value) |
static void | SystemInfoFinalize (JSContext *context, JSObject *this) |
static JSBool | SystemInfoEnumerate (JSContext *context, JSObject *this, JSIterateOp enumOp, jsval *state, jsid *idp) |
static JSBool | SystemInfoDistanceToSystem (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemInfoRouteToSystem (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemInfoSamplePrice (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemInfoSetPropertyMethod (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemInfoStaticSetInterstellarProperty (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemInfoStaticFilteredSystems (JSContext *context, uintN argc, jsval *vp) |
DEFINE_JS_OBJECT_GETTER (JSSystemInfoGetSystemInfo, &sSystemInfoClass, sSystemInfoPrototype, OOSystemInfo) | |
void | InitOOJSSystemInfo (JSContext *context, JSObject *global) |
jsval | GetJSSystemInfoForSystem (JSContext *context, OOGalaxyID galaxy, OOSystemID system) |
Variables | |
static JSObject * | sSystemInfoPrototype |
static JSObject * | sCachedSystemInfo |
static OOGalaxyID | sCachedGalaxy |
static OOSystemID | sCachedSystem |
static JSClass | sSystemInfoClass |
static JSPropertySpec | sSystemInfoProperties [] |
static JSFunctionSpec | sSystemInfoMethods [] |
static JSFunctionSpec | sSystemInfoStaticMethods [] |
anonymous enum |
Enumerator | |
---|---|
kSystemInfo_coordinates | |
kSystemInfo_internalCoordinates | |
kSystemInfo_galaxyID | |
kSystemInfo_systemID |
Definition at line 74 of file OOJSSystemInfo.m.
DEFINE_JS_OBJECT_GETTER | ( | JSSystemInfoGetSystemInfo | , |
& | sSystemInfoClass, | ||
sSystemInfoPrototype | , | ||
OOSystemInfo | ) |
jsval GetJSSystemInfoForSystem | ( | JSContext * | context, |
OOGalaxyID | galaxy, | ||
OOSystemID | system ) |
Definition at line 297 of file OOJSSystemInfo.m.
References EXPECT_NOT, OOSystemInfo::galaxy, nil, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT_JSVAL, OOJSReportWarning(), OOJSValueFromNativeObject(), sCachedGalaxy, sCachedSystem, sCachedSystemInfo, and OOSystemInfo::system.
Referenced by SystemGetProperty(), and SystemStaticInfoForSystem().
void InitOOJSSystemInfo | ( | JSContext * | context, |
JSObject * | global ) |
Definition at line 290 of file OOJSSystemInfo.m.
References OOJSBasicPrivateObjectConverter(), OOJSRegisterObjectConverter(), OOJSUnconstructableConstruct(), sSystemInfoClass, sSystemInfoMethods, sSystemInfoProperties, sSystemInfoPrototype, and sSystemInfoStaticMethods.
|
static |
Definition at line 403 of file OOJSSystemInfo.m.
References OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, and SystemInfoSetProperty().
|
static |
Definition at line 532 of file OOJSSystemInfo.m.
References OOSystemInfo::coordinates, distanceBetweenPlanetPositions(), OOSystemInfo::galaxy, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_DOUBLE, OOJS_THIS, OOJSReportBadArguments(), and OOJSReportErrorForCaller().
|
static |
Definition at line 348 of file OOJSSystemInfo.m.
References OOSystemInfo::allKeys, count, nil, OOJS_NATIVE_ENTER, and OOJS_NATIVE_EXIT.
|
static |
Definition at line 334 of file OOJSSystemInfo.m.
References nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT_VOID, and sCachedSystemInfo.
|
static |
Definition at line 414 of file OOJSSystemInfo.m.
References OOSystemInfo::coordinates, OOSystemInfo::galaxy, OOSystemDescriptionManager::getProperty:forSystem:inGalaxy:, kSystemInfo_coordinates, kSystemInfo_galaxyID, kSystemInfo_internalCoordinates, kSystemInfo_systemID, nil, NSPointToVectorJSValue(), OOGalacticCoordinatesFromInternal(), OOIsNumberLiteral(), OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSNativeObjectOfClassFromJSObject(), OOJSReportBadPropertySelector(), OOJSReportError(), OOStringFromJSString(), sSystemInfoProperties, sSystemInfoPrototype, OOSystemInfo::system, OOSystemInfo::valueForKey:, and VectorToJSValue().
|
static |
Definition at line 564 of file OOJSSystemInfo.m.
References OOSystemInfo::galaxy, MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJS_THIS, OOJSReportBadArguments(), OOJSReportErrorForCaller(), OOStringFromJSValue(), OPTIMIZED_BY_JUMPS, StringToRouteType(), and OOSystemInfo::system.
|
static |
Definition at line 604 of file OOJSSystemInfo.m.
References EXPECT_NOT, OOSystemInfo::galaxy, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RVAL, OOJS_THIS, OOJSReportBadArguments(), OOJSReportErrorForCaller(), OOStringFromJSValue(), OOCommodities::samplePriceForCommodity:inEconomy:withScript:inSystem:, OOSystemInfo::system, UNIVERSE, and OOSystemInfo::valueForKey:.
|
static |
Definition at line 508 of file OOJSSystemInfo.m.
References EXPECT_NOT, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSNativeObjectOfClassFromJSObject(), OOStringFromJSString(), OOSystemInfo::setValue:forKey:, and sSystemInfoPrototype.
Referenced by SystemInfoDeleteProperty().
|
static |
Definition at line 633 of file OOJSSystemInfo.m.
References OOJSScript::currentlyRunningScript, OOSystemInfo::galaxy, MIN, nil, OO_SYSTEM_LAYERS, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJS_THIS, OOJSNativeObjectFromJSValue(), OOJSReportBadArguments(), OOStringFromJSValue(), OOJSScript::propertyNamed:, and OOSystemInfo::system.
|
static |
Definition at line 687 of file OOJSSystemInfo.m.
References OOSystemInfo::galaxy, kOOMaximumSystemID, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_SET_RVAL, OOJSPauseTimeLimiter(), OOJSReportBadArguments(), OOJSResumeTimeLimiter(), OOJSValueFromNativeObject(), OOJSValueIsFunction(), and OOSystemInfo::system.
|
static |
Definition at line 761 of file OOJSSystemInfo.m.
References OOJSScript::currentlyRunningScript, kOOMaximumGalaxyID, kOOMaximumSystemID, MIN, nil, OO_SYSTEM_LAYERS, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSNativeObjectFromJSValue(), OOJSReportBadArguments(), OOStringFromJSValue(), and OOJSScript::propertyNamed:.
|
static |
Definition at line 38 of file OOJSSystemInfo.m.
Referenced by GetJSSystemInfoForSystem().
|
static |
Definition at line 39 of file OOJSSystemInfo.m.
Referenced by GetJSSystemInfoForSystem().
|
static |
Definition at line 37 of file OOJSSystemInfo.m.
Referenced by GetJSSystemInfoForSystem(), and SystemInfoFinalize().
|
static |
Definition at line 57 of file OOJSSystemInfo.m.
Referenced by InitOOJSSystemInfo().
|
static |
Definition at line 95 of file OOJSSystemInfo.m.
Referenced by InitOOJSSystemInfo().
|
static |
Definition at line 84 of file OOJSSystemInfo.m.
Referenced by InitOOJSSystemInfo(), and SystemInfoGetProperty().
|
static |
Definition at line 36 of file OOJSSystemInfo.m.
Referenced by InitOOJSSystemInfo(), SystemInfoGetProperty(), and SystemInfoSetProperty().
|
static |
Definition at line 107 of file OOJSSystemInfo.m.
Referenced by InitOOJSSystemInfo().