merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / ary / idl / ia_ce.hxx
blob6d047da77479fc48fee1597e0ebf2654f4a772ec
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: ia_ce.hxx,v $
10 * $Revision: 1.3 $
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_IA_CE_HXX
32 #define ARY_IDL_IA_CE_HXX
35 // USED SERVICES
36 // BASE CLASSES
37 #include <ary/idl/ip_ce.hxx>
38 // COMPONENTS
39 // PARAMETERS
42 namespace ary
44 namespace idl
47 class Ce_Storage;
48 class TypeAdmin;
51 /** @resp
52 Implements ::ary::idl::CePilot. Provides the access logic for all
53 IDL code entities.
55 @collab Ce_Storage
56 @collab TypeAdmin
58 @see CodeEntity
60 class CeAdmin : public CePilot
62 public:
63 // LIFECYCLE
64 CeAdmin(
65 NameLookup & io_rNameDictionary,
66 TypeAdmin & io_rTypePilot );
67 virtual ~CeAdmin();
69 // OPERATIONS
71 // INQUIRY
72 const Ce_Storage & Storage() const;
74 // ACCESS
75 Ce_Storage & Storage();
77 // INHERITED
78 // Interface ::ary::idl::CePilot:
79 virtual Module & CheckIn_Module(
80 Ce_id i_nParentId,
81 const String & i_sName );
82 virtual Service & Store_Service(
83 Ce_id i_nOwner,
84 const String & i_sName );
85 virtual SglIfcService &
86 Store_SglIfcService(
87 Ce_id i_nOwner,
88 const String & i_sName,
89 Type_id i_nBaseInterface );
90 virtual Interface & Store_Interface(
91 Ce_id i_nOwner,
92 const String & i_sName,
93 Type_id i_nBase );
94 virtual Struct & Store_Struct(
95 Ce_id i_nOwner,
96 const String & i_sName,
97 Type_id i_nBase,
98 const String & i_sTemplateParam );
99 virtual Exception & Store_Exception(
100 Ce_id i_nOwner,
101 const String & i_sName,
102 Type_id i_nBase );
103 virtual Enum & Store_Enum(
104 Ce_id i_nOwner,
105 const String & i_sName );
106 virtual Typedef & Store_Typedef(
107 Ce_id i_nOwner,
108 const String & i_sName,
109 Type_id i_nDefiningType );
110 virtual ConstantsGroup &
111 Store_ConstantsGroup(
112 Ce_id i_nOwner,
113 const String & i_sName );
114 virtual Singleton & Store_Singleton(
115 Ce_id i_nOwner,
116 const String & i_sName );
117 virtual SglIfcSingleton &
118 Store_SglIfcSingleton(
119 Ce_id i_nOwner,
120 const String & i_sName,
121 Type_id i_nBaseInterface );
123 virtual Constant & Store_Constant(
124 Ce_id i_nOwner,
125 const String & i_sName,
126 Type_id i_nType,
127 const String & i_sValue );
128 virtual Property & Store_Property(
129 Ce_id i_nOwner,
130 const String & i_sName,
131 Type_id i_nType,
132 Property::Stereotypes
133 i_stereotypes );
134 virtual Function & Store_Function(
135 Ce_id i_nOwner,
136 const String & i_sName,
137 Type_id i_nReturnType,
138 bool i_bOneWay );
139 virtual Function & Store_ServiceConstructor(
140 Ce_id i_nOwner,
141 const String & i_sName );
142 virtual StructElement &
143 Store_StructMember(
144 Ce_id i_nOwner,
145 const String & i_sName,
146 Type_id i_nType );
147 virtual StructElement &
148 Store_ExceptionMember(
149 Ce_id i_nOwner,
150 const String & i_sName,
151 Type_id i_nType );
152 virtual EnumValue & Store_EnumValue(
153 Ce_id i_nOwner,
154 const String & i_sName,
155 const String & i_sValue );
156 virtual Attribute & Store_Attribute(
157 Ce_id i_nOwner,
158 const String & i_sName,
159 Type_id i_nType,
160 bool i_bReadOnly,
161 bool i_bBound );
163 virtual const Module &
164 GlobalNamespace() const;
165 virtual const CodeEntity &
166 Find_Ce(
167 Ce_id i_nId ) const;
168 virtual const Module &
169 Find_Module(
170 Ce_id i_nId ) const;
171 virtual const Module *
172 Search_Module(
173 Ce_id i_nId ) const;
174 virtual const Function &
175 Find_Function(
176 Ce_id i_nId ) const;
177 virtual const Property &
178 Find_Property(
179 Ce_id i_nId ) const;
180 virtual const EnumValue &
181 Find_EnumValue(
182 Ce_id i_nId ) const;
183 virtual const Constant &
184 Find_Constant(
185 Ce_id i_nId ) const;
186 virtual const StructElement &
187 Find_StructElement(
188 Ce_id i_nId ) const;
189 virtual void Get_Text(
190 StringVector & o_module,
191 String & o_ce,
192 String & o_member,
193 const CodeEntity & i_ce ) const;
194 virtual const NameLookup &
195 NameDictionary() const;
196 virtual void Get_AlphabeticalIndex(
197 std::vector<Ce_id> &
198 o_rResult,
199 alphabetical_index::E_Letter
200 i_cLetter) const;
201 // ACCESS
202 virtual Module & GlobalNamespace();
203 virtual CodeEntity &
204 Find_Ce(
205 Ce_id i_nId );
206 private:
207 // Locals
208 Module & lhf_Access_Module(
209 Ce_id i_nId );
210 void lhf_Put2Storage_and_AssignId(
211 CodeEntity & pass_io_rCe );
212 void lhf_Store_NewEntity(
213 DYN CodeEntity & pass_io_rCe,
214 Module & i_rOwner );
215 void lhf_Store_NewEntity(
216 DYN CodeEntity & pass_io_rCe,
217 Ce_id i_nOwnerModule );
218 void get_ModuleText(
219 StringVector & o_module,
220 const CodeEntity & i_ce ) const;
221 Struct & lhf_Store_TplStruct(
222 Ce_id i_nOwner,
223 const String & i_sName,
224 Type_id i_nBase,
225 const String & i_sTemplateParam );
227 const Ce_Storage & my_Storage() const;
228 Ce_Storage & my_Storage();
229 NameLookup & my_NameDictionary() { return *pNameDictionary; }
231 // DATA
232 Dyn<Ce_Storage> pStorage; /// @inv pStorage != 0;
233 Module * pGlobalNamespace;
234 NameLookup * pNameDictionary;
235 TypeAdmin * pTypePilot;
239 // IMPLEMENTATION
240 inline const Ce_Storage &
241 CeAdmin::Storage() const
243 return *pStorage;
246 inline Ce_Storage &
247 CeAdmin::Storage()
249 return *pStorage;
254 } // namespace idl
255 } // namespace ary
256 #endif