Update ooo320-m1
[ooovba.git] / autodoc / inc / ary / idl / i_namelookup.hxx
blobeb84b83fd78ec4d4ae0a5cee86273ac2f0de6180
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: i_namelookup.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ARY_IDL_I_NAMELOOKUP_HXX
32 #define ARY_IDL_I_NAMELOOKUP_HXX
34 // BASE CLASSES
35 #include <ary/idl/i_types4idl.hxx>
37 // USED SERVICES
38 #include <ary/stdconstiter.hxx>
39 #include <ary/itrange.hxx>
40 #include <vector>
41 #include <map>
46 namespace ary
48 namespace idl
52 /** This class finds all occurrences in the current language of a
53 name in the repository.
55 class NameLookup
57 public:
58 struct NameProperties
60 NameProperties()
61 : nId(0),
62 nClass(0),
63 nOwner(0) {}
64 NameProperties(
65 Ce_id i_id,
66 ClassId i_class,
67 Ce_id i_owner )
68 : nId(i_id),
69 nClass(i_class),
70 nOwner(i_owner) {}
71 Ce_id nId;
72 ClassId nClass;
73 Ce_id nOwner;
76 /// Map from Name to NameProperties.
77 typedef std::multimap<String, NameProperties> Map_Names;
79 // LIFECYCLE
80 NameLookup();
81 ~NameLookup();
82 // OPERATIONS
83 void Add_Name(
84 const String & i_name,
85 Ce_id i_id,
86 ClassId i_class,
87 Ce_id i_owner );
88 private:
89 // DATA
90 Map_Names aNames;
96 } // namespace idl
97 } // namespace ary
98 #endif