1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef INCLUDED_UNODEVTOOLS_SKELETONJAVA_HXX
28 #define INCLUDED_UNODEVTOOLS_SKELETONJAVA_HXX
29 
30 #include <fstream>
31 
32 #include "codemaker/generatedtypeset.hxx"
33 #include "skeletoncommon.hxx"
34 
35 namespace skeletonmaker { namespace java {
36 
37 void printType(std::ostream & o,
38                ProgramOptions const & options, TypeManager const & manager,
39                codemaker::UnoType::Sort sort, RTTypeClass typeClass,
40                rtl::OString const & name, sal_Int32 rank,
41                std::vector< rtl::OString > const & arguments,
42                bool referenceType, bool defaultvalue=false);
43 
44 void printType(std::ostream & o,
45                ProgramOptions const & options, TypeManager const & manager,
46                rtl::OString const & type, bool referenceType,
47                bool defaultvalue=false);
48 
49 bool printConstructorParameters(std::ostream & o,
50                                 ProgramOptions const & options,
51                                 TypeManager const & manager,
52                                 typereg::Reader const & reader,
53                                 typereg::Reader const & outerReader,
54                                 std::vector< rtl::OString > const & arguments);
55 
56 void printConstructor(std::ostream & o,
57                       ProgramOptions const & options, TypeManager const & manager,
58                       typereg::Reader const & reader,
59                       std::vector< rtl::OString > const & arguments);
60 
61 void printMethodParameters(std::ostream & o,
62                            ProgramOptions const & options,
63                            TypeManager const & manager,
64                            typereg::Reader const & reader,
65                            sal_uInt16 method, bool previous,
66                            bool withtype,
67                            bool shortname=false);
68 
69 void printExceptionSpecification(std::ostream & o,
70                                  ProgramOptions const & options,
71                                  TypeManager const & manager,
72                                  typereg::Reader const & reader,
73                                  sal_uInt16 method);
74 
75 void printMethods(std::ostream & o,
76                   ProgramOptions const & options, TypeManager const & manager,
77                   typereg::Reader const & reader,
78                   codemaker::GeneratedTypeSet & generated,
79                   rtl::OString const & delegate,
80                   rtl::OString const & indentation=rtl::OString(),
81                   bool defaultvalue=false,
82                   bool usepropertymixin=false);
83 
84 void printConstructionMethods(std::ostream & o,
85                               ProgramOptions const & options,
86                               TypeManager const & manager,
87                               typereg::Reader const & reader);
88 
89 void printServiceMembers(std::ostream & o,
90                          ProgramOptions const & options,
91                          TypeManager const & manager,
92                          typereg::Reader const & reader,
93                          rtl::OString const & type,
94                          rtl::OString const & delegate);
95 
96 void printMapsToJavaType(std::ostream & o,
97                          ProgramOptions const & options,
98                          TypeManager const & manager,
99                          codemaker::UnoType::Sort sort,
100                          RTTypeClass typeClass,
101                          rtl::OString const & name, sal_Int32 rank,
102                          std::vector< rtl::OString > const & arguments,
103                          const char * javaTypeSort);
104 
105 void generateDocumentation(std::ostream & o,
106                            ProgramOptions const & options,
107                            TypeManager const & manager,
108                            rtl::OString const & type,
109                            rtl::OString const & delegate);
110 
111 void generateSkeleton(ProgramOptions const & options, TypeManager const & manager, std::vector< rtl::OString > const & types, rtl::OString const & delegate);
112 
113 } }
114 
115 #endif // INCLUDED_UNODEVTOOLS_SKELETONJAVA_HXX
116 
117