xref: /trunk/main/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java (revision 5226f0b8dea4ef117ddd2bc4948a8601d0ac403b)
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 
getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass)31     public String getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass);
32 
getFinalHeaderStatements()33     public String getFinalHeaderStatements();
34 
assignqueryInterfaceHeaderSourceCode()35     public void assignqueryInterfaceHeaderSourceCode();
36 
getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription)37     public String getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription);
38 
getMethodTerminationSourceCode()39     public String getMethodTerminationSourceCode();
40 
getStatementTerminationCharacter()41     public String getStatementTerminationCharacter();
42 
needsqueryInterface()43     public boolean needsqueryInterface();
44 
getqueryInterfaceSourceCode(String _sReturnValueDescription, String _sClassName, String _sObjectDescription)45     public String getqueryInterfaceSourceCode(String _sReturnValueDescription, String _sClassName, String _sObjectDescription);
46 
getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName)47     public String getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName);
48 
getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember)49     public String getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember);
50 
getObjectTypeDescription(String _sClassName, boolean _bAsHeader)51     public String getObjectTypeDescription(String _sClassName, boolean _bAsHeader);
52 
getbooleanTypeDescription()53     public String getbooleanTypeDescription();
54 
getbyteTypeDescription()55     public String getbyteTypeDescription();
56 
getshortTypeDescription()57     public String getshortTypeDescription();
58 
getunsignedshortTypeDescription()59     public String getunsignedshortTypeDescription();
60 
getlongTypeDescription()61     public String getlongTypeDescription();
62 
getunsignedlongTypeDescription()63     public String getunsignedlongTypeDescription();
64 
gethyperTypeDescription()65     public String gethyperTypeDescription();
66 
getunsignedhyperTypeDescription()67     public String getunsignedhyperTypeDescription();
68 
getfloatTypeDescription()69     public String getfloatTypeDescription();
70 
getdoubleTypeDescription()71     public String getdoubleTypeDescription();
72 
getcharTypeDescription()73     public String getcharTypeDescription();
74 
getstringTypeDescription(boolean _bAsHeaderSourceCode)75     public String getstringTypeDescription(boolean _bAsHeaderSourceCode);
76 
gettypeTypeDescription(boolean _bAsHeaderSourceCode)77     public String gettypeTypeDescription(boolean _bAsHeaderSourceCode);
78 
getanyTypeDescription(boolean _bAsHeaderSourceCode)79     public String getanyTypeDescription(boolean _bAsHeaderSourceCode);
80 
getArrayDeclaration(String sVariableDeclaration)81     public String getArrayDeclaration(String sVariableDeclaration);
82 
getVariableDeclaration(String _sTypeString, String _sVariableName, boolean _bIsArray, TypeClass aTypeClass, boolean _bInitialize)83     public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean _bIsArray, TypeClass aTypeClass, boolean _bInitialize);
84 
getMethodSeparator()85     public String getMethodSeparator();
86 
getStringValue(String _sValue)87     public String getStringValue(String _sValue);
88 
getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName)89     public String getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName);
90 
castLiteral(String _sExpression, TypeClass _aTypeClass)91     public String castLiteral(String _sExpression, TypeClass _aTypeClass);
92 
getCommentSign()93     public String getCommentSign();
94 }
95