~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to xsd2cppsax/src/de/netallied/xsd2cppsax/Config.java

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 *   Copyright © 2008-2012 NetAllied Systems GmbH, Ravensburg, Germany. 
 
3
 *       
 
4
 *   Licensed under the MIT Open Source License, 
 
5
 *   for details please see LICENSE file or the website
 
6
 *   http://www.opensource.org/licenses/mit-license.php
 
7
*/
 
8
package de.netallied.xsd2cppsax;
 
9
 
 
10
import java.io.File;
 
11
import java.io.FileInputStream;
 
12
import java.io.FileNotFoundException;
 
13
import java.io.IOException;
 
14
import java.util.ArrayList;
 
15
import java.util.HashMap;
 
16
import java.util.List;
 
17
import java.util.Map;
 
18
import java.util.Properties;
 
19
 
 
20
import de.netallied.xsd2cppsax.TypeMapping.TypeMap;
 
21
import de.netallied.xsd2cppsax.TypeMapping.TypeMapFactory;
 
22
 
 
23
/**
 
24
 * Configures code generation.
 
25
 */
 
26
public class Config {
 
27
 
 
28
    /**
 
29
     * Utility function to get a filepath without file extension.
 
30
     * 
 
31
     * @param fileName
 
32
     *            Path of a file.
 
33
     * @return Filepath without extension.
 
34
     */
 
35
    public static String getBaseFileName(String fileName) {
 
36
        return fileName.substring(0, fileName.lastIndexOf('.'));
 
37
    }
 
38
 
 
39
    private Map<String, String> builtInTypeMaxValues;
 
40
 
 
41
    private Map<String, String> builtInTypeMinValues;
 
42
 
 
43
    /** Code templates loaded from own properties file. */
 
44
    private Properties codeTemplates;
 
45
 
 
46
    private List<String> coherencyTestInitializationList;
 
47
 
 
48
    private Map<String, String> cppStructMemberNameMapping;
 
49
 
 
50
    private Map<String, String> elementNameMapping;
 
51
 
 
52
    private boolean generateCoherencyTestParser;
 
53
 
 
54
    private boolean generateExampleParser;
 
55
 
 
56
    private boolean generateFprintfParser;
 
57
 
 
58
    private boolean generateTypeNameMapping;
 
59
 
 
60
    private List<String> includeFilesForEnumsHeader;
 
61
 
 
62
    private List<String> includeFilesForEnumsSource;
 
63
 
 
64
    private List<String> includeFilesForImpl;
 
65
 
 
66
    private List<String> includeFilesForPrivateHeader;
 
67
 
 
68
    private int maxTemplateResolvingIterations;
 
69
 
 
70
    /** Options loaded from a properties file. */
 
71
    private Properties props;
 
72
 
 
73
    private List<String> specialFunctionMapsStartElementNamesAllLevels;
 
74
 
 
75
    private List<String> specialFunctionMapsStartElementNamesOneLevel;
 
76
 
 
77
    private boolean treatXsDoubleAsCppDouble;
 
78
 
 
79
    private boolean treatXsFloatAsCppFloat;
 
80
 
 
81
    private Map<String, TypeMap> typeMapping;
 
82
 
 
83
    private Map<String, String> userTypeNameMapping;
 
84
 
 
85
    private Map<String, String> xsNamespaceMapping;
 
86
 
 
87
    public Config(String configFileName, String inputXSD, String rootElement) throws FileNotFoundException, IOException {
 
88
        props = new Properties();
 
89
        FileInputStream propInputFile = new FileInputStream(configFileName);
 
90
        props.load(propInputFile);
 
91
 
 
92
        // options overwritten at commandline
 
93
        if (inputXSD != null) {
 
94
            props.setProperty("inputFile", inputXSD);
 
95
        }
 
96
        if (rootElement != null) {
 
97
            props.setProperty("rootElementName", rootElement);
 
98
        }
 
99
 
 
100
        // map options
 
101
        builtInTypeMaxValues = parseMapOption(props.getProperty("builtInTypeMaxValues"));
 
102
        builtInTypeMinValues = parseMapOption(props.getProperty("builtInTypeMinValues"));
 
103
        elementNameMapping = parseMapOption(props.getProperty("elementNameMapping"));
 
104
        cppStructMemberNameMapping = parseMapOption(props.getProperty("cppStructMemberNameMapping"));
 
105
        userTypeNameMapping = parseMapOption(props.getProperty("userTypeNameMapping"));
 
106
        xsNamespaceMapping = parseMapOption(props.getProperty("xsNamespaceMapping"));
 
107
 
 
108
        // list options
 
109
        includeFilesForEnumsHeader = parseListOption(props.getProperty("includeFilesForEnumsHeader"));
 
110
        includeFilesForEnumsSource = parseListOption(props.getProperty("includeFilesForEnumsSource"));
 
111
        includeFilesForPrivateHeader = parseListOption(props.getProperty("includeFilesForPrivateHeader"));
 
112
        includeFilesForImpl = new ArrayList<String>();
 
113
        includeFilesForImpl.add(getIncludePrecompiledHeader());
 
114
        includeFilesForImpl.addAll(parseListOption(props.getProperty("includeFilesForImpl")));
 
115
        coherencyTestInitializationList = parseListOption(props.getProperty("coherencyTestInitializationList"));
 
116
 
 
117
        specialFunctionMapsStartElementNamesAllLevels = parseListOption(props
 
118
                .getProperty("specialFunctionMapsStartElementNamesAllLevels"));
 
119
        specialFunctionMapsStartElementNamesOneLevel = parseListOption(props
 
120
                .getProperty("specialFunctionMapsStartElementNamesOneLevel"));
 
121
 
 
122
        // bool/numeric options
 
123
        maxTemplateResolvingIterations = Integer.parseInt(checkOption(props
 
124
                .getProperty("maxTemplateResolvingIterations")));
 
125
        generateTypeNameMapping = Boolean.parseBoolean(checkOption(props.getProperty("generateTypeNameMapping")));
 
126
        treatXsDoubleAsCppDouble = Boolean.parseBoolean(checkOption(props.getProperty("treatXsDoubleAsCppDouble")));
 
127
        treatXsFloatAsCppFloat = Boolean.parseBoolean(checkOption(props.getProperty("treatXsFloatAsCppFloat")));
 
128
        generateExampleParser = Boolean.parseBoolean(checkOption(props.getProperty("generateExampleParser")));
 
129
        generateFprintfParser = Boolean.parseBoolean(checkOption(props.getProperty("generateFprintfParser")));
 
130
        generateCoherencyTestParser = Boolean
 
131
                .parseBoolean(checkOption(props.getProperty("generateCoherencyTestParser")));
 
132
 
 
133
        // code templates
 
134
        codeTemplates = new Properties();
 
135
        String codeTemplatesFileName = props.getProperty("codeTemplates");
 
136
        if (codeTemplatesFileName != null && codeTemplatesFileName.length() > 0) {
 
137
            File configFile = new File(configFileName);
 
138
            String configDir = configFile.getParent();
 
139
            String codeTemplatesPath;
 
140
            if (configDir != null) {
 
141
                codeTemplatesPath = configDir + System.getProperty("file.separator") + codeTemplatesFileName;
 
142
            } else {
 
143
                codeTemplatesPath = codeTemplatesFileName;
 
144
            }
 
145
            FileInputStream codeTemplatesInputStream = new FileInputStream(codeTemplatesPath);
 
146
            codeTemplates.load(codeTemplatesInputStream);
 
147
        }
 
148
 
 
149
        // type mapping
 
150
        typeMapping = new TypeMapFactory().createDefaultTypeMap(this);
 
151
    }
 
152
 
 
153
    /**
 
154
     * Checks if option is null and returns empty string if the case.
 
155
     */
 
156
    protected String checkOption(String option) {
 
157
        return option == null ? "" : option;
 
158
    }
 
159
 
 
160
    public String getAnonymousEnumPrefix() {
 
161
        return checkOption(props.getProperty("anonymousEnumPrefix"));
 
162
    }
 
163
 
 
164
    public String getAnonymousUnionMemberPrefix() {
 
165
        return checkOption(props.getProperty("anonymousUnionMemberPrefix"));
 
166
    }
 
167
 
 
168
    public String getAnonymousUnionPrefix() {
 
169
        return checkOption(props.getProperty("anonymousUnionPrefix"));
 
170
    }
 
171
 
 
172
    public String getAttributeDataParameterName() {
 
173
        return checkOption(props.getProperty("attributeDataParameterName"));
 
174
    }
 
175
 
 
176
    public String getAttributePresentMaskType() {
 
177
        return checkOption(props.getProperty("attributePresentMaskType"));
 
178
    }
 
179
 
 
180
    public String getAttributesPresentMemberName() {
 
181
        return checkOption(props.getProperty("attributesPresentMemberName"));
 
182
    }
 
183
 
 
184
    public String getAttributesPresentMemberType() {
 
185
        return checkOption(props.getProperty("attributesPresentMemberType"));
 
186
    }
 
187
 
 
188
    public String getAttributeStructDefaultMemberName() {
 
189
        return checkOption(props.getProperty("attributeStructDefaultMemberName"));
 
190
    }
 
191
 
 
192
    public String getAttributeStructSuffix() {
 
193
        return checkOption(props.getProperty("attributeStructSuffix"));
 
194
    }
 
195
 
 
196
    public String getBaseClassName() {
 
197
        return getBaseClassTemplateName() + "<" + getClassNamePrivate() + ", " + getClassNamePublic() + ">";
 
198
    }
 
199
 
 
200
    public String getBaseClassNamespace() {
 
201
        return checkOption(props.getProperty("baseClassNamespace"));
 
202
    }
 
203
 
 
204
    public String getBaseClassTemplateName() {
 
205
        return checkOption(props.getProperty("baseClassTemplateName"));
 
206
    }
 
207
 
 
208
    public String getBeginMethodPrefix() {
 
209
        return checkOption(props.getProperty("beginMethodPrefix"));
 
210
    }
 
211
 
 
212
    /**
 
213
     * @return Mapping of C++ type names to max values from XSD built in types.
 
214
     */
 
215
    public Map<String, String> getBuiltInTypeMaxValues() {
 
216
        return builtInTypeMaxValues;
 
217
    }
 
218
 
 
219
    /**
 
220
     * @return Mapping of C++ type names to min values from XSD built in types.
 
221
     */
 
222
    public Map<String, String> getBuiltInTypeMinValues() {
 
223
        return builtInTypeMinValues;
 
224
    }
 
225
 
 
226
    public String getClassNameFunctionMapFactory() {
 
227
        return checkOption(props.getProperty("classNameFunctionMapFactory"));
 
228
    }
 
229
 
 
230
    public String getClassNamePrivate() {
 
231
        return checkOption(props.getProperty("classNamePrivate"));
 
232
    }
 
233
 
 
234
    public String getClassNamePublic() {
 
235
        return checkOption(props.getProperty("classNamePublic"));
 
236
    }
 
237
 
 
238
    public String getCoherencyTestCountAttributeMemberName() {
 
239
        return checkOption(props.getProperty("coherencyTestCountAttributeMemberName"));
 
240
    }
 
241
 
 
242
    public String getCoherencyTestCtorParas() {
 
243
        return checkOption(props.getProperty("coherencyTestCtorParas"));
 
244
    }
 
245
 
 
246
    public String getCoherencyTestErrorHandlerName() {
 
247
        return checkOption(props.getProperty("coherencyTestErrorHandlerName"));
 
248
    }
 
249
 
 
250
    public String getCoherencyTestIdCounterMapName() {
 
251
        return checkOption(props.getProperty("coherencyTestIdCounterMapName"));
 
252
    }
 
253
 
 
254
    public List<String> getCoherencyTestInitializationList() {
 
255
        return coherencyTestInitializationList;
 
256
    }
 
257
 
 
258
    public String getCoherencyTestListCountMemberName() {
 
259
        return checkOption(props.getProperty("coherencyTestListCountMemberName"));
 
260
    }
 
261
 
 
262
    public String getCoherencyTestParserClassName() {
 
263
        return checkOption(props.getProperty("coherencyTestParserClassName"));
 
264
    }
 
265
 
 
266
    public String getCoherencyTestParserNamespace() {
 
267
        return checkOption(props.getProperty("coherencyTestParserNamespace"));
 
268
    }
 
269
 
 
270
    public String getComplexValidationDataParentStructVariableName() {
 
271
        return checkOption(props.getProperty("complexValidationDataParentStructVariableName"));
 
272
    }
 
273
 
 
274
    public String getComplexValidationDataStateMachineStructMemberType() {
 
275
        return checkOption(props.getProperty("complexValidationDataStateMachineStructMemberType"));
 
276
    }
 
277
 
 
278
    public String getComplexValidationDataStructVariableName() {
 
279
        return checkOption(props.getProperty("complexValidationDataStructVariableName"));
 
280
    }
 
281
 
 
282
    public String getComplexValidationStateMachineStructMember() {
 
283
        return checkOption(props.getProperty("complexValidationStateMachineStructMember"));
 
284
    }
 
285
 
 
286
    public String getConvenienceDataMethodLengthParameterName() {
 
287
        return checkOption(props.getProperty("convenienceDataMethodLengthParameterName"));
 
288
    }
 
289
 
 
290
    public String getConvenienceDataMethodValueParameterName() {
 
291
        return checkOption(props.getProperty("convenienceDataMethodValueParameterName"));
 
292
    }
 
293
 
 
294
    public String getCppEnumTypePrefix() {
 
295
        return checkOption(props.getProperty("cppEnumTypePrefix"));
 
296
    }
 
297
 
 
298
    public Map<String, String> getCppStructMemberNameMapping() {
 
299
        return cppStructMemberNameMapping;
 
300
    }
 
301
 
 
302
    public String getCppUnionTypePrefix() {
 
303
        return checkOption(props.getProperty("cppUnionTypePrefix"));
 
304
    }
 
305
 
 
306
    public boolean getDebug() {
 
307
        // return true;
 
308
        return false;
 
309
    }
 
310
 
 
311
    /**
 
312
     * Returns configured delimiter for concatenated element names.
 
313
     * 
 
314
     * @note Must be changed in C++, too!
 
315
     * 
 
316
     * @return Delimiter.
 
317
     */
 
318
    public String getElementNameDelimiter() {
 
319
        return checkOption(props.getProperty("elementNameDelimiter"));
 
320
    }
 
321
 
 
322
    public Map<String, String> getElementNameMapping() {
 
323
        return elementNameMapping;
 
324
    }
 
325
 
 
326
    public String getEndMethodPrefix() {
 
327
        return checkOption(props.getProperty("endMethodPrefix"));
 
328
    }
 
329
 
 
330
    public String getEnumCountName() {
 
331
        return checkOption(props.getProperty("enumCountName"));
 
332
    }
 
333
 
 
334
    public String getEnumFuncPrefixCharData() {
 
335
        return checkOption(props.getProperty("enumFuncPrefixCharData"));
 
336
    }
 
337
 
 
338
    public String getEnumFuncPrefixDataEnd() {
 
339
        return checkOption(props.getProperty("enumFuncPrefixDataEnd"));
 
340
    }
 
341
 
 
342
    public String getEnumFuncPrefixDataPrefix() {
 
343
        return checkOption(props.getProperty("enumFuncPrefixDataPrefix"));
 
344
    }
 
345
 
 
346
    public String getEnumFuncPrefixToEnum() {
 
347
        return checkOption(props.getProperty("enumFuncPrefixToEnum"));
 
348
    }
 
349
 
 
350
    public String getEnumMapNameSuffix() {
 
351
        return checkOption(props.getProperty("enumMapNameSuffix"));
 
352
    }
 
353
 
 
354
    public String getEnumMapPairType() {
 
355
        return checkOption(props.getProperty("enumMapPairType"));
 
356
    }
 
357
 
 
358
    public String getEnumNotPresentName() {
 
359
        return checkOption(props.getProperty("enumNotPresentName"));
 
360
    }
 
361
 
 
362
    public String getEnumTypeNameMappingFile() {
 
363
        return checkOption(props.getProperty("enumTypeNameMappingFile"));
 
364
    }
 
365
 
 
366
    public String getExampleClassName() {
 
367
        return checkOption(props.getProperty("exampleClassName"));
 
368
    }
 
369
 
 
370
    public String getExampleNamespace() {
 
371
        return checkOption(props.getProperty("exampleNamespace"));
 
372
    }
 
373
 
 
374
    public String getFprintfCtorParas() {
 
375
        return checkOption(props.getProperty("fprintfCtorParas"));
 
376
    }
 
377
 
 
378
    public String getFPrintfParserClassName() {
 
379
        return checkOption(props.getProperty("fPrintfParserClassName"));
 
380
    }
 
381
 
 
382
    public String getFprintfParserFileMemberName() {
 
383
        return checkOption(props.getProperty("fprintfParserFileMemberName"));
 
384
    }
 
385
 
 
386
    public String getFPrintfParserNamespace() {
 
387
        return checkOption(props.getProperty("fPrintfParserNamespace"));
 
388
    }
 
389
 
 
390
    public String getFprintfParserPrintDoubleMethodName() {
 
391
        return checkOption(props.getProperty("fprintfParserPrintDoubleMethodName"));
 
392
    }
 
393
 
 
394
    public String getFprintfParserPrintFloatMethodName() {
 
395
        return checkOption(props.getProperty("fprintfParserPrintFloatMethodName"));
 
396
    }
 
397
 
 
398
    public String getFprintfParserPrintFloatMethodParameterName() {
 
399
        return checkOption(props.getProperty("fprintfParserPrintFloatMethodParameterName"));
 
400
    }
 
401
 
 
402
    public String getFprintfParserPrintFloatTemplateMethodName() {
 
403
        return checkOption(props.getProperty("fprintfParserPrintFloatMethodName"));
 
404
    }
 
405
 
 
406
    public boolean getGenerateCoherencyTestParser() {
 
407
        return generateCoherencyTestParser;
 
408
    }
 
409
 
 
410
    public boolean getGenerateExampleParser() {
 
411
        return generateExampleParser;
 
412
    }
 
413
 
 
414
    public boolean getGenerateFprintfParser() {
 
415
        return generateFprintfParser;
 
416
    }
 
417
 
 
418
    public List<String> getIncludeFilesForEnumsHeader() {
 
419
        return includeFilesForEnumsHeader;
 
420
    }
 
421
 
 
422
    public List<String> getIncludeFilesForEnumsSource() {
 
423
        return includeFilesForEnumsSource;
 
424
    }
 
425
 
 
426
    public List<String> getIncludeFilesForImpl() {
 
427
        return includeFilesForImpl;
 
428
    }
 
429
 
 
430
    public List<String> getIncludeFilesForPrivateHeader() {
 
431
        return includeFilesForPrivateHeader;
 
432
    }
 
433
 
 
434
    public String getIncludePrecompiledHeader() {
 
435
        return checkOption(props.getProperty("includePrecompiledHeader"));
 
436
    }
 
437
 
 
438
    public String getIndentation() {
 
439
        return checkOption(props.getProperty("indentation"));
 
440
    }
 
441
 
 
442
    public String getInputFile() {
 
443
        return checkOption(props.getProperty("inputFile"));
 
444
    }
 
445
 
 
446
    public int getMaxTemplateResolvingIterations() {
 
447
        return maxTemplateResolvingIterations;
 
448
    }
 
449
 
 
450
    public String getNamespace() {
 
451
        return checkOption(props.getProperty("namespace"));
 
452
    }
 
453
 
 
454
    public String getOutFileHeader() {
 
455
        return checkOption(props.getProperty("outFileHeader"));
 
456
    }
 
457
 
 
458
    public String getOutputAttributesFileName() {
 
459
        String baseName = getBaseFileName(getOutputHeaderFileNamePublic());
 
460
        return baseName + getOutputAttributesFileSuffix() + ".h";
 
461
    }
 
462
 
 
463
    public String getOutputAttributesFileSuffix() {
 
464
        return checkOption(props.getProperty("outputAttributesFileSuffix"));
 
465
    }
 
466
 
 
467
    public String getOutputCoherencyTestHeaderFileName() {
 
468
        return checkOption(props.getProperty("outputCoherencyTestHeaderFileName"));
 
469
    }
 
470
 
 
471
    public String getOutputCoherencyTestSourceFileName() {
 
472
        return checkOption(props.getProperty("outputCoherencyTestSourceFileName"));
 
473
    }
 
474
 
 
475
    public String getOutputEnumHeaderFileName() {
 
476
        String baseName = getBaseFileName(getOutputHeaderFileNamePublic());
 
477
        return baseName + getOutputEnumsFileSuffix() + ".h";
 
478
    }
 
479
 
 
480
    public String getOutputEnumsFileSuffix() {
 
481
        return checkOption(props.getProperty("outputEnumsFileSuffix"));
 
482
    }
 
483
 
 
484
    public String getOutputEnumSourceFileName() {
 
485
        String sourceOutFileBase = getOutputSourceFileNameBase();
 
486
        return sourceOutFileBase + getOutputEnumsFileSuffix() + ".cpp";
 
487
    }
 
488
 
 
489
    public String getOutputExampleHeaderFileName() {
 
490
        return checkOption(props.getProperty("outputExampleHeaderFileName"));
 
491
    }
 
492
 
 
493
    public String getOutputExampleSourceFileName() {
 
494
        return checkOption(props.getProperty("outputExampleSourceFileName"));
 
495
    }
 
496
 
 
497
    public String getOutputFindElementHashFileName() {
 
498
        String sourceOutFileBase = getOutputSourceFileNameBase();
 
499
        return sourceOutFileBase + getOutputFindElementHashFileSuffix() + ".cpp";
 
500
    }
 
501
 
 
502
    public String getOutputFindElementHashFileSuffix() {
 
503
        return checkOption(props.getProperty("outputFindElementHashFileSuffix"));
 
504
    }
 
505
 
 
506
    public String getOutputFPrintfHeaderFileName() {
 
507
        return checkOption(props.getProperty("outputFPrintfHeaderFileName"));
 
508
    }
 
509
 
 
510
    public String getOutputFPrintfSourceFileName() {
 
511
        return checkOption(props.getProperty("outputFPrintfSourceFileName"));
 
512
    }
 
513
 
 
514
    public String getOutputFunctionMapFactoryFileSuffix() {
 
515
        return checkOption(props.getProperty("outputFunctionMapFactoryFileSuffix"));
 
516
    }
 
517
 
 
518
    public String getOutputFunctionMapFactoryHeaderFileName() {
 
519
        String baseName = getBaseFileName(getOutputHeaderFileNamePublic());
 
520
        return baseName + getOutputFunctionMapFactoryFileSuffix() + ".h";
 
521
    }
 
522
 
 
523
    public String getOutputFunctionMapFactorySourceFileName() {
 
524
        String sourceOutFileBase = getOutputSourceFileNameBase();
 
525
        return sourceOutFileBase + getOutputFunctionMapFactoryFileSuffix() + ".cpp";
 
526
    }
 
527
 
 
528
    public String getOutputFunctionMapFileName() {
 
529
        String sourceOutFileBase = getOutputSourceFileNameBase();
 
530
        return sourceOutFileBase + getOutputFunctionMapFileSuffix() + ".cpp";
 
531
    }
 
532
 
 
533
    public String getOutputFunctionMapFileSuffix() {
 
534
        return checkOption(props.getProperty("outputFunctionMapFileSuffix"));
 
535
    }
 
536
 
 
537
    public String getOutputHeaderFileNamePrivate() {
 
538
        return checkOption(props.getProperty("outputHeaderFileNamePrivate"));
 
539
    }
 
540
 
 
541
    public String getOutputHeaderFileNamePublic() {
 
542
        return checkOption(props.getProperty("outputHeaderFileNamePublic"));
 
543
    }
 
544
 
 
545
    public String getOutputNameMapFileName() {
 
546
        String sourceOutFileBase = getOutputSourceFileNameBase();
 
547
        return sourceOutFileBase + getOutputNameMapFileSuffix() + ".cpp";
 
548
    }
 
549
 
 
550
    public String getOutputNameMapFileSuffix() {
 
551
        return checkOption(props.getProperty("outputNameMapFileSuffix"));
 
552
    }
 
553
 
 
554
    public String getOutputSourceFileMethodDelimiter() {
 
555
        return checkOption(props.getProperty("outputSourceFileMethodDelimiter"));
 
556
    }
 
557
 
 
558
    public String getOutputSourceFileNameBase() {
 
559
        return getBaseFileName(getOutputSourceFileNamePrivate());
 
560
    }
 
561
 
 
562
    public String getOutputSourceFileNamePrivate() {
 
563
        return checkOption(props.getProperty("outputSourceFileNamePrivate"));
 
564
    }
 
565
 
 
566
    public String getOutputValidationDataFileSuffix() {
 
567
        return checkOption(props.getProperty("outputValidationDataFileSuffix"));
 
568
    }
 
569
 
 
570
    public String getOutputValidationDataHeaderFileName() {
 
571
        String baseName = getBaseFileName(getOutputHeaderFileNamePublic());
 
572
        return baseName + getOutputValidationDataFileSuffix() + ".h";
 
573
    }
 
574
 
 
575
    public String getOutputValidationFileSuffix() {
 
576
        return checkOption(props.getProperty("outputValidationFileSuffix"));
 
577
    }
 
578
 
 
579
    public String getOutputValidationSourceFileName() {
 
580
        String sourceOutFileBase = getOutputSourceFileNameBase();
 
581
        return sourceOutFileBase + getOutputValidationFileSuffix() + ".cpp";
 
582
    }
 
583
 
 
584
    public String getPcreInitialNameCharacters() {
 
585
        return checkOption(props.getProperty("pcreInitialNameCharacters"));
 
586
    }
 
587
 
 
588
    public String getPcreInitialNameCharactersWithoutColon() {
 
589
        return checkOption(props.getProperty("pcreInitialNameCharactersWithoutColon"));
 
590
    }
 
591
 
 
592
    public String getPcreInitialNameCharactersWithoutColonAndDot() {
 
593
        return checkOption(props.getProperty("pcreInitialNameCharactersWithoutColonAndDot"));
 
594
    }
 
595
 
 
596
    public String getPcreNameCharacters() {
 
597
        return checkOption(props.getProperty("pcreNameCharacters"));
 
598
    }
 
599
 
 
600
    public String getPcreNameCharactersWithoutColon() {
 
601
        return checkOption(props.getProperty("pcreNameCharactersWithoutColon"));
 
602
    }
 
603
 
 
604
    public String getPublicImplMember() {
 
605
        return checkOption(props.getProperty("publicImplMember"));
 
606
    }
 
607
 
 
608
    public String getRootElementName() {
 
609
        return checkOption(props.getProperty("rootElementName"));
 
610
    }
 
611
 
 
612
    public String getSimpleTypeDefaultCpp() {
 
613
        return checkOption(props.getProperty("simpleTypeDefaultCpp"));
 
614
    }
 
615
 
 
616
    public String getSimpleValidationFunctionLengthParameterName() {
 
617
        return checkOption(props.getProperty("simpleValidationFunctionLengthParameterName"));
 
618
    }
 
619
 
 
620
    public String getSimpleValidationFunctionLengthParameterType() {
 
621
        return checkOption(props.getProperty("simpleValidationFunctionLengthParameterType"));
 
622
    }
 
623
 
 
624
    public String getSimpleValidationFunctionPrefix() {
 
625
        return checkOption(props.getProperty("simpleValidationFunctionPrefix"));
 
626
    }
 
627
 
 
628
    public String getSimpleValidationFunctionReturnType() {
 
629
        return checkOption(props.getProperty("simpleValidationFunctionReturnType"));
 
630
    }
 
631
 
 
632
    public String getSimpleValidationFunctionStreamEndSuffix() {
 
633
        return checkOption(props.getProperty("simpleValidationFunctionStreamEndSuffix"));
 
634
    }
 
635
 
 
636
    public String getSimpleValidationFunctionStreamSuffix() {
 
637
        return checkOption(props.getProperty("simpleValidationFunctionStreamSuffix"));
 
638
    }
 
639
 
 
640
    public String getSimpleValidationFunctionValueParameterName() {
 
641
        return checkOption(props.getProperty("simpleValidationFunctionValueParameterName"));
 
642
    }
 
643
 
 
644
    public String getSimpleValidationStreamCountStructMember() {
 
645
        return checkOption(props.getProperty("simpleValidationStreamCountStructMember"));
 
646
    }
 
647
 
 
648
    public List<String> getSpecialFunctionMapsStartElementNamesAllLevels() {
 
649
        return specialFunctionMapsStartElementNamesAllLevels;
 
650
    }
 
651
 
 
652
    public List<String> getSpecialFunctionMapsStartElementNamesOneLevel() {
 
653
        return specialFunctionMapsStartElementNamesOneLevel;
 
654
    }
 
655
 
 
656
    public String getStringListItemValidationFunctionParameter() {
 
657
        return checkOption(props.getProperty("stringListItemValidationFunctionParameter"));
 
658
    }
 
659
 
 
660
    public String getTemplateAttributeAtomicConversion() {
 
661
        return checkOption(codeTemplates.getProperty("AttributeAtomicConversion"));
 
662
    }
 
663
 
 
664
    public String getTemplateAttributeCheckRequiredPresent() {
 
665
        return checkOption(codeTemplates.getProperty("AttributeCheckRequiredPresent"));
 
666
    }
 
667
 
 
668
    public String getTemplateAttributeInitObject() {
 
669
        return checkOption(codeTemplates.getProperty("AttributeInitObject"));
 
670
    }
 
671
 
 
672
    public String getTemplateAttributeInitObjectNoDefaultLHS() {
 
673
        return checkOption(codeTemplates.getProperty("AttributeInitObjectNoDefaultLHS"));
 
674
    }
 
675
 
 
676
    public String getTemplateAttributeInitObjectUnionDefault() {
 
677
        return checkOption(codeTemplates.getProperty("AttributeInitObjectUnionDefault"));
 
678
    }
 
679
 
 
680
    public String getTemplateAttributeInitObjectUnionPreDefault() {
 
681
        return checkOption(codeTemplates.getProperty("AttributeInitObjectUnionPreDefault"));
 
682
    }
 
683
 
 
684
    public String getTemplateAttributeListConversion() {
 
685
        return checkOption(codeTemplates.getProperty("AttributeListConversion"));
 
686
    }
 
687
 
 
688
    public String getTemplateAttributeNotPresentCheck() {
 
689
        return checkOption(codeTemplates.getProperty("AttributeNotPresentCheck"));
 
690
    }
 
691
 
 
692
    public String getTemplateAttributePresentCheck() {
 
693
        return checkOption(codeTemplates.getProperty("AttributePresentCheck"));
 
694
    }
 
695
 
 
696
    public String getTemplateAttributePresentCheckEnumAtomic() {
 
697
        return checkOption(codeTemplates.getProperty("AttributePresentCheckEnumAtomic"));
 
698
    }
 
699
 
 
700
    public String getTemplateAttributePresentCheckStringAtomic() {
 
701
        return checkOption(codeTemplates.getProperty("AttributePresentCheckStringAtomic"));
 
702
    }
 
703
 
 
704
    public String getTemplateAttributePresentSet() {
 
705
        return checkOption(codeTemplates.getProperty("AttributePresentSet"));
 
706
    }
 
707
 
 
708
    public String getTemplateCoherencyTestCheckIdUnique() {
 
709
        return checkOption(codeTemplates.getProperty("CoherencyTestCheckIdUnique"));
 
710
    }
 
711
 
 
712
    public String getTemplateCoherencyTestSimpleCountCheckBegin() {
 
713
        return checkOption(codeTemplates.getProperty("CoherencyTestSimpleCountCheckBegin"));
 
714
    }
 
715
 
 
716
    public String getTemplateCoherencyTestSimpleCountCheckData() {
 
717
        return checkOption(codeTemplates.getProperty("CoherencyTestSimpleCountCheckData"));
 
718
    }
 
719
 
 
720
    public String getTemplateCoherencyTestSimpleCountCheckEnd() {
 
721
        return checkOption(codeTemplates.getProperty("CoherencyTestSimpleCountCheckEnd"));
 
722
    }
 
723
 
 
724
    public String getTemplateComplexValidationBlockClose() {
 
725
        return checkOption(codeTemplates.getProperty("ComplexValidationBlockClose"));
 
726
    }
 
727
 
 
728
    public String getTemplateComplexValidationBlockCloseCompileTimeOnly() {
 
729
        return checkOption(codeTemplates.getProperty("ComplexValidationBlockCloseCompileTimeOnly"));
 
730
    }
 
731
 
 
732
    public String getTemplateComplexValidationBlockElseCompileTime() {
 
733
        return checkOption(codeTemplates.getProperty("ComplexValidationBlockElseCompileTime"));
 
734
    }
 
735
 
 
736
    public String getTemplateComplexValidationBlockElseRunTime() {
 
737
        return checkOption(codeTemplates.getProperty("ComplexValidationBlockElseRunTime"));
 
738
    }
 
739
 
 
740
    public String getTemplateComplexValidationBlockOpen() {
 
741
        return checkOption(codeTemplates.getProperty("ComplexValidationBlockOpen"));
 
742
    }
 
743
 
 
744
    public String getTemplateComplexValidationBlockOpenCompileTimeOnly() {
 
745
        return checkOption(codeTemplates.getProperty("ComplexValidationBlockOpenCompileTimeOnly"));
 
746
    }
 
747
 
 
748
    public String getTemplateComplexValidationCheckMaxOccurence() {
 
749
        return checkOption(codeTemplates.getProperty("ComplexValidationCheckMaxOccurence"));
 
750
    }
 
751
 
 
752
    public String getTemplateComplexValidationCheckMinOccurencOfChildren() {
 
753
        return checkOption(codeTemplates.getProperty("ComplexValidationCheckMinOccurencOfChildren"));
 
754
    }
 
755
 
 
756
    public String getTemplateComplexValidationCheckStateMachine() {
 
757
        return checkOption(codeTemplates.getProperty("ComplexValidationCheckStateMachine"));
 
758
    }
 
759
 
 
760
    public String getTemplateComplexValidationCheckStateMachineEnd() {
 
761
        return checkOption(codeTemplates.getProperty("ComplexValidationCheckStateMachineEnd"));
 
762
    }
 
763
 
 
764
    public String getTemplateComplexValidationCheckStateMachineEndPerState() {
 
765
        return checkOption(codeTemplates.getProperty("ComplexValidationCheckStateMachineEndPerState"));
 
766
    }
 
767
 
 
768
    public String getTemplateComplexValidationCheckStateMachinePerState() {
 
769
        return checkOption(codeTemplates.getProperty("ComplexValidationCheckStateMachinePerState"));
 
770
    }
 
771
 
 
772
    public String getTemplateComplexValidationChildValidateBegin() {
 
773
        return checkOption(codeTemplates.getProperty("ComplexValidationChildValidateBegin"));
 
774
    }
 
775
 
 
776
    public String getTemplateComplexValidationChildValidateBeginNestedModelGroup() {
 
777
        return checkOption(codeTemplates.getProperty("ComplexValidationChildValidateBeginNestedModelGroup"));
 
778
    }
 
779
 
 
780
    public String getTemplateComplexValidationChoiceCheckMinOccurencOfChildren() {
 
781
        return checkOption(codeTemplates.getProperty("ComplexValidationChoiceCheckMinOccurencOfChildren"));
 
782
    }
 
783
 
 
784
    public String getTemplateComplexValidationChoiceCheckOneChildPresent() {
 
785
        return checkOption(codeTemplates.getProperty("ComplexValidationChoiceCheckOneChildPresent"));
 
786
    }
 
787
 
 
788
    public String getTemplateComplexValidationChoiceCheckOneChildPresentPerChild() {
 
789
        return checkOption(codeTemplates.getProperty("ComplexValidationChoiceCheckOneChildPresentPerChild"));
 
790
    }
 
791
 
 
792
    public String getTemplateComplexValidationChoiceCheckSiblilngs() {
 
793
        return checkOption(codeTemplates.getProperty("ComplexValidationChoiceCheckSiblilngs"));
 
794
    }
 
795
 
 
796
    public String getTemplateComplexValidationCreateValidationData() {
 
797
        return checkOption(codeTemplates.getProperty("ComplexValidationCreateValidationData"));
 
798
    }
 
799
 
 
800
    public String getTemplateComplexValidationDeleteValidationData() {
 
801
        return checkOption(codeTemplates.getProperty("ComplexValidationDeleteValidationData"));
 
802
    }
 
803
 
 
804
    public String getTemplateComplexValidationGetTopParentValidationData() {
 
805
        return checkOption(codeTemplates.getProperty("ComplexValidationGetTopParentValidationData"));
 
806
    }
 
807
 
 
808
    public String getTemplateComplexValidationGetTopValidationData() {
 
809
        return checkOption(codeTemplates.getProperty("ComplexValidationGetTopValidationData"));
 
810
    }
 
811
 
 
812
    public String getTemplateComplexValidationIncrementOccurence() {
 
813
        return checkOption(codeTemplates.getProperty("ComplexValidationIncrementOccurence"));
 
814
    }
 
815
 
 
816
    public String getTemplateComplexValidationInitStateMachine() {
 
817
        return checkOption(codeTemplates.getProperty("ComplexValidationInitStateMachine"));
 
818
    }
 
819
 
 
820
    public String getTemplateComplexValidationParentValidateEnd() {
 
821
        return checkOption(codeTemplates.getProperty("ComplexValidationParentValidateEnd"));
 
822
    }
 
823
 
 
824
    public String getTemplateComplexValidationParentValidateEndNestedModelGroups() {
 
825
        return checkOption(codeTemplates.getProperty("ComplexValidationParentValidateEndNestedModelGroups"));
 
826
    }
 
827
 
 
828
    public String getTemplateComplexValidationSequCheckNext() {
 
829
        return checkOption(codeTemplates.getProperty("ComplexValidationSequCheckNext"));
 
830
    }
 
831
 
 
832
    public String getTemplateComplexValidationSequCheckPrev() {
 
833
        return checkOption(codeTemplates.getProperty("ComplexValidationSequCheckPrev"));
 
834
    }
 
835
 
 
836
    public String getTemplateComplexValidationSetStateMachineState() {
 
837
        return checkOption(codeTemplates.getProperty("ComplexValidationSetStateMachineState"));
 
838
    }
 
839
 
 
840
    public String getTemplateDataAtomicConversion() {
 
841
        return checkOption(codeTemplates.getProperty("DataAtomicConversion"));
 
842
    }
 
843
 
 
844
    public String getTemplateDataAtomicDataMethod() {
 
845
        return checkOption(codeTemplates.getProperty("DataAtomicDataMethod"));
 
846
    }
 
847
 
 
848
    public String getTemplateDataListConversion() {
 
849
        return checkOption(codeTemplates.getProperty("DataListConversion"));
 
850
    }
 
851
 
 
852
    public String getTemplateDataListValidateEnd() {
 
853
        return checkOption(codeTemplates.getProperty("DataListValidateEnd"));
 
854
    }
 
855
 
 
856
    public String getTemplateDisableWarningUnused() {
 
857
        return checkOption(codeTemplates.getProperty("DisableWarningUnused"));
 
858
    }
 
859
 
 
860
    public String getTemplateEnumDataAtomicConversion() {
 
861
        return checkOption(codeTemplates.getProperty("EnumDataAtomicConversion"));
 
862
    }
 
863
 
 
864
    /**
 
865
     * <pre>
 
866
     * bool characterData2EnumData_stringEnumType(const ParserChar* text, 
 
867
     *                                            size_t textLength, 
 
868
     *                                            bool ( ColladaParserAutoGen::*dataFunction ) (const stringEnumType* data, size_t dataLength )
 
869
     *                                            );
 
870
     * 
 
871
     * </pre>
 
872
     */
 
873
    public String getTemplateEnumFuncCharDataDecl() {
 
874
        return checkOption(codeTemplates.getProperty("EnumFuncCharDataDecl"));
 
875
    }
 
876
 
 
877
    /**
 
878
     * <pre>
 
879
     * return characterData2EnumData&lt;stringEnumType, StringHash, stringEnumType__COUNT&gt;(text, textLength, dataFunction, stringEnumTypeMap, &amp;Utils::calculateStringHash, &amp;toEnum_stringEnumType, &amp;ColladaParserAutoGenPrivate::toEnumDataPrefix_stringEnumType);
 
880
     * </pre>
 
881
     */
 
882
    public String getTemplateEnumFuncCharDataImpl() {
 
883
        return checkOption(codeTemplates.getProperty("EnumFuncCharDataImpl"));
 
884
    }
 
885
 
 
886
    /**
 
887
     * <pre>
 
888
     * bool dataEnumEnd_stringEnumType(bool ( ColladaParserAutoGen::*dataFunction ) (const stringEnumType* data, size_t dataLength ),
 
889
     *                                 const std::pair&lt;StringHash, stringEnumType&gt;* enumMap,
 
890
     *                                 StringHash (*baseConversionFunctionPtr)(const ParserChar** buffer, const ParserChar* bufferEnd, bool&amp; failed),
 
891
     *                                 stringEnumType (*toEnum)( const ParserChar** buffer, 
 
892
     *                                     const ParserChar* bufferEnd,
 
893
     *                                     bool&amp; failed, 
 
894
     *                                     const std::pair&lt;StringHash, stringEnumType&gt;* enumMap,
 
895
     *                                     StringHash (*baseConversionFunctionPtr)(const ParserChar** buffer, const ParserChar* bufferEnd, bool&amp; failed)
 
896
     *                                 ));
 
897
     * 
 
898
     * </pre>
 
899
     */
 
900
    public String getTemplateEnumFuncDataEndDecl() {
 
901
        return checkOption(codeTemplates.getProperty("EnumFuncDataEndDecl"));
 
902
    }
 
903
 
 
904
    /**
 
905
     * <pre>
 
906
     * return dataEnumEnd&lt;stringEnumType, StringHash, stringEnumType__COUNT&gt;(dataFunction, enumMap, baseConversionFunctionPtr, toEnum);
 
907
     * </pre>
 
908
     */
 
909
    public String getTemplateEnumFuncDataEndImpl() {
 
910
        return checkOption(codeTemplates.getProperty("EnumFuncDataEndImpl"));
 
911
    }
 
912
 
 
913
    /**
 
914
     * <pre>
 
915
     * stringEnumType toEnumDataPrefix_stringEnumType(const ParserChar* prefixedBuffer,
 
916
     *                                                const ParserChar* prefixedBufferEnd,
 
917
     *                                                const ParserChar** buffer,
 
918
     *                                                const ParserChar* bufferEnd, 
 
919
     *                                                bool&amp; failed,
 
920
     *                                                const std::pair&lt;StringHash, stringEnumType&gt;* enumMap,
 
921
     *                                                StringHash (*baseConversionFunctionPtr)(const ParserChar** buffer, const ParserChar* bufferEnd, bool&amp; failed)
 
922
     *                                                );
 
923
     * 
 
924
     * </pre>
 
925
     */
 
926
    public String getTemplateEnumFuncDataPrefixDecl() {
 
927
        return checkOption(codeTemplates.getProperty("EnumFuncDataPrefixDecl"));
 
928
    }
 
929
 
 
930
    /**
 
931
     * <pre>
 
932
     * return toEnumDataPrefix&lt;stringEnumType, StringHash, stringEnumType__COUNT, &amp;toEnum_stringEnumType&gt;(prefixedBuffer, prefixedBufferEnd, buffer, bufferEnd, failed, stringEnumTypeMap, Utils::calculateStringHash);
 
933
     * </pre>
 
934
     */
 
935
    public String getTemplateEnumFuncDataPrefixImpl() {
 
936
        return checkOption(codeTemplates.getProperty("EnumFuncDataPrefixImpl"));
 
937
    }
 
938
 
 
939
    /**
 
940
     * <pre>
 
941
     * stringEnumType toEnum_stringEnumType(const ParserChar** buffer,
 
942
     *                                      const ParserChar* bufferEnd,
 
943
     *                                      bool&amp; failed,
 
944
     *                                      const std::pair&lt;StringHash, stringEnumType&gt;* stringEnumTypeMap,
 
945
     *                                      StringHash (*calculateStringHash)( const ParserChar**, const ParserChar*, bool&amp; )
 
946
     *                                      );
 
947
     * </pre>
 
948
     */
 
949
    public String getTemplateEnumFuncToEnumDecl() {
 
950
        return checkOption(codeTemplates.getProperty("EnumFuncToEnumDecl"));
 
951
    }
 
952
 
 
953
    /**
 
954
     * 
 
955
     * <pre>
 
956
     * return Utils::toEnum&lt;stringEnumType, StringHash, stringEnumType__COUNT&gt;(buffer, bufferEnd, failed, stringEnumTypeMap, calculateStringHash);
 
957
     * </pre>
 
958
     */
 
959
    public String getTemplateEnumFuncToEnumImpl() {
 
960
        return checkOption(codeTemplates.getProperty("EnumFuncToEnumImpl"));
 
961
    }
 
962
 
 
963
    public String getTemplateEnumMapDeclaration() {
 
964
        return checkOption(codeTemplates.getProperty("EnumMapDeclaration"));
 
965
    }
 
966
 
 
967
    public String getTemplateEnumMapDefinitionStart() {
 
968
        return checkOption(codeTemplates.getProperty("EnumMapDefinitionStart"));
 
969
    }
 
970
 
 
971
    public String getTemplateEnumMapEntry() {
 
972
        return checkOption(codeTemplates.getProperty("EnumMapEntry"));
 
973
    }
 
974
 
 
975
    public String getTemplateEnumMapEntryType() {
 
976
        return checkOption(codeTemplates.getProperty("EnumMapEntryType"));
 
977
    }
 
978
 
 
979
    public String getTemplateFindHashSetValues() {
 
980
        return checkOption(codeTemplates.getProperty("FindHashSetValues"));
 
981
    }
 
982
 
 
983
    public String getTemplateFprintfCloseFile() {
 
984
        return checkOption(codeTemplates.getProperty("FprintfCloseFile"));
 
985
    }
 
986
 
 
987
    public String getTemplateFprintfOpenFile() {
 
988
        return checkOption(codeTemplates.getProperty("FprintfOpenFile"));
 
989
    }
 
990
 
 
991
    public String getTemplateFprintfPrintDouble() {
 
992
        return checkOption(codeTemplates.getProperty("FprintfPrintDouble"));
 
993
    }
 
994
 
 
995
    public String getTemplateFprintfPrintFloat() {
 
996
        return checkOption(codeTemplates.getProperty("FprintfPrintFloat"));
 
997
    }
 
998
 
 
999
    public String getTemplateFprintfPrintFloatTemplate() {
 
1000
        return checkOption(codeTemplates.getProperty("FprintfPrintFloatTemplate"));
 
1001
    }
 
1002
 
 
1003
    public String getTemplateFprintfUnknownAttributes() {
 
1004
        return checkOption(codeTemplates.getProperty("FprintfUnknownAttributes"));
 
1005
    }
 
1006
 
 
1007
    public String getTemplateFprintfUnknownElementBegin() {
 
1008
        return checkOption(codeTemplates.getProperty("FprintfUnknownElementBegin"));
 
1009
    }
 
1010
 
 
1011
    public String getTemplateFprintfUnknownElementData() {
 
1012
        return checkOption(codeTemplates.getProperty("FprintfUnknownElementData"));
 
1013
    }
 
1014
 
 
1015
    public String getTemplateFprintfUnknownElementEnd() {
 
1016
        return checkOption(codeTemplates.getProperty("FprintfUnknownElementEnd"));
 
1017
    }
 
1018
 
 
1019
    public String getTemplateFreeAttrList() {
 
1020
        return checkOption(codeTemplates.getProperty("FreeAttrList"));
 
1021
    }
 
1022
 
 
1023
    public String getTemplateFreeAttrStruct() {
 
1024
        return checkOption(codeTemplates.getProperty("FreeAttrStruct"));
 
1025
    }
 
1026
 
 
1027
    public String getTemplateFreeUnknownAttributes() {
 
1028
        return checkOption(codeTemplates.getProperty("FreeUnknownAttributes"));
 
1029
    }
 
1030
 
 
1031
    public String getTemplateParseAttrDefaultXMLNS() {
 
1032
        return checkOption(codeTemplates.getProperty("ParseAttrDefaultXMLNS"));
 
1033
    }
 
1034
 
 
1035
    public String getTemplateParseAttrXMLNS() {
 
1036
        return checkOption(codeTemplates.getProperty("ParseAttrXMLNS"));
 
1037
    }
 
1038
 
 
1039
    public String getTemplateSimpleValidationDefaultReturn() {
 
1040
        return checkOption(codeTemplates.getProperty("SimpleValidationDefaultReturn"));
 
1041
    }
 
1042
 
 
1043
    public String getTemplateSimpleValidationDeleteValidationDataNoValidation() {
 
1044
        return checkOption(codeTemplates.getProperty("SimpleValidationDeleteValidationDataNoValidation"));
 
1045
    }
 
1046
 
 
1047
    public String getTemplateSimpleValidationGetCountStructMemberNoValidation() {
 
1048
        return checkOption(codeTemplates.getProperty("SimpleValidationGetCountStructMemberNoValidation"));
 
1049
    }
 
1050
 
 
1051
    public String getTemplateSimpleValidationGetCountStructMemberValidation() {
 
1052
        return checkOption(codeTemplates.getProperty("SimpleValidationGetCountStructMemberValidation"));
 
1053
    }
 
1054
 
 
1055
    public String getTemplateSimpleValidationGetValidationDataNoValidation() {
 
1056
        return checkOption(codeTemplates.getProperty("SimpleValidationGetValidationDataNoValidation"));
 
1057
    }
 
1058
 
 
1059
    public String getTemplateSimpleValidationLength() {
 
1060
        return checkOption(codeTemplates.getProperty("SimpleValidationLength"));
 
1061
    }
 
1062
 
 
1063
    public String getTemplateSimpleValidationLengthStream() {
 
1064
        return checkOption(codeTemplates.getProperty("SimpleValidationLengthStream"));
 
1065
    }
 
1066
 
 
1067
    public String getTemplateSimpleValidationLengthStreamEnd() {
 
1068
        return checkOption(codeTemplates.getProperty("SimpleValidationLengthStreamEnd"));
 
1069
    }
 
1070
 
 
1071
    public String getTemplateSimpleValidationMaxExclusive() {
 
1072
        return checkOption(codeTemplates.getProperty("SimpleValidationMaxExclusive"));
 
1073
    }
 
1074
 
 
1075
    public String getTemplateSimpleValidationMaxInclusive() {
 
1076
        return checkOption(codeTemplates.getProperty("SimpleValidationMaxInclusive"));
 
1077
    }
 
1078
 
 
1079
    public String getTemplateSimpleValidationMaxLength() {
 
1080
        return checkOption(codeTemplates.getProperty("SimpleValidationMaxLength"));
 
1081
    }
 
1082
 
 
1083
    public String getTemplateSimpleValidationMaxLengthStream() {
 
1084
        return checkOption(codeTemplates.getProperty("SimpleValidationMaxLengthStream"));
 
1085
    }
 
1086
 
 
1087
    public String getTemplateSimpleValidationMaxLengthStreamEnd() {
 
1088
        return checkOption(codeTemplates.getProperty("SimpleValidationMaxLengthStreamEnd"));
 
1089
    }
 
1090
 
 
1091
    public String getTemplateSimpleValidationMinExclusive() {
 
1092
        return checkOption(codeTemplates.getProperty("SimpleValidationMinExclusive"));
 
1093
    }
 
1094
 
 
1095
    public String getTemplateSimpleValidationMinInclusive() {
 
1096
        return checkOption(codeTemplates.getProperty("SimpleValidationMinInclusive"));
 
1097
    }
 
1098
 
 
1099
    public String getTemplateSimpleValidationMinLength() {
 
1100
        return checkOption(codeTemplates.getProperty("SimpleValidationMinLength"));
 
1101
    }
 
1102
 
 
1103
    public String getTemplateSimpleValidationMinLengthStream() {
 
1104
        return checkOption(codeTemplates.getProperty("SimpleValidationMinLengthStream"));
 
1105
    }
 
1106
 
 
1107
    public String getTemplateSimpleValidationMinLengthStreamEnd() {
 
1108
        return checkOption(codeTemplates.getProperty("SimpleValidationMinLengthStreamEnd"));
 
1109
    }
 
1110
 
 
1111
    public String getTemplateSimpleValidationNumericAtomicAttribute() {
 
1112
        return checkOption(codeTemplates.getProperty("SimpleValidationNumericAtomicAttribute"));
 
1113
    }
 
1114
 
 
1115
    public String getTemplateSimpleValidationNumericAtomicData() {
 
1116
        return checkOption(codeTemplates.getProperty("SimpleValidationNumericAtomicData"));
 
1117
    }
 
1118
 
 
1119
    public String getTemplateSimpleValidationNumericListAttribute() {
 
1120
        return checkOption(codeTemplates.getProperty("SimpleValidationNumericListAttribute"));
 
1121
    }
 
1122
 
 
1123
    public String getTemplateSimpleValidationNumericListData() {
 
1124
        return checkOption(codeTemplates.getProperty("SimpleValidationNumericListData"));
 
1125
    }
 
1126
 
 
1127
    public String getTemplateSimpleValidationNumericListDataEnd() {
 
1128
        return checkOption(codeTemplates.getProperty("SimpleValidationNumericListDataEnd"));
 
1129
    }
 
1130
 
 
1131
    public String getTemplateSimpleValidationPattern() {
 
1132
        return checkOption(codeTemplates.getProperty("SimpleValidationPattern"));
 
1133
    }
 
1134
 
 
1135
    public String getTemplateSimpleValidationSpecialStreamEndVali() {
 
1136
        return checkOption(codeTemplates.getProperty("SimpleValidationSpecialStreamEndVali"));
 
1137
    }
 
1138
 
 
1139
    public String getTemplateSimpleValidationSpecialStreamEndValiHandleError() {
 
1140
        return checkOption(codeTemplates.getProperty("SimpleValidationSpecialStreamEndValiHandleError"));
 
1141
    }
 
1142
 
 
1143
    public String getTemplateSimpleValidationStringAtomicAttribute() {
 
1144
        return checkOption(codeTemplates.getProperty("SimpleValidationStringAtomicAttribute"));
 
1145
    }
 
1146
 
 
1147
    public String getTemplateSimpleValidationStringAtomicData() {
 
1148
        return checkOption(codeTemplates.getProperty("SimpleValidationStringAtomicData"));
 
1149
    }
 
1150
 
 
1151
    public String getTemplateSimpleValidationStringAtomicDataEnd() {
 
1152
        return checkOption(codeTemplates.getProperty("SimpleValidationStringAtomicDataEnd"));
 
1153
    }
 
1154
 
 
1155
    public String getTemplateSimpleValidationStringListAttribute() {
 
1156
        return checkOption(codeTemplates.getProperty("SimpleValidationStringListAttribute"));
 
1157
    }
 
1158
 
 
1159
    public String getTemplateSimpleValidationStringListItemImpl() {
 
1160
        return checkOption(codeTemplates.getProperty("SimpleValidationStringListItemImpl"));
 
1161
    }
 
1162
 
 
1163
    public String getTemplateSimpleValidationUpdateStreamCount() {
 
1164
        return checkOption(codeTemplates.getProperty("SimpleValidationUpdateStreamCount"));
 
1165
    }
 
1166
 
 
1167
    public String getTemplateTypeMappingDefaultAttrAtomicXsd2cppRhs() {
 
1168
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultAttrAtomicXsd2cppRhs"));
 
1169
    }
 
1170
 
 
1171
    public String getTemplateTypeMappingDefaultAttrListXsd2cppRhs() {
 
1172
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultAttrListXsd2cppRhs"));
 
1173
    }
 
1174
 
 
1175
    public String getTemplateTypeMappingDefaultDataAtomicConversion() {
 
1176
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultDataAtomicConversion"));
 
1177
    }
 
1178
 
 
1179
    public String getTemplateTypeMappingDefaultDataAtomicDataMethodImpl() {
 
1180
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultDataAtomicDataMethodImpl"));
 
1181
    }
 
1182
 
 
1183
    public String getTemplateTypeMappingDefaultDataAtomicValidateEndFacetPattern() {
 
1184
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultDataAtomicValidateEndFacetPattern"));
 
1185
    }
 
1186
 
 
1187
    public String getTemplateTypeMappingDefaultDataAtomicXsd2cppRhs() {
 
1188
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultDataAtomicXsd2cppRhs"));
 
1189
    }
 
1190
 
 
1191
    public String getTemplateTypeMappingDefaultDataListXsd2cppLhs() {
 
1192
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultDataListXsd2cppLhs"));
 
1193
    }
 
1194
 
 
1195
    public String getTemplateTypeMappingDefaultDataListXsd2cppValidationLhs() {
 
1196
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultDataListXsd2cppValidationLhs"));
 
1197
    }
 
1198
 
 
1199
    public String getTemplateTypeMappingDefaultEnumSringAttrAtomicXsd2cpp() {
 
1200
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultEnumSringAttrAtomicXsd2cpp"));
 
1201
    }
 
1202
 
 
1203
    public String getTemplateTypeMappingDefaultEnumSringDataAtomicXsd2cpp() {
 
1204
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultEnumSringDataAtomicXsd2cpp"));
 
1205
    }
 
1206
 
 
1207
    public String getTemplateTypeMappingDefaultEnumSringDataListDataend() {
 
1208
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultEnumSringDataListDataend"));
 
1209
    }
 
1210
 
 
1211
    public String getTemplateTypeMappingDefaultEnumSringDataListXsd2cpp() {
 
1212
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultEnumSringDataListXsd2cpp"));
 
1213
    }
 
1214
 
 
1215
    public String getTemplateTypeMappingDefaultPostAttrAtomicXsd2cpp() {
 
1216
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultPostAttrAtomicXsd2cpp"));
 
1217
    }
 
1218
 
 
1219
    public String getTemplateTypeMappingDefaultPostDataAtomicXsd2cpp() {
 
1220
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultPostDataAtomicXsd2cpp"));
 
1221
    }
 
1222
 
 
1223
    public String getTemplateTypeMappingDefaultPreAttrAtomicXsd2cpp() {
 
1224
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultPreAttrAtomicXsd2cpp"));
 
1225
    }
 
1226
 
 
1227
    public String getTemplateTypeMappingDefaultPreDataAtomicXsd2cpp() {
 
1228
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultPreDataAtomicXsd2cpp"));
 
1229
    }
 
1230
 
 
1231
    public String getTemplateTypeMappingDefaultSringDataXsd2cpp() {
 
1232
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultSringDataXsd2cpp"));
 
1233
    }
 
1234
 
 
1235
    public String getTemplateTypeMappingDefaultUnionDataAtomicXsd2cppRhs() {
 
1236
        return checkOption(codeTemplates.getProperty("TypeMappingDefaultUnionDataAtomicXsd2cppRhs"));
 
1237
    }
 
1238
 
 
1239
    public String getTemplateUnionAttributeAtomicConversion() {
 
1240
        return checkOption(codeTemplates.getProperty("UnionAttributeAtomicConversion"));
 
1241
    }
 
1242
 
 
1243
    public String getTemplateUnionAttributeAtomicPostXsd2Cpp() {
 
1244
        return checkOption(codeTemplates.getProperty("UnionAttributeAtomicPostXsd2Cpp"));
 
1245
    }
 
1246
 
 
1247
    public String getTemplateUnionAttributeAtomicPreXsd2Cpp() {
 
1248
        return checkOption(codeTemplates.getProperty("UnionAttributeAtomicPreXsd2Cpp"));
 
1249
    }
 
1250
 
 
1251
    public String getTemplateUnionAttributeAtomicXsd2Cpp() {
 
1252
        return checkOption(codeTemplates.getProperty("UnionAttributeAtomicXsd2Cpp"));
 
1253
    }
 
1254
 
 
1255
    public String getTemplateUnionAttributeListType() {
 
1256
        return checkOption(codeTemplates.getProperty("UnionAttributeListType"));
 
1257
    }
 
1258
 
 
1259
    public String getTemplateUnionAttributeListTypeConversionItemValidation() {
 
1260
        return checkOption(codeTemplates.getProperty("UnionAttributeListTypeConversionItemValidation"));
 
1261
    }
 
1262
 
 
1263
    public String getTemplateUnionAttributeListTypeConversionNoItemValidation() {
 
1264
        return checkOption(codeTemplates.getProperty("UnionAttributeListTypeConversionNoItemValidation"));
 
1265
    }
 
1266
 
 
1267
    public String getTemplateUnionDataAtomicConversion() {
 
1268
        return checkOption(codeTemplates.getProperty("UnionDataAtomicConversion"));
 
1269
    }
 
1270
 
 
1271
    public String getTemplateUnionDataAtomicDataMethod() {
 
1272
        return checkOption(codeTemplates.getProperty("UnionDataAtomicDataMethod"));
 
1273
    }
 
1274
 
 
1275
    public String getTemplateUnionDataAtomicDataMethodImpl() {
 
1276
        return checkOption(codeTemplates.getProperty("UnionDataAtomicDataMethodImpl"));
 
1277
    }
 
1278
 
 
1279
    public String getTemplateUnionDataAtomicPostXsd2Cpp() {
 
1280
        return checkOption(codeTemplates.getProperty("UnionDataAtomicPostXsd2Cpp"));
 
1281
    }
 
1282
 
 
1283
    public String getTemplateUnionDataAtomicPreXsd2Cpp() {
 
1284
        return checkOption(codeTemplates.getProperty("UnionDataAtomicPreXsd2Cpp"));
 
1285
    }
 
1286
 
 
1287
    public String getTemplateUnionDataAtomicXsd2Cpp() {
 
1288
        return checkOption(codeTemplates.getProperty("UnionDataAtomicXsd2Cpp"));
 
1289
    }
 
1290
 
 
1291
    public String getTemplateUnionDataListEnd() {
 
1292
        return checkOption(codeTemplates.getProperty("UnionDataListEnd"));
 
1293
    }
 
1294
 
 
1295
    public String getTemplateUnionDataListEndValidation() {
 
1296
        return checkOption(codeTemplates.getProperty("UnionDataListEndValidation"));
 
1297
    }
 
1298
 
 
1299
    public String getTemplateUnionDataListType() {
 
1300
        return checkOption(codeTemplates.getProperty("UnionDataListType"));
 
1301
    }
 
1302
 
 
1303
    public String getTemplateUnionDataListTypeConversion() {
 
1304
        return checkOption(codeTemplates.getProperty("UnionDataListTypeConversion"));
 
1305
    }
 
1306
 
 
1307
    public String getTemplateUnionDataListTypeConversionValidation() {
 
1308
        return checkOption(codeTemplates.getProperty("UnionDataListTypeConversionValidation"));
 
1309
    }
 
1310
 
 
1311
    public String getTemplateUnionEnumMemberConversion() {
 
1312
        return checkOption(codeTemplates.getProperty("UnionEnumMemberConversion"));
 
1313
    }
 
1314
 
 
1315
    public String getTemplateUnionFuncDataPrefixDecl() {
 
1316
        return checkOption(codeTemplates.getProperty("UnionFuncDataPrefixDecl"));
 
1317
    }
 
1318
 
 
1319
    public String getTemplateUnionFuncDataPrefixImpl() {
 
1320
        return checkOption(codeTemplates.getProperty("UnionFuncDataPrefixImpl"));
 
1321
    }
 
1322
 
 
1323
    public String getTemplateUnionFuncToUnionBufferEndPtrDecl() {
 
1324
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionBufferEndPtrDecl"));
 
1325
    }
 
1326
 
 
1327
    public String getTemplateUnionFuncToUnionBufferEndPtrImpl() {
 
1328
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionBufferEndPtrImpl"));
 
1329
    }
 
1330
 
 
1331
    public String getTemplateUnionFuncToUnionDecl() {
 
1332
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionDecl"));
 
1333
    }
 
1334
 
 
1335
    public String getTemplateUnionFuncToUnionImpl() {
 
1336
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionImpl"));
 
1337
    }
 
1338
 
 
1339
    public String getTemplateUnionFuncToUnionNullTermiDecl() {
 
1340
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionNullTermiDecl"));
 
1341
    }
 
1342
 
 
1343
    public String getTemplateUnionFuncToUnionNullTermiImpl() {
 
1344
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionNullTermiImpl"));
 
1345
    }
 
1346
 
 
1347
    public String getTemplateUnionFuncToUnionPerMember() {
 
1348
        return checkOption(codeTemplates.getProperty("UnionFuncToUnionPerMember"));
 
1349
    }
 
1350
 
 
1351
    public String getTemplateUnionMemberTypeConversionFunctionParametersEnumAddon() {
 
1352
        return checkOption(codeTemplates.getProperty("UnionMemberTypeConversionFunctionParametersEnumAddon"));
 
1353
    }
 
1354
 
 
1355
    public String getTemplateValidateBeginPostSwitch() {
 
1356
        return checkOption(codeTemplates.getProperty("ValidateBeginPostSwitch"));
 
1357
    }
 
1358
 
 
1359
    public String getTemplateValidateBeginPreSwitch() {
 
1360
        return checkOption(codeTemplates.getProperty("ValidateBeginPreSwitch"));
 
1361
    }
 
1362
 
 
1363
    public String getTemplateValidateBeginSwitchDefault() {
 
1364
        return checkOption(codeTemplates.getProperty("ValidateBeginSwitchDefault"));
 
1365
    }
 
1366
 
 
1367
    public String getTemplateValidateBeginSwitchDefaultUnknownAttributes() {
 
1368
        return checkOption(codeTemplates.getProperty("ValidateBeginSwitchDefaultUnknownAttributes"));
 
1369
    }
 
1370
 
 
1371
    public String getTypedAttributeDataVariableName() {
 
1372
        return checkOption(props.getProperty("typedAttributeDataVariableName"));
 
1373
    }
 
1374
 
 
1375
    public Map<String, TypeMap> getTypeMapping() {
 
1376
        return typeMapping;
 
1377
    }
 
1378
 
 
1379
    public String getTypeNameMappingSeparator() {
 
1380
        return checkOption(props.getProperty("typeNameMappingSeparator"));
 
1381
    }
 
1382
 
 
1383
    public String getUnionDataMemberName() {
 
1384
        return checkOption(props.getProperty("unionDataMemberName"));
 
1385
    }
 
1386
 
 
1387
    public String getUnionFuncPrefixToUnion() {
 
1388
        return checkOption(props.getProperty("unionFuncPrefixToUnion"));
 
1389
    }
 
1390
 
 
1391
    public String getUnionFuncPrefixToUnionPrefix() {
 
1392
        return checkOption(props.getProperty("unionFuncPrefixToUnionPrefix"));
 
1393
    }
 
1394
 
 
1395
    public String getUnionInvalidTypeName() {
 
1396
        return checkOption(props.getProperty("unionInvalidTypeName"));
 
1397
    }
 
1398
 
 
1399
    public String getUnionMemberTypeConversionFunctionParameters() {
 
1400
        return checkOption(props.getProperty("unionMemberTypeConversionFunctionParameters"));
 
1401
    }
 
1402
 
 
1403
    public String getUnionTypeMemberName() {
 
1404
        return checkOption(props.getProperty("unionTypeMemberName"));
 
1405
    }
 
1406
 
 
1407
    public String getUnknownAttributesMemberInit() {
 
1408
        return checkOption(props.getProperty("unknownAttributesMemberInit"));
 
1409
    }
 
1410
 
 
1411
    public String getUnknownAttributesMemberName() {
 
1412
        return checkOption(props.getProperty("unknownAttributesMemberName"));
 
1413
    }
 
1414
 
 
1415
    public String getUnknownAttributesMemberType() {
 
1416
        return checkOption(props.getProperty("unknownAttributesMemberType"));
 
1417
    }
 
1418
 
 
1419
    public String getUnknownAttributeType() {
 
1420
        return checkOption(props.getProperty("unknownAttributeType"));
 
1421
    }
 
1422
 
 
1423
    public Map<String, String> getUserTypeNameMapping() {
 
1424
        return userTypeNameMapping;
 
1425
    }
 
1426
 
 
1427
    public String getValidationDataStructMemberType() {
 
1428
        return checkOption(props.getProperty("validationDataStructMemberType"));
 
1429
    }
 
1430
 
 
1431
    public String getValidationDataStructSuffix() {
 
1432
        return checkOption(props.getProperty("validationDataStructSuffix"));
 
1433
    }
 
1434
 
 
1435
    public String getWildcardValidationDataStructName() {
 
1436
        return checkOption(props.getProperty("wildcardValidationDataStructName"));
 
1437
    }
 
1438
 
 
1439
    public String getXSNamespace() {
 
1440
        return checkOption(props.getProperty("xsNamespace"));
 
1441
    }
 
1442
 
 
1443
    public Map<String, String> getXsNamespaceMapping() {
 
1444
        return xsNamespaceMapping;
 
1445
    }
 
1446
 
 
1447
    public boolean isTreatXsDoubleAsCppDouble() {
 
1448
        return treatXsDoubleAsCppDouble;
 
1449
    }
 
1450
 
 
1451
    public boolean isTreatXsFloatAsCppFloat() {
 
1452
        return treatXsFloatAsCppFloat;
 
1453
    }
 
1454
 
 
1455
    public boolean isTypeNameMappingGenerationTurnedOn() {
 
1456
        return generateTypeNameMapping;
 
1457
    }
 
1458
 
 
1459
    protected List<String> parseListOption(String value) {
 
1460
        List<String> list = new ArrayList<String>();
 
1461
        if (value == null) {
 
1462
            return list;
 
1463
        }
 
1464
        String[] split = value.split(" ");
 
1465
        for (String tmp : split) {
 
1466
            list.add(tmp.trim());
 
1467
        }
 
1468
        return list;
 
1469
    }
 
1470
 
 
1471
    protected Map<String, String> parseMapOption(String value) {
 
1472
        Map<String, String> map = new HashMap<String, String>();
 
1473
        if (value == null) {
 
1474
            return map;
 
1475
        }
 
1476
        String[] split = value.split(";");
 
1477
        if (split.length == 1 && split[0].length() == 0) {
 
1478
            return map;
 
1479
        }
 
1480
        for (String tmp : split) {
 
1481
            String[] split2 = tmp.split("=");
 
1482
            if (split2.length != 2) {
 
1483
                System.err.println("illegal map entry: " + tmp);
 
1484
            } else {
 
1485
                String parsedKey = split2[0].trim();
 
1486
                String parsedValue = split2[1].trim();
 
1487
                map.put(parsedKey, parsedValue);
 
1488
            }
 
1489
        }
 
1490
        return map;
 
1491
    }
 
1492
}