merge the formfield patch from ooo-build
[ooovba.git] / unodevtools / source / skeletonmaker / skeletoncpp.hxx
blob5d5457fbc21636cc7b004012eb5ec2ecd27e6e74
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: skeletoncpp.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
31 #define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
33 #include <fstream>
35 #include "codemaker/generatedtypeset.hxx"
36 #include "skeletoncommon.hxx"
38 namespace skeletonmaker { namespace cpp {
40 // referenceType
41 // 0 = no reference
42 // 1 = use of css::uno::Reference for interfaces
43 // 2 = reference (includes css::uno::Reference for interfaces)
44 // 4 = const reference (includes css::uno::Reference for interfaces)
45 // 8 = default construction for example for return types, means "return <type>();"
46 // 16 = default member initialization in a constructor
47 void printType(std::ostream & o,
48 ProgramOptions const & options, TypeManager const & manager,
49 codemaker::UnoType::Sort sort, RTTypeClass typeClass,
50 rtl::OString const & name, sal_Int32 rank,
51 std::vector< rtl::OString > const & arguments,
52 short referenceType, bool defaultvalue=false);
54 void printType(std::ostream & o,
55 ProgramOptions const & options, TypeManager const & manager,
56 rtl::OString const & type, short referenceType,
57 bool defaultvalue=false);
60 bool printConstructorParameters(std::ostream & o,
61 ProgramOptions const & options,
62 TypeManager const & manager,
63 typereg::Reader const & reader,
64 typereg::Reader const & outerReader,
65 std::vector< rtl::OString > const & arguments);
68 void printConstructor(std::ostream & o,
69 ProgramOptions const & options,
70 TypeManager const & manager,
71 typereg::Reader const & reader,
72 std::vector< rtl::OString > const & arguments);
75 void printMethodParameters(std::ostream & o,
76 ProgramOptions const & options,
77 TypeManager const & manager,
78 typereg::Reader const & reader,
79 sal_uInt16 method, bool previous,
80 bool withtype);
83 void printExceptionSpecification(std::ostream & o,
84 ProgramOptions const & options,
85 TypeManager const & manager,
86 typereg::Reader const & reader,
87 sal_uInt16 method);
90 void printMethods(std::ostream & o,
91 ProgramOptions const & options, TypeManager const & manager,
92 typereg::Reader const & reader,
93 codemaker::GeneratedTypeSet & generated,
94 rtl::OString const & delegate,
95 rtl::OString const & classname=rtl::OString(),
96 rtl::OString const & indentation=rtl::OString(),
97 bool defaultvalue=false,
98 rtl::OString const & propertyhelper=rtl::OString());
101 void printConstructionMethods(std::ostream & o,
102 ProgramOptions const & options,
103 TypeManager const & manager,
104 typereg::Reader const & reader);
107 void printServiceMembers(std::ostream & o,
108 ProgramOptions const & options,
109 TypeManager const & manager,
110 typereg::Reader const & reader,
111 rtl::OString const & type,
112 rtl::OString const & delegate);
115 void printMapsToCppType(std::ostream & o,
116 ProgramOptions const & options,
117 TypeManager const & manager,
118 codemaker::UnoType::Sort sort,
119 RTTypeClass typeClass,
120 rtl::OString const & name,
121 sal_Int32 rank,
122 std::vector< rtl::OString > const & arguments,
123 const char * cppTypeSort);
126 void generateDocumentation(std::ostream & o,
127 ProgramOptions const & options,
128 TypeManager const & manager,
129 rtl::OString const & type,
130 rtl::OString const & delegate);
133 void generateSkeleton(ProgramOptions const & options,
134 TypeManager const & manager,
135 std::vector< rtl::OString > const & types,
136 rtl::OString const & delegate);
138 void generateCalcAddin(ProgramOptions const & options,
139 TypeManager const & manager,
140 std::vector< rtl::OString > const & types);
144 #endif // INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX