Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOConvertSystemDescriptions.h
Go to the documentation of this file.
1/*
2
3OOConvertSystemDescriptions.m
4Oolite
5
6Functions to convert system descriptions between dictionary and array
7formats.
8
9The array format is used in descriptions.plist. Each set of strings is an
10array, the sets are stored in a master array, and cross-references are
11indices into the master array.
12
13The dictionary format is more human-friendly, with string sets identified
14by name and cross-references using names.
15
16The indicesToKeys parameter is optional; if it is nil or incomplete,
17indices or (index-based) keys will be synthesized.
18
19
20Copyright (C) 2008 Jens Ayton
21
22Permission is hereby granted, free of charge, to any person obtaining a copy
23of this software and associated documentation files (the "Software"), to deal
24in the Software without restriction, including without limitation the rights
25to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26copies of the Software, and to permit persons to whom the Software is
27furnished to do so, subject to the following conditions:
28
29The above copyright notice and this permission notice shall be included in all
30copies or substantial portions of the Software.
31
32THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38SOFTWARE.
39
40*/
41
42
43#import <Foundation/Foundation.h>
44
45
46NSArray *OOConvertSystemDescriptionsToArrayFormat(NSDictionary *descriptionsInDictionaryFormat, NSDictionary *indicesToKeys);
47NSDictionary *OOConvertSystemDescriptionsToDictionaryFormat(NSArray *descriptionsInArrayFormat, NSDictionary *indicesToKeys);
48
49NSString *OOStringifySystemDescriptionLine(NSString *line, NSDictionary *indicesToKeys, BOOL useFallback);
50
51// Higher-level functions to drive the entire conversion.
52void CompileSystemDescriptions(BOOL asXML);
53void ExportSystemDescriptions(BOOL asXML);
void CompileSystemDescriptions(BOOL asXML)
void ExportSystemDescriptions(BOOL asXML)
NSDictionary * OOConvertSystemDescriptionsToDictionaryFormat(NSArray *descriptionsInArrayFormat, NSDictionary *indicesToKeys)
NSString * OOStringifySystemDescriptionLine(NSString *line, NSDictionary *indicesToKeys, BOOL useFallback)
NSArray * OOConvertSystemDescriptionsToArrayFormat(NSDictionary *descriptionsInDictionaryFormat, NSDictionary *indicesToKeys)