Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / codemaker / source / cppumaker / includes.hxx
blobe08923c2765b75c5c557935544ff5d7779f6b340
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 #ifndef INCLUDED_CODEMAKER_SOURCE_CPPUMAKER_INCLUDES_HXX
21 #define INCLUDED_CODEMAKER_SOURCE_CPPUMAKER_INCLUDES_HXX
23 #include "rtl/ref.hxx"
24 #include "rtl/ustring.hxx"
26 #include "dependencies.hxx"
28 class FileStream;
29 class TypeManager;
31 namespace codemaker { namespace cppumaker {
33 class Includes {
34 public:
35 Includes(
36 rtl::Reference< TypeManager > const & manager,
37 Dependencies const & dependencies, bool hpp);
39 ~Includes();
41 void add(OString const & entityName);
42 void addCassert() { m_includeCassert = true; }
43 void addException() { m_includeException = true; }
44 void addAny() { m_includeAny = true; }
45 void addReference() { m_includeReference = true; }
46 void addSequence() { m_includeSequence = true; }
47 void addType() { m_includeType = true; }
48 void addCppuMacrosHxx() { m_includeCppuMacrosHxx = true; }
49 void addCppuUnotypeHxx() { m_includeCppuUnotypeHxx = true; }
50 void addOslMutexHxx() { m_includeOslMutexHxx = true; }
51 void addRtlStrbufHxx() { m_includeRtlStrbufHxx = true; }
52 void addRtlStringH() { m_includeRtlStringH = true; }
53 void addRtlTextencH() { m_includeRtlTextencH = true; }
54 void addRtlUstrbufHxx() { m_includeRtlUstrbufHxx = true; }
55 void addRtlUstringH() { m_includeRtlUstringH = true; }
56 void addRtlUstringHxx() { m_includeRtlUstringHxx = true; }
57 void addRtlInstanceHxx() { m_includeRtlInstanceHxx = true; }
58 void addSalTypesH() { m_includeSalTypesH = true; }
59 void addTypelibTypeclassH() { m_includeTypelibTypeclassH = true; }
60 void addTypelibTypedescriptionH()
61 { m_includeTypelibTypedescriptionH = true; }
62 void dump(FileStream & out, OUString const * companionHdl);
64 static void dumpInclude(
65 FileStream & out, OString const & entityName, bool hpp);
67 private:
68 Includes(Includes &) = delete;
69 void operator =(const Includes&) = delete;
71 bool isInterfaceType(OString const & entityName) const;
73 rtl::Reference< TypeManager > m_manager;
74 Dependencies::Map m_map;
75 bool m_hpp;
76 bool m_includeCassert;
77 bool m_includeException;
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_includeOslDoublecheckedlockingH;
85 bool m_includeOslMutexHxx;
86 bool m_includeRtlStrbufHxx;
87 bool m_includeRtlStringH;
88 bool m_includeRtlTextencH;
89 bool m_includeRtlUstrbufHxx;
90 bool m_includeRtlUstringH;
91 bool m_includeRtlUstringHxx;
92 bool m_includeRtlInstanceHxx;
93 bool m_includeSalTypesH;
94 bool m_includeTypelibTypeclassH;
95 bool m_includeTypelibTypedescriptionH;
98 } }
100 #endif // INCLUDED_CODEMAKER_SOURCE_CPPUMAKER_INCLUDES_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */