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

« back to all changes in this revision

Viewing changes to xsd2cppsax/src/de/netallied/xsd2cppsax/IGenerationDataProvider.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.util.Map;
 
11
import java.util.Stack;
 
12
 
 
13
import org.apache.xerces.xs.XSElementDeclaration;
 
14
import org.apache.xerces.xs.XSSimpleTypeDefinition;
 
15
import org.apache.xerces.xs.XSTypeDefinition;
 
16
 
 
17
/**
 
18
 * Provides data required for code generation.
 
19
 * 
 
20
 */
 
21
public interface IGenerationDataProvider {
 
22
 
 
23
    /**
 
24
     * Finds C++ type as string. Takes care of simple and complex type, base
 
25
     * types and variety.
 
26
     * 
 
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.
 
31
     * @param type
 
32
     *            XSD type to find C++ type for.
 
33
     * @return C++ type.
 
34
     */
 
35
    String findCorrectCppTypeForAttribute(XSTypeDefinition type);
 
36
 
 
37
    /**
 
38
     * @return Existing elements and their ancestors.
 
39
     */
 
40
    Map<String, ElementUsage> getCompleteElementUsage();
 
41
 
 
42
    /**
 
43
     * @return Configuration.
 
44
     */
 
45
    Config getConfig();
 
46
 
 
47
    /**
 
48
     * @return Map of xsd elements to C++ names.
 
49
     */
 
50
    Map<XSElementDeclaration, CppElementNameParentTypesPair> getElementNameMapping();
 
51
 
 
52
    /**
 
53
     * @return Current element stack.
 
54
     */
 
55
    Stack<XSElementDeclaration> getElementStack();
 
56
 
 
57
    /**
 
58
     * @return Object able to create C++ names for enums and unions.
 
59
     */
 
60
    CppEnumNameCreator getEnumOrUnionNameCreator();
 
61
 
 
62
    /**
 
63
     * @return Map of xsd union type to map of C++ member types.
 
64
     */
 
65
    Map<XSSimpleTypeDefinition, Map<XSSimpleTypeDefinition, StringPair>> getUnionMemberTypeMap();
 
66
 
 
67
    /**
 
68
     * @return Map of xsd simple types to their C++ validation function name.
 
69
     */
 
70
    Map<XSSimpleTypeDefinition, String> getXsSimpleType2validationFunctionName();
 
71
 
 
72
    /**
 
73
     * @return Map of xsd type to C++ validation data struct name.
 
74
     */
 
75
    Map<XSTypeDefinition, String> getXsType2validationDataStructName();
 
76
}