xref: /trunk/main/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java (revision 55adca3b5634862672eb3b8bd7f242c8984dfe41)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 import com.sun.star.uno.TypeClass;
24 
25 public interface XLanguageSourceCodeGenerator {
26 
27     public static final int nJAVA = 0;
28     public static final int nCPLUSPLUS = 1;
29     public static final int nBASIC = 2;
30 
31     public String getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass);
32 
33     public String getFinalHeaderStatements();
34 
35     public void assignqueryInterfaceHeaderSourceCode();
36 
37     public String getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription);
38 
39     public String getMethodTerminationSourceCode();
40 
41     public String getStatementTerminationCharacter();
42 
43     public boolean needsqueryInterface();
44 
45     public String getqueryInterfaceSourceCode(String _sReturnValueDescription, String _sClassName, String _sObjectDescription);
46 
47     public String getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName);
48 
49     public String getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember);
50 
51     public String getObjectTypeDescription(String _sClassName, boolean _bAsHeader);
52 
53     public String getbooleanTypeDescription();
54 
55     public String getbyteTypeDescription();
56 
57     public String getshortTypeDescription();
58 
59     public String getunsignedshortTypeDescription();
60 
61     public String getlongTypeDescription();
62 
63     public String getunsignedlongTypeDescription();
64 
65     public String gethyperTypeDescription();
66 
67     public String getunsignedhyperTypeDescription();
68 
69     public String getfloatTypeDescription();
70 
71     public String getdoubleTypeDescription();
72 
73     public String getcharTypeDescription();
74 
75     public String getstringTypeDescription(boolean _bAsHeaderSourceCode);
76 
77     public String gettypeTypeDescription(boolean _bAsHeaderSourceCode);
78 
79     public String getanyTypeDescription(boolean _bAsHeaderSourceCode);
80 
81     public String getArrayDeclaration(String sVariableDeclaration);
82 
83     public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean _bIsArray, TypeClass aTypeClass, boolean _bInitialize);
84 
85     public String getMethodSeparator();
86 
87     public String getStringValue(String _sValue);
88 
89     public String getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName);
90 
91     public String castLiteral(String _sExpression, TypeClass _aTypeClass);
92 
93     public String getCommentSign();
94 }
95