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