1*02d11301SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*02d11301SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*02d11301SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*02d11301SAndrew Rist  * distributed with this work for additional information
6*02d11301SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*02d11301SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*02d11301SAndrew Rist  * "License"); you may not use this file except in compliance
9*02d11301SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*02d11301SAndrew Rist  *
11*02d11301SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*02d11301SAndrew Rist  *
13*02d11301SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*02d11301SAndrew Rist  * software distributed under the License is distributed on an
15*02d11301SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*02d11301SAndrew Rist  * KIND, either express or implied.  See the License for the
17*02d11301SAndrew Rist  * specific language governing permissions and limitations
18*02d11301SAndrew Rist  * under the License.
19*02d11301SAndrew Rist  *
20*02d11301SAndrew Rist  *************************************************************/
21*02d11301SAndrew Rist 
22*02d11301SAndrew Rist 
23cdf0e10cSrcweir #ifndef INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
24cdf0e10cSrcweir #define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <fstream>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include "codemaker/generatedtypeset.hxx"
29cdf0e10cSrcweir #include "skeletoncommon.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir namespace skeletonmaker { namespace cpp {
32cdf0e10cSrcweir 
33cdf0e10cSrcweir // referenceType
34cdf0e10cSrcweir // 0 = no reference
35cdf0e10cSrcweir // 1 = use of css::uno::Reference for interfaces
36cdf0e10cSrcweir // 2 = reference (includes css::uno::Reference for interfaces)
37cdf0e10cSrcweir // 4 = const reference  (includes css::uno::Reference for interfaces)
38cdf0e10cSrcweir // 8 = default construction for example for return types, means "return <type>();"
39cdf0e10cSrcweir // 16 = default member initialization in a constructor
40cdf0e10cSrcweir void printType(std::ostream & o,
41cdf0e10cSrcweir                ProgramOptions const & options, TypeManager const & manager,
42cdf0e10cSrcweir                codemaker::UnoType::Sort sort, RTTypeClass typeClass,
43cdf0e10cSrcweir                rtl::OString const & name, sal_Int32 rank,
44cdf0e10cSrcweir                std::vector< rtl::OString > const & arguments,
45cdf0e10cSrcweir                short referenceType, bool defaultvalue=false);
46cdf0e10cSrcweir 
47cdf0e10cSrcweir void printType(std::ostream & o,
48cdf0e10cSrcweir                ProgramOptions const & options, TypeManager const & manager,
49cdf0e10cSrcweir                rtl::OString const & type, short referenceType,
50cdf0e10cSrcweir                bool defaultvalue=false);
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 
53cdf0e10cSrcweir bool printConstructorParameters(std::ostream & o,
54cdf0e10cSrcweir                                 ProgramOptions const & options,
55cdf0e10cSrcweir                                 TypeManager const & manager,
56cdf0e10cSrcweir                                 typereg::Reader const & reader,
57cdf0e10cSrcweir                                 typereg::Reader const & outerReader,
58cdf0e10cSrcweir                                 std::vector< rtl::OString > const & arguments);
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 
61cdf0e10cSrcweir void printConstructor(std::ostream & o,
62cdf0e10cSrcweir                       ProgramOptions const & options,
63cdf0e10cSrcweir                       TypeManager const & manager,
64cdf0e10cSrcweir                       typereg::Reader const & reader,
65cdf0e10cSrcweir                       std::vector< rtl::OString > const & arguments);
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 
68cdf0e10cSrcweir void printMethodParameters(std::ostream & o,
69cdf0e10cSrcweir                            ProgramOptions const & options,
70cdf0e10cSrcweir                            TypeManager const & manager,
71cdf0e10cSrcweir                            typereg::Reader const & reader,
72cdf0e10cSrcweir                            sal_uInt16 method, bool previous,
73cdf0e10cSrcweir                            bool withtype);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 
76cdf0e10cSrcweir void printExceptionSpecification(std::ostream & o,
77cdf0e10cSrcweir                                  ProgramOptions const & options,
78cdf0e10cSrcweir                                  TypeManager const & manager,
79cdf0e10cSrcweir                                  typereg::Reader const & reader,
80cdf0e10cSrcweir                                  sal_uInt16 method);
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 
83cdf0e10cSrcweir void printMethods(std::ostream & o,
84cdf0e10cSrcweir                   ProgramOptions const & options, TypeManager const & manager,
85cdf0e10cSrcweir                   typereg::Reader const & reader,
86cdf0e10cSrcweir                   codemaker::GeneratedTypeSet & generated,
87cdf0e10cSrcweir                   rtl::OString const & delegate,
88cdf0e10cSrcweir                   rtl::OString const & classname=rtl::OString(),
89cdf0e10cSrcweir                   rtl::OString const & indentation=rtl::OString(),
90cdf0e10cSrcweir                   bool defaultvalue=false,
91cdf0e10cSrcweir                   rtl::OString const & propertyhelper=rtl::OString());
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 
94cdf0e10cSrcweir void printConstructionMethods(std::ostream & o,
95cdf0e10cSrcweir                               ProgramOptions const & options,
96cdf0e10cSrcweir                               TypeManager const & manager,
97cdf0e10cSrcweir                               typereg::Reader const & reader);
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 
100cdf0e10cSrcweir void printServiceMembers(std::ostream & o,
101cdf0e10cSrcweir                          ProgramOptions const & options,
102cdf0e10cSrcweir                          TypeManager const & manager,
103cdf0e10cSrcweir                          typereg::Reader const & reader,
104cdf0e10cSrcweir                          rtl::OString const & type,
105cdf0e10cSrcweir                          rtl::OString const & delegate);
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 
108cdf0e10cSrcweir void printMapsToCppType(std::ostream & o,
109cdf0e10cSrcweir                         ProgramOptions const & options,
110cdf0e10cSrcweir                         TypeManager const & manager,
111cdf0e10cSrcweir                         codemaker::UnoType::Sort sort,
112cdf0e10cSrcweir                         RTTypeClass typeClass,
113cdf0e10cSrcweir                         rtl::OString const & name,
114cdf0e10cSrcweir                         sal_Int32 rank,
115cdf0e10cSrcweir                         std::vector< rtl::OString > const & arguments,
116cdf0e10cSrcweir                         const char * cppTypeSort);
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 
119cdf0e10cSrcweir void generateDocumentation(std::ostream & o,
120cdf0e10cSrcweir                            ProgramOptions const & options,
121cdf0e10cSrcweir                            TypeManager const & manager,
122cdf0e10cSrcweir                            rtl::OString const & type,
123cdf0e10cSrcweir                            rtl::OString const & delegate);
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 
126cdf0e10cSrcweir void generateSkeleton(ProgramOptions const & options,
127cdf0e10cSrcweir                       TypeManager const & manager,
128cdf0e10cSrcweir                       std::vector< rtl::OString > const & types,
129cdf0e10cSrcweir                       rtl::OString const & delegate);
130cdf0e10cSrcweir 
131cdf0e10cSrcweir void generateCalcAddin(ProgramOptions const & options,
132cdf0e10cSrcweir                        TypeManager const & manager,
133cdf0e10cSrcweir                        std::vector< rtl::OString > const & types);
134cdf0e10cSrcweir 
135cdf0e10cSrcweir } }
136cdf0e10cSrcweir 
137cdf0e10cSrcweir #endif // INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
138cdf0e10cSrcweir 
139