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_SOURCE_SKELETONMAKER_SKELETONCPP_HXX 28 #define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX 29 30 #include <fstream> 31 32 #include "codemaker/generatedtypeset.hxx" 33 #include "skeletoncommon.hxx" 34 35 namespace skeletonmaker { namespace cpp { 36 37 // referenceType 38 // 0 = no reference 39 // 1 = use of css::uno::Reference for interfaces 40 // 2 = reference (includes css::uno::Reference for interfaces) 41 // 4 = const reference (includes css::uno::Reference for interfaces) 42 // 8 = default construction for example for return types, means "return <type>();" 43 // 16 = default member initialization in a constructor 44 void printType(std::ostream & o, 45 ProgramOptions const & options, TypeManager const & manager, 46 codemaker::UnoType::Sort sort, RTTypeClass typeClass, 47 rtl::OString const & name, sal_Int32 rank, 48 std::vector< rtl::OString > const & arguments, 49 short referenceType, bool defaultvalue=false); 50 51 void printType(std::ostream & o, 52 ProgramOptions const & options, TypeManager const & manager, 53 rtl::OString const & type, short referenceType, 54 bool defaultvalue=false); 55 56 57 bool printConstructorParameters(std::ostream & o, 58 ProgramOptions const & options, 59 TypeManager const & manager, 60 typereg::Reader const & reader, 61 typereg::Reader const & outerReader, 62 std::vector< rtl::OString > const & arguments); 63 64 65 void printConstructor(std::ostream & o, 66 ProgramOptions const & options, 67 TypeManager const & manager, 68 typereg::Reader const & reader, 69 std::vector< rtl::OString > const & arguments); 70 71 72 void printMethodParameters(std::ostream & o, 73 ProgramOptions const & options, 74 TypeManager const & manager, 75 typereg::Reader const & reader, 76 sal_uInt16 method, bool previous, 77 bool withtype); 78 79 80 void printExceptionSpecification(std::ostream & o, 81 ProgramOptions const & options, 82 TypeManager const & manager, 83 typereg::Reader const & reader, 84 sal_uInt16 method); 85 86 87 void printMethods(std::ostream & o, 88 ProgramOptions const & options, TypeManager const & manager, 89 typereg::Reader const & reader, 90 codemaker::GeneratedTypeSet & generated, 91 rtl::OString const & delegate, 92 rtl::OString const & classname=rtl::OString(), 93 rtl::OString const & indentation=rtl::OString(), 94 bool defaultvalue=false, 95 rtl::OString const & propertyhelper=rtl::OString()); 96 97 98 void printConstructionMethods(std::ostream & o, 99 ProgramOptions const & options, 100 TypeManager const & manager, 101 typereg::Reader const & reader); 102 103 104 void printServiceMembers(std::ostream & o, 105 ProgramOptions const & options, 106 TypeManager const & manager, 107 typereg::Reader const & reader, 108 rtl::OString const & type, 109 rtl::OString const & delegate); 110 111 112 void printMapsToCppType(std::ostream & o, 113 ProgramOptions const & options, 114 TypeManager const & manager, 115 codemaker::UnoType::Sort sort, 116 RTTypeClass typeClass, 117 rtl::OString const & name, 118 sal_Int32 rank, 119 std::vector< rtl::OString > const & arguments, 120 const char * cppTypeSort); 121 122 123 void generateDocumentation(std::ostream & o, 124 ProgramOptions const & options, 125 TypeManager const & manager, 126 rtl::OString const & type, 127 rtl::OString const & delegate); 128 129 130 void generateSkeleton(ProgramOptions const & options, 131 TypeManager const & manager, 132 std::vector< rtl::OString > const & types, 133 rtl::OString const & delegate); 134 135 void generateCalcAddin(ProgramOptions const & options, 136 TypeManager const & manager, 137 std::vector< rtl::OString > const & types); 138 139 } } 140 141 #endif // INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX 142 143