Line data Source code
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 : #ifndef INCLUDED_UNOIDL_SOURCE_UNOIDLPROVIDER_HXX
11 : #define INCLUDED_UNOIDL_SOURCE_UNOIDLPROVIDER_HXX
12 :
13 : #include "sal/config.h"
14 :
15 : #include <set>
16 :
17 : #include "rtl/ref.hxx"
18 : #include "sal/types.h"
19 : #include "unoidl/unoidl.hxx"
20 :
21 : namespace unoidl { namespace detail {
22 :
23 : class MappedFile;
24 : struct MapEntry;
25 :
26 : struct Map {
27 : MapEntry const * begin;
28 : sal_uInt32 size;
29 : };
30 :
31 3225613 : struct NestedMap {
32 : Map map;
33 : std::set<Map> trace;
34 : };
35 :
36 : class UnoidlProvider: public Provider {
37 : public:
38 : // throws FileFormatException, NoSuchFileException:
39 : explicit UnoidlProvider(OUString const & uri);
40 :
41 : // throws FileFormatException:
42 : virtual rtl::Reference< MapCursor > createRootCursor() const SAL_OVERRIDE;
43 :
44 : // throws FileFormatException:
45 : virtual rtl::Reference< Entity > findEntity(OUString const & name)
46 : const SAL_OVERRIDE;
47 :
48 : private:
49 : virtual ~UnoidlProvider() throw ();
50 :
51 : rtl::Reference< detail::MappedFile > file_;
52 : NestedMap map_;
53 : };
54 :
55 : } }
56 :
57 : #endif
58 :
59 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|