Oolite 1.91.0.7668-250429-8542c40
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
OOPlanetEntity(OOJavaScriptExtensions) Category Reference

Instance Methods

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

Detailed Description

Definition at line 107 of file OOJSPlanet.m.

Method Documentation

◆ getJSClass:andPrototype:

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

Definition at line 116 of file OOJSPlanet.m.

116 :(JSClass **)outClass andPrototype:(JSObject **)outPrototype
117{
118 *outClass = &sPlanetClass;
119 *outPrototype = sPlanetPrototype;
120}
static JSClass sPlanetClass
Definition OOJSPlanet.m:42
static JSObject * sPlanetPrototype
Definition OOJSPlanet.m:35

References sPlanetClass, and sPlanetPrototype.

◆ isVisibleToScripts

- (BOOL) isVisibleToScripts
implementation

Definition at line 109 of file OOJSPlanet.m.

110{
111 OOStellarBodyType type = [self planetType];
112 return type == STELLAR_TYPE_NORMAL_PLANET || type == STELLAR_TYPE_MOON;
113}
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_jsClassName

- (NSString *) oo_jsClassName
implementation

Definition at line 123 of file OOJSPlanet.m.

124{
125 switch ([self planetType])
126 {
128 return @"Planet";
130 return @"Moon";
131 default:
132 return @"Unknown";
133 }
134}

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 file: