LibreOffice Module unoidl (master) 1
sourcetreeprovider.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
10#pragma once
11
12#include <sal/config.h>
13
14#include <map>
15
16#include <rtl/ref.hxx>
17#include <unoidl/unoidl.hxx>
18
19namespace unoidl::detail
20{
22{
23public:
24 // throws FileFormatException, NoSuchFileException:
25 SourceTreeProvider(Manager& manager, OUString const& uri);
26
27 // throws FileFormatException:
28 virtual rtl::Reference<MapCursor> createRootCursor() const override;
29
30 // throws FileFormatException:
31 virtual rtl::Reference<Entity> findEntity(OUString const& name) const override;
32
33private:
34 virtual ~SourceTreeProvider() noexcept override;
35
37 OUString uri_;
38 mutable std::map<OUString, rtl::Reference<Entity>> cache_; //TODO: at manager
39};
40}
41
42/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual rtl::Reference< Entity > findEntity(OUString const &name) const override
virtual rtl::Reference< MapCursor > createRootCursor() const override
virtual ~SourceTreeProvider() noexcept override
std::map< OUString, rtl::Reference< Entity > > cache_
SourceTreeProvider(Manager &manager, OUString const &uri)
rtl::Reference< ParseManager > manager
const char * name