Oolite
Loading...
Searching...
No Matches
OOPlanetEntity(OOJavaScriptExtensions) Category Reference

Instance Methods

(BOOL) - isVisibleToScripts [implementation]
(void) - getJSClass:andPrototype: [implementation]
(NSString *) - oo_jsClassName [implementation]
(JSClassID) - oo_jsClassID [implementation]

Detailed Description

Definition at line 94 of file OOJSPlanet.m.

Method Documentation

◆ getJSClass:andPrototype:

- (void) getJSClass: (JSClass**) outClass
andPrototype: (JSObject**) outPrototype 
implementation

Definition at line 102 of file OOJSPlanet.m.

102 :(JSClass**)outClass andPrototype:(JSObject**)outPrototype
103{
104 *outClass = &sPlanetClass;
105 *outPrototype = sPlanetPrototype;
106}
static JSClass sPlanetClass
Definition OOJSPlanet.m:37
static JSObject * sPlanetPrototype
Definition OOJSPlanet.m:32

References sPlanetClass, and sPlanetPrototype.

◆ isVisibleToScripts

- (BOOL) isVisibleToScripts
implementation

Definition at line 96 of file OOJSPlanet.m.

97{
98 OOStellarBodyType type = [self planetType];
99 return type == STELLAR_TYPE_NORMAL_PLANET || type == STELLAR_TYPE_MOON;
100}
OOStellarBodyType
@ STELLAR_TYPE_MOON
@ STELLAR_TYPE_NORMAL_PLANET

References isVisibleToScripts, STELLAR_TYPE_MOON, and STELLAR_TYPE_NORMAL_PLANET.

Referenced by isVisibleToScripts.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ oo_jsClassID

- (JSClassID) oo_jsClassID
implementation

Definition at line 105 of file OOJSPlanet.m.

106{
107 return sPlanetClassID;
108}
static JSClassID sPlanetClassID
Definition OOJSPlanet.m:34

References oo_jsClassID, and sPlanetClassID.

Referenced by oo_jsClassID.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ oo_jsClassName

- (NSString *) oo_jsClassName
implementation

Definition at line 108 of file OOJSPlanet.m.

109{
110 switch ([self planetType]) {
112 return @"Planet";
114 return @"Moon";
115 default:
116 return @"Unknown";
117 }
118}

References oo_jsClassName, STELLAR_TYPE_MOON, and STELLAR_TYPE_NORMAL_PLANET.

Referenced by oo_jsClassName.

Here is the call graph for this function:
Here is the caller graph for this function:

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