xref: /aoo42x/main/autodoc/inc/ary/idl/i_module.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ARY_IDL_I_MODULE_HXX
29 #define ARY_IDL_I_MODULE_HXX
30 
31 // BASE CLASSES
32 #include <ary/idl/i_ce.hxx>
33 
34 // USED SERVICES
35 #include <ary/stdconstiter.hxx>
36 
37 
38 
39 
40 namespace ary
41 {
42     template <class> class NameTreeNode;
43 
44 namespace idl
45 {
46 namespace ifc_module
47 {
48     struct attr;
49 }
50     class Gate;
51 
52 
53 /** Represents an IDL module.
54 
55     "Name" in methods means all code entities which belong into
56     this namespace (not in a subnamespace of this one), but not
57     to the subnamespaces.
58 
59     "SubNamespace" in method names refers to all direct subnamespaces.
60 */
61 class Module : public CodeEntity
62 {
63   public:
64     enum E_ClassId { class_id = 2000 };
65 
66         // LIFECYCLE
67                         Module();
68                         Module(
69                             const String &      i_sName,
70                             const Module &      i_rParent );
71                         ~Module();
72     // OPERATIONS
73     void                Add_Name(
74                             const String &      i_sName,
75                             Ce_id               i_nId );
76     // INQUIRY
77     Ce_id               Search_Name(
78                             const String &      i_sName ) const;
79     void                Get_Names(
80                             Dyn_StdConstIterator<Ce_id> &
81                                                 o_rResult ) const;
82   private:
83     // Interface csv::ConstProcessorClient:
84     virtual void        do_Accept(
85                             csv::ProcessorIfc & io_processor ) const;
86     // Interface ary::Object:
87     virtual ClassId     get_AryClass() const;
88 
89     // Interface CodeEntity
90     virtual const String &  inq_LocalName() const;
91     virtual Ce_id           inq_NameRoom() const;
92     virtual Ce_id           inq_Owner() const;
93     virtual E_SightLevel    inq_SightLevel() const;
94 
95     friend struct ifc_module::attr;
96 
97     // DATA
98     Dyn< NameTreeNode<Ce_id> >
99                             pImpl;
100 };
101 
102 
103 inline bool
104 is_Module( const CodeEntity & i_rCe )
105 {
106     return i_rCe.AryClass() == Module::class_id;
107 }
108 
109 
110 
111 
112 }   // namespace idl
113 }   // namespace ary
114 #endif
115