Oolite 1.91.0.7645-241119-222d325
|
#include "OOConstToJSString.h"
#include "OOCompassMode.tbl"
#include "OOEntityStatus.tbl"
#include "OOGalacticHyperspaceBehaviour.tbl"
#include "OOGUIScreenID.tbl"
#include "OOScanClass.tbl"
#include "OOViewID.tbl"
#include "OOShipDamageType.tbl"
#include "OOLegalStatusReason.tbl"
#include "OOLongRangeChartMode.tbl"
Go to the source code of this file.
Classes | |
struct | TableEntry |
struct | ConstTable |
Macros | |
#define | TABLE(entries) |
#define | ENTRY(label, val) |
#define | GALACTIC_HYPERSPACE_ENTRY(label, val) |
#define | DIFF_STRING_ENTRY(label, string) |
Typedefs | |
typedef struct ConstTable | ConstTable |
Functions | |
static void | InitTable (JSContext *context, ConstTable *table) |
void | OOConstToJSStringInit (JSContext *context) |
void | OOConstToJSStringDestroy (void) |
static int | CompareEntries (const void *a, const void *b) |
JSString * | OOJSStringFromConstantPRIVATE (JSContext *context, NSInteger value, struct ConstTable *table) |
NSUInteger | OOConstantFromJSStringPRIVATE (JSContext *context, JSString *string, struct ConstTable *table, NSInteger defaultValue) |
NSUInteger | OOConstantFromJSValuePRIVATE (JSContext *context, jsval value, struct ConstTable *table, NSInteger defaultValue) |
#define DIFF_STRING_ENTRY | ( | label, | |
string ) |
Definition at line 77 of file OOConstToJSString.m.
#define ENTRY | ( | label, | |
val ) |
Definition at line 75 of file OOConstToJSString.m.
#define GALACTIC_HYPERSPACE_ENTRY | ( | label, | |
val ) |
Definition at line 76 of file OOConstToJSString.m.
#define TABLE | ( | entries | ) |
Definition at line 60 of file OOConstToJSString.m.
typedef struct ConstTable ConstTable |
|
static |
Definition at line 173 of file OOConstToJSString.m.
References TableEntry::value.
Referenced by InitTable().
|
static |
Definition at line 184 of file OOConstToJSString.m.
References CompareEntries(), ConstTable::count, TableEntry::cString, ConstTable::entries, JS_IsInRequest, and TableEntry::jsString.
Referenced by OOConstToJSStringInit().
NSUInteger OOConstantFromJSStringPRIVATE | ( | JSContext * | context, |
JSString * | string, | ||
struct ConstTable * | table, | ||
NSInteger | defaultValue ) |
Definition at line 232 of file OOConstToJSString.m.
References ConstTable::count, count, ConstTable::entries, JS_IsInRequest, TableEntry::jsString, sInited, and TableEntry::value.
Referenced by OOCompassModeFromJSString(), OOConstantFromJSValuePRIVATE(), OOEntityStatusFromJSString(), OOGalacticHyperspaceBehaviourFromJSString(), OOGUIScreenIDFromJSString(), OOScanClassFromJSString(), and OOViewIDFromJSString().
NSUInteger OOConstantFromJSValuePRIVATE | ( | JSContext * | context, |
jsval | value, | ||
struct ConstTable * | table, | ||
NSInteger | defaultValue ) |
Definition at line 266 of file OOConstToJSString.m.
References EXPECT, and OOConstantFromJSStringPRIVATE().
Referenced by OOCompassModeFromJSValue(), OOEntityStatusFromJSValue(), OOGalacticHyperspaceBehaviourFromJSValue(), OOGUIScreenIDFromJSValue(), OOScanClassFromJSValue(), and OOViewIDFromJSValue().
void OOConstToJSStringDestroy | ( | void | ) |
Definition at line 165 of file OOConstToJSString.m.
References sInited.
void OOConstToJSStringInit | ( | JSContext * | context | ) |
Definition at line 144 of file OOConstToJSString.m.
References gOOCompassModeConstTable, gOOEntityStatusConstTable, gOOGalacticHyperspaceBehaviourConstTable, gOOGUIScreenIDConstTable, gOOLegalStatusReasonConstTable, gOOLongRangeChartModeConstTable, gOOScanClassConstTable, gOOShipDamageTypeConstTable, gOOViewIDConstTable, InitTable(), JS_IsInRequest, sInited, and sUndefinedString.
JSString * OOJSStringFromConstantPRIVATE | ( | JSContext * | context, |
NSInteger | value, | ||
struct ConstTable * | table ) |
Definition at line 200 of file OOConstToJSString.m.
References ConstTable::count, ConstTable::entries, JS_IsInRequest, TableEntry::jsString, sInited, sUndefinedString, and TableEntry::value.
Referenced by OOJSStringFromCompassMode(), OOJSStringFromEntityStatus(), OOJSStringFromGalacticHyperspaceBehaviour(), OOJSStringFromGUIScreenID(), OOJSStringFromLegalStatusReason(), OOJSStringFromScanClass(), OOJSStringFromShipDamageType(), and OOJSStringFromViewID().
ConstTable gOOCompassModeConstTable = TABLE(sOOCompassModeTableEntries) |
Definition at line 129 of file OOConstToJSString.m.
Referenced by OOCompassModeFromJSString(), OOCompassModeFromJSValue(), OOConstToJSStringInit(), and OOJSStringFromCompassMode().
ConstTable gOOEntityStatusConstTable = TABLE(sOOEntityStatusTableEntries) |
Definition at line 130 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), OOEntityStatusFromJSString(), OOEntityStatusFromJSValue(), and OOJSStringFromEntityStatus().
ConstTable gOOGalacticHyperspaceBehaviourConstTable = TABLE(sOOGalacticHyperspaceBehaviourTableEntries) |
Definition at line 131 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), OOGalacticHyperspaceBehaviourFromJSString(), OOGalacticHyperspaceBehaviourFromJSValue(), and OOJSStringFromGalacticHyperspaceBehaviour().
ConstTable gOOGUIScreenIDConstTable = TABLE(sOOGUIScreenIDTableEntries) |
Definition at line 132 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), OOGUIScreenIDFromJSString(), OOGUIScreenIDFromJSValue(), and OOJSStringFromGUIScreenID().
ConstTable gOOLegalStatusReasonConstTable = TABLE(sOOLegalStatusReasonTableEntries) |
Definition at line 136 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), and OOJSStringFromLegalStatusReason().
ConstTable gOOLongRangeChartModeConstTable = TABLE(sOOLongRangeChartModeTableEntries) |
Definition at line 137 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit().
ConstTable gOOScanClassConstTable = TABLE(sOOScanClassTableEntries) |
Definition at line 133 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), OOJSStringFromScanClass(), OOScanClassFromJSString(), and OOScanClassFromJSValue().
ConstTable gOOShipDamageTypeConstTable = TABLE(sOOShipDamageTypeTableEntries) |
Definition at line 135 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), and OOJSStringFromShipDamageType().
ConstTable gOOViewIDConstTable = TABLE(sOOViewIDTableEntries) |
Definition at line 134 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), OOJSStringFromViewID(), OOViewIDFromJSString(), and OOViewIDFromJSValue().
|
static |
Definition at line 63 of file OOConstToJSString.m.
Referenced by OOConstantFromJSStringPRIVATE(), OOConstToJSStringDestroy(), OOConstToJSStringInit(), and OOJSStringFromConstantPRIVATE().
|
static |
Definition at line 79 of file OOConstToJSString.m.
|
static |
Definition at line 84 of file OOConstToJSString.m.
|
static |
Definition at line 89 of file OOConstToJSString.m.
|
static |
Definition at line 94 of file OOConstToJSString.m.
|
static |
Definition at line 114 of file OOConstToJSString.m.
|
static |
Definition at line 119 of file OOConstToJSString.m.
|
static |
Definition at line 99 of file OOConstToJSString.m.
|
static |
Definition at line 109 of file OOConstToJSString.m.
|
static |
Definition at line 104 of file OOConstToJSString.m.
|
static |
Definition at line 69 of file OOConstToJSString.m.
Referenced by OOConstToJSStringInit(), and OOJSStringFromConstantPRIVATE().