LibreOffice Module codemaker (master) 1
dependencies.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
20#pragma once
21
22#include <sal/config.h>
23
24#include <map>
25#include <string_view>
26
27#include <rtl/ref.hxx>
28
29namespace rtl { class OUString; }
30class TypeManager;
31
33
34namespace codemaker::cppumaker {
35
42public:
49
50 typedef std::map< OUString, Kind > Map;
51
64 rtl::Reference< TypeManager > const & manager,
65 OUString const & name);
66
68
69 Dependencies(const Dependencies&) = delete;
70 const Dependencies& operator=(const Dependencies&) = delete;
71
72 Map const & getMap() const { return m_map; }
73
75
76 bool hasByteDependency() const { return m_byteDependency; }
77
78 bool hasShortDependency() const { return m_shortDependency; }
79
82
83 bool hasLongDependency() const { return m_longDependency; }
84
86 { return m_unsignedLongDependency; }
87
88 bool hasHyperDependency() const { return m_hyperDependency; }
89
92
93 bool hasCharDependency() const { return m_charDependency; }
94
95 bool hasStringDependency() const { return m_stringDependency; }
96
97 bool hasTypeDependency() const { return m_typeDependency; }
98
99 bool hasAnyDependency() const { return m_anyDependency; }
100
102
103private:
104 void insert(std::u16string_view name, Kind kind);
105
122};
123
124}
125
126/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A simple class to track which other entities a given entity depends on.
Dependencies(const Dependencies &)=delete
rtl::Reference< TypeManager > m_manager
std::map< OUString, Kind > Map
Dependencies(rtl::Reference< TypeManager > const &manager, OUString const &name)
Constructs the dependencies for a given entity.
const Dependencies & operator=(const Dependencies &)=delete
Kind
Flags to distinguish whether one entity depends on another entity because the second is a direct base...
void insert(std::u16string_view name, Kind kind)