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

#include <OOEntityInspectorExtensions.h>

Instance Methods

(NSString *) - inspScanClassLine
 
(NSString *) - inspStatusLine
 
(NSString *) - inspRetainCountLine
 
(NSString *) - inspPositionLine
 
(NSString *) - inspVelocityLine
 
(NSString *) - inspOrientationLine
 
(NSString *) - inspEnergyLine
 
(NSString *) - inspOwnerLine
 
(NSString *) - inspTargetLine
 
(NSString *) - inspDescription [implementation]
 
(NSString *) - inspBasicIdentityLine [implementation]
 

Detailed Description

Definition at line 49 of file OOEntityInspectorExtensions.h.

Method Documentation

◆ inspBasicIdentityLine

- (NSString *) inspBasicIdentityLine
implementation

Extends class Entity.

Definition at line 95 of file OOEntityInspectorExtensions.m.

96{
97 OOUniversalID myID = [self universalID];
98
99 if (myID != NO_TARGET)
100 {
101 return [NSString stringWithFormat:@"%@ ID %u", [self class], myID];
102 }
103 else
104 {
105 return [self className];
106 }
107}
@ NO_TARGET
Definition OOTypes.h:194
uint16_t OOUniversalID
Definition OOTypes.h:189

References inspBasicIdentityLine, NO_TARGET, and Entity::universalID.

Referenced by inspBasicIdentityLine.

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

◆ inspDescription

- (NSString *) inspDescription
implementation

Extends class Entity.

Definition at line 89 of file OOEntityInspectorExtensions.m.

90{
91 return [NSString stringWithFormat:@"%@ ID %u", [self class], [self universalID]];
92}

References inspDescription, and Entity::universalID.

Referenced by inspDescription.

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

◆ inspEnergyLine

- (NSString *) inspEnergyLine

Extends class Entity.

Definition at line 149 of file OOEntityInspectorExtensions.m.

150{
151 return [NSString stringWithFormat:@"%i/%i", (int)[self energy], (int)[self maxEnergy]];
152}

References Entity::energy, inspEnergyLine, and Entity::maxEnergy.

Referenced by inspEnergyLine.

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

◆ inspOrientationLine

- (NSString *) inspOrientationLine

Extends class Entity.

Definition at line 142 of file OOEntityInspectorExtensions.m.

143{
144 Quaternion q = [self orientation];
145 return [NSString stringWithFormat:@"%.3f (%.3f, %.3f, %.3f)", q.w, q.x, q.y, q.z];
146}

References inspOrientationLine, and Entity::orientation.

Referenced by inspOrientationLine.

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

◆ inspOwnerLine

- (NSString *) inspOwnerLine

Extends class Entity.

Definition at line 155 of file OOEntityInspectorExtensions.m.

156{
157 if ([self owner] == self) return @"Self";
158 return [[self owner] inspDescription];
159}

References inspOwnerLine, and Entity::owner.

Referenced by inspOwnerLine.

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

◆ inspPositionLine

- (NSString *) inspPositionLine

Extends class Entity.

Definition at line 128 of file OOEntityInspectorExtensions.m.

129{
130 HPVector v = [self position];
131 return [NSString stringWithFormat:@"%.0f, %.0f, %.0f", v.x, v.y, v.z];
132}

References inspPositionLine, and Entity::position.

Referenced by inspPositionLine.

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

◆ inspRetainCountLine

- (NSString *) inspRetainCountLine

Extends class Entity.

Definition at line 122 of file OOEntityInspectorExtensions.m.

123{
124 return [NSString stringWithFormat:@"%lu", [self retainCount]];
125}

References inspRetainCountLine.

Referenced by inspRetainCountLine.

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

◆ inspScanClassLine

- (NSString *) inspScanClassLine

Extends class Entity.

Definition at line 110 of file OOEntityInspectorExtensions.m.

111{
112 return OOStringFromScanClass([self scanClass]);
113}
NSString * OOStringFromScanClass(OOScanClass scanClass) CONST_FUNC

References inspScanClassLine, and OOStringFromScanClass().

Referenced by inspScanClassLine.

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

◆ inspStatusLine

- (NSString *) inspStatusLine

Extends class Entity.

Definition at line 116 of file OOEntityInspectorExtensions.m.

117{
118 return OOStringFromEntityStatus([self status]);
119}
NSString * OOStringFromEntityStatus(OOEntityStatus status) CONST_FUNC

References inspStatusLine, and OOStringFromEntityStatus().

Referenced by inspStatusLine.

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

◆ inspTargetLine

- (NSString *) inspTargetLine

Extends class Entity.

Definition at line 162 of file OOEntityInspectorExtensions.m.

163{
164 return nil;
165}
return nil

References inspTargetLine, and nil.

Referenced by inspTargetLine.

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

◆ inspVelocityLine

- (NSString *) inspVelocityLine

Extends class Entity.

Definition at line 135 of file OOEntityInspectorExtensions.m.

136{
137 Vector v = [self velocity];
138 return [NSString stringWithFormat:@"%.1f, %.1f, %.1f (%.1f)", v.x, v.y, v.z, magnitude(v)];
139}

References inspVelocityLine, and Entity::velocity.

Referenced by inspVelocityLine.

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