2
* Copyright © 2008-2012 NetAllied Systems GmbH, Ravensburg, Germany.
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
8
package de.netallied.xsd2cppsax;
11
import java.util.Stack;
13
import org.apache.xerces.xs.XSElementDeclaration;
14
import org.apache.xerces.xs.XSSimpleTypeDefinition;
15
import org.apache.xerces.xs.XSTypeDefinition;
18
* Provides data required for code generation.
21
public interface IGenerationDataProvider {
24
* Finds C++ type as string. Takes care of simple and complex type, base
27
* @note {@link Generator#fillInTemplate(String, String, String, String, XSTypeDefinition)}
28
* has a copy of this code, as it requires temporary variables.
29
* @note {@link Generator#createDataConvenienceParameterList(XSTypeDefinition)}
30
* does something similar, too.
32
* XSD type to find C++ type for.
35
String findCorrectCppTypeForAttribute(XSTypeDefinition type);
38
* @return Existing elements and their ancestors.
40
Map<String, ElementUsage> getCompleteElementUsage();
43
* @return Configuration.
48
* @return Map of xsd elements to C++ names.
50
Map<XSElementDeclaration, CppElementNameParentTypesPair> getElementNameMapping();
53
* @return Current element stack.
55
Stack<XSElementDeclaration> getElementStack();
58
* @return Object able to create C++ names for enums and unions.
60
CppEnumNameCreator getEnumOrUnionNameCreator();
63
* @return Map of xsd union type to map of C++ member types.
65
Map<XSSimpleTypeDefinition, Map<XSSimpleTypeDefinition, StringPair>> getUnionMemberTypeMap();
68
* @return Map of xsd simple types to their C++ validation function name.
70
Map<XSSimpleTypeDefinition, String> getXsSimpleType2validationFunctionName();
73
* @return Map of xsd type to C++ validation data struct name.
75
Map<XSTypeDefinition, String> getXsType2validationDataStructName();