update credits
[LibreOffice.git] / autodoc / inc / ary / idl / i_namelookup.hxx
blobf962d48a0768cd0471a7487d64c12d3477fdc2b0
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 ARY_IDL_I_NAMELOOKUP_HXX
21 #define ARY_IDL_I_NAMELOOKUP_HXX
23 // BASE CLASSES
24 #include <ary/idl/i_types4idl.hxx>
26 // USED SERVICES
27 #include <ary/stdconstiter.hxx>
28 #include <vector>
29 #include <map>
34 namespace ary
36 namespace idl
40 /** This class finds all occurrences in the current language of a
41 name in the repository.
43 class NameLookup
45 public:
46 struct NameProperties
48 NameProperties()
49 : nId(0),
50 nClass(0),
51 nOwner(0) {}
52 NameProperties(
53 Ce_id i_id,
54 ClassId i_class,
55 Ce_id i_owner )
56 : nId(i_id),
57 nClass(i_class),
58 nOwner(i_owner) {}
59 Ce_id nId;
60 ClassId nClass;
61 Ce_id nOwner;
64 /// Map from Name to NameProperties.
65 typedef std::multimap<String, NameProperties> Map_Names;
67 // LIFECYCLE
68 NameLookup();
69 ~NameLookup();
70 // OPERATIONS
71 void Add_Name(
72 const String & i_name,
73 Ce_id i_id,
74 ClassId i_class,
75 Ce_id i_owner );
76 private:
77 // DATA
78 Map_Names aNames;
84 } // namespace idl
85 } // namespace ary
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */