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