Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOConstToString.h
Go to the documentation of this file.
1/*
2
3OOConstToString.h
4
5Convert various sets of integer constants to strings.
6To consider: replacing the integer constants with string constants.
7 See also: OOConstToJSString.h.
8
9This has grown beyond "const-to-string" at this point.
10
11Oolite
12Copyright (C) 2004-2013 Giles C Williams and contributors
13
14This program is free software; you can redistribute it and/or
15modify it under the terms of the GNU General Public License
16as published by the Free Software Foundation; either version 2
17of the License, or (at your option) any later version.
18
19This program is distributed in the hope that it will be useful,
20but WITHOUT ANY WARRANTY; without even the implied warranty of
21MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22GNU General Public License for more details.
23
24You should have received a copy of the GNU General Public License
25along with this program; if not, write to the Free Software
26Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
27MA 02110-1301, USA.
28
29*/
30
31#import <Foundation/Foundation.h>
33#import "OOTypes.h"
34
35
36enum
37{
38 // Values used for unknown strings.
40// kOOCommodityTypeDefault = COMMODITY_UNDEFINED,
43};
44
45
46/*
47
48To avoid pulling in unnecessary headers, some functions defined in
49OOConstToString.m are declared in the header with the appropriate type
50declaration, in particular:
51
52 Entity.h:
53 OOStringFromEntityStatus()
54 OOEntityStatusFromString()
55 OOStringFromScanClass()
56 OOScanClassFromString()
57
58 ShipEntity.h:
59 OOStringFromBehaviour()
60 OOEquipmentIdentifierFromWeaponType()
61 OOWeaponTypeFromEquipmentIdentifierSloppy()
62 OOWeaponTypeFromEquipmentIdentifierStrict()
63 OOStringFromWeaponType()
64 OOWeaponTypeFromString()
65 OODisplayStringFromAlertCondition()
66
67 PlayerEntity.h:
68 OODisplayRatingStringFromKillCount()
69 KillCountToRatingAndKillString()
70 OODisplayStringFromLegalStatus()
71 OOStringFromGUIScreenID()
72 OOGUIScreenIDFromString()
73 OOGalacticHyperspaceBehaviourFromString()
74 OOStringFromGalacticHyperspaceBehaviour()
75
76 Universe.h:
77 OODisplayStringFromGovernmentID()
78 OODisplayStringFromEconomyID()
79
80 OOOpenGL.h:
81 OOShaderSettingFromString()
82 OOStringFromShaderSetting()
83 OODisplayStringFromShaderSetting()
84
85*/
86
87NSString *JSTypeToString(int /* JSType */ type) CONST_FUNC;
88
91
92//NSString *CommodityTypeToString(OOCommodityType commodity) CONST_FUNC; // returns the commodity identifier
93//OOCommodityType StringToCommodityType(NSString *string) PURE_FUNC; // needs commodity identifier
94
97
98NSString *CommodityDisplayNameForSymbolicName(NSString *symbolicName);
99NSString *CommodityDisplayNameForCommodityArray(NSArray *commodityDefinition);
100
103
105OOCompassMode OOCompassModeFromString(NSString *string);
106
109
111
112NSString *RouteTypeToString(OORouteType routeType);
113OORouteType StringToRouteType(NSString *string);
114
116
119
NSString * OOStringFromGraphicsDetail(OOGraphicsDetail detail)
NSString * JSTypeToString(int type) CONST_FUNC
OOEnergyUnitType StringToEnergyUnitType(NSString *string) PURE_FUNC
NSString * CargoTypeToString(OOCargoType cargo) CONST_FUNC
NSString * DockingClearanceStatusToString(OODockingClearanceStatus dockingClearanceStatus) PURE_FUNC
NSString * EnergyUnitTypeToString(OOEnergyUnitType unit) CONST_FUNC
NSString * CommodityDisplayNameForSymbolicName(NSString *symbolicName)
NSString * DisplayStringForMassUnit(OOMassUnit unit)
OORouteType StringToRouteType(NSString *string)
OOCargoType StringToCargoType(NSString *string) PURE_FUNC
NSString * RouteTypeToString(OORouteType routeType)
OOCompassMode OOCompassModeFromString(NSString *string)
NSString * OOStringFromLongRangeChartMode(OOLongRangeChartMode chartMode)
NSString * OOStringFromCompassMode(OOCompassMode mode)
@ kOOCargoTypeDefault
@ kOORouteTypeDefault
@ kOOEnergyUnitTypeDefault
NSString * DisplayStringForMassUnitForCommodity(OOCommodityType commodity)
OOGraphicsDetail OOGraphicsDetailFromString(NSString *string)
NSString * OOStringFromLegalStatusReason(OOLegalStatusReason reason)
NSString * CommodityDisplayNameForCommodityArray(NSArray *commodityDefinition)
OOLongRangeChartMode OOLongRangeChartModeFromString(NSString *string)
#define PURE_FUNC
#define CONST_FUNC
OOLongRangeChartMode
Definition OOTypes.h:50
NSString * OOCommodityType
Definition OOTypes.h:106
OORouteType
Definition OOTypes.h:33
@ OPTIMIZED_BY_JUMPS
Definition OOTypes.h:35
OOGraphicsDetail
Definition OOTypes.h:243
OOLegalStatusReason
Definition OOTypes.h:157
OOCompassMode
Definition OOTypes.h:145
OOCargoType
Definition OOTypes.h:69
@ CARGO_NOT_CARGO
Definition OOTypes.h:70
OOMassUnit
Definition OOTypes.h:123
OODockingClearanceStatus
Definition OOTypes.h:167
OOEnergyUnitType
Definition OOTypes.h:131
@ ENERGY_UNIT_NONE
Definition OOTypes.h:132
const char int mode
Definition ioapi.h:133