bump product version to 7.6.3.2-android
[LibreOffice.git] / codemaker / source / cppumaker / includes.hxx
blob8cd830b4a73198ea05be9f4d145dcaf3b211caaf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <rtl/ref.hxx>
23 #include <rtl/ustring.hxx>
24 #include <string_view>
25 #include <vector>
26 #include "dependencies.hxx"
28 class FileStream;
29 class TypeManager;
31 namespace codemaker::cppumaker {
33 class Includes {
34 public:
35 Includes(
36 rtl::Reference< TypeManager > manager,
37 Dependencies const & dependencies, bool hpp);
39 ~Includes();
41 void add(OString const & entityName);
42 void addCassert() { m_includeCassert = true; }
43 void addAny() { m_includeAny = true; }
44 void addReference() { m_includeReference = true; }
45 void addSequence() { m_includeSequence = true; }
46 void addType() { m_includeType = true; }
47 void addCppuMacrosHxx() { m_includeCppuMacrosHxx = true; }
48 void addCppuUnotypeHxx() { m_includeCppuUnotypeHxx = true; }
49 void addOslMutexHxx() { m_includeOslMutexHxx = true; }
50 void addRtlStrbufHxx() { m_includeRtlStrbufHxx = true; }
51 void addRtlStringH() { m_includeRtlStringH = true; }
52 void addRtlTextencH() { m_includeRtlTextencH = true; }
53 void addRtlUstrbufHxx() { m_includeRtlUstrbufHxx = true; }
54 void addRtlUstringH() { m_includeRtlUstringH = true; }
55 void addRtlUstringHxx() { m_includeRtlUstringHxx = true; }
56 void addRtlInstanceHxx() { m_includeRtlInstanceHxx = true; }
57 void addSalTypesH() { m_includeSalTypesH = true; }
58 void addTypelibTypeclassH() { m_includeTypelibTypeclassH = true; }
59 void addTypelibTypedescriptionH()
60 { m_includeTypelibTypedescriptionH = true; }
61 void addCustom(const OUString& s) { m_custom.push_back(s); }
62 void dump(
63 FileStream & out, OUString const * companionHdl, bool exceptions);
65 static void dumpInclude(
66 FileStream & out, OString const & entityName, bool hpp);
68 private:
69 Includes(Includes const &) = delete;
70 Includes& operator =(const Includes&) = delete;
72 bool isInterfaceType(std::string_view entityName) const;
74 rtl::Reference< TypeManager > m_manager;
75 Dependencies::Map m_map;
76 bool m_hpp;
77 bool m_includeCassert;
78 bool m_includeAny;
79 bool m_includeReference;
80 bool m_includeSequence;
81 bool m_includeType;
82 bool m_includeCppuMacrosHxx;
83 bool m_includeCppuUnotypeHxx;
84 bool m_includeOslMutexHxx;
85 bool m_includeRtlStrbufHxx;
86 bool m_includeRtlStringH;
87 bool m_includeRtlTextencH;
88 bool m_includeRtlUstrbufHxx;
89 bool m_includeRtlUstringH;
90 bool m_includeRtlUstringHxx;
91 bool m_includeRtlInstanceHxx;
92 bool m_includeSalTypesH;
93 bool m_includeTypelibTypeclassH;
94 bool m_includeTypelibTypedescriptionH;
95 std::vector<OUString> m_custom;
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */