LibreOffice Module unodevtools (master) 1
skeletoncommon.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <sal/config.h>
22
23#include <rtl/ref.hxx>
24#include <rtl/string.hxx>
26#include <unoidl/unoidl.hxx>
27
28#include <fstream>
29#include <map>
30#include <set>
31
32namespace skeletonmaker {
33
34typedef ::std::map< OString, ::std::vector< OString > > ProtocolCmdMap;
35
36typedef ::std::vector< unoidl::AccumulationBasedServiceEntity::Property >
38
40 ProgramOptions(): all(false), dump(false), license(false),
43
44 bool all;
45 bool dump;
46 bool license;
50 // language specifier - is extendable
51 // 1 = Java
52 // 2 = C++
53 short language;
54 // component type
55 // 1 = default UNO component - is extendable
56 // 2 = calc add-in
57 // 3 = add-on
59 OString outputpath;
60 OString implname;
62};
63
64
71void printLicenseHeader(std::ostream& o);
72
89bool getOutputStream(ProgramOptions const & options,
90 OString const & extension,
91 std::ostream** ppOutputStream,
92 OString & targetSourceFileName,
93 OString & tmpSourceFileName);
94
95void checkType(rtl::Reference< TypeManager > const & manager,
96 OUString const & type,
97 std::set< OUString >& interfaceTypes,
98 std::set< OUString >& serviceTypes,
100
102 std::set< OUString >& interfaces,
103 const std::set< OUString >& services,
104 std::u16string_view propertyhelper);
105
106OUString checkPropertyHelper(
107 ProgramOptions const & options, rtl::Reference< TypeManager > const & manager,
108 const std::set< OUString >& services,
109 const std::set< OUString >& interfaces,
110 AttributeInfo& attributes,
111 std::set< OUString >& propinterfaces);
112
124 std::set< OUString >& interfaces);
125
126
130
131void generateFunctionParameterMap(std::ostream& o,
132 ProgramOptions const & options,
133 rtl::Reference< TypeManager > const & manager,
134 const std::set< OUString >& interfaces);
135
136}
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString checkPropertyHelper(ProgramOptions const &options, rtl::Reference< TypeManager > const &manager, const std::set< OUString > &services, const std::set< OUString > &interfaces, AttributeInfo &attributes, std::set< OUString > &propinterfaces)
bool getOutputStream(ProgramOptions const &options, OString const &extension, std::ostream **ppOutputStream, OString &targetSourceFileName, OString &tmpSourceFileName)
create dependent on the output path, the implementation name and the extension a new output file.
::std::vector< unoidl::AccumulationBasedServiceEntity::Property > AttributeInfo
void checkDefaultInterfaces(std::set< OUString > &interfaces, const std::set< OUString > &services, std::u16string_view propertyhelper)
static bool checkXComponentSupport(rtl::Reference< TypeManager > const &manager, OUString const &name)
::std::map< OString, ::std::vector< OString > > ProtocolCmdMap
unoidl::AccumulationBasedServiceEntity::Property::Attributes checkAdditionalPropertyFlags(unoidl::InterfaceTypeEntity::Attribute const &attribute)
void checkType(rtl::Reference< TypeManager > const &manager, OUString const &name, std::set< OUString > &interfaceTypes, std::set< OUString > &serviceTypes, AttributeInfo &properties)
void printLicenseHeader(std::ostream &o)
print the standard OpenOffice.org license header
static void generateFunctionParameterMap(std::ostream &o, ProgramOptions const &options, rtl::Reference< TypeManager > const &manager, OUString const &name, ::codemaker::GeneratedTypeSet &generated, bool &bFirst)