xref: /aoo41x/main/autodoc/inc/ary/idl/ip_ce.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_IP_CE_HXX
29 #define ARY_IDL_IP_CE_HXX
30 
31 // USED SERVICES
32 #include <ary/idl/i_types4idl.hxx>
33 #include <ary/idl/i_property.hxx>
34 
35 
36 
37 
38 namespace ary
39 {
40 namespace idl
41 {
42     class Module;
43 
44     class ConstantsGroup;
45     class Enum;
46     class Exception;
47     class Interface;
48     class Service;
49     class SglIfcService;
50     class Singleton;
51     class SglIfcSingleton;
52     class Struct;
53     class Typedef;
54 
55     class Attribute;
56     class Constant;
57     class EnumValue;
58     class Function;
59     class Property;
60     class StructElement;
61     class Variable;
62 
63     class NameLookup;
64 
65 
66 /** Provides the access logic for all code entities.
67 */
68 class CePilot
69 {
70   public:
71     // LIFECYCLE
72     virtual             ~CePilot() {}
73 
74     // OPERATIONS
75     virtual Module &    CheckIn_Module(
76                             Ce_id               i_nParentId,
77                             const String &      i_sName ) = 0;
78     virtual Service &   Store_Service(
79                             Ce_id               i_nOwner,
80                             const String &      i_sName ) = 0;
81     virtual SglIfcService &
82                         Store_SglIfcService(
83                             Ce_id               i_nOwner,
84                             const String &      i_sName,
85                             Type_id             i_nBaseInterface ) = 0;
86     virtual Interface & Store_Interface(
87                             Ce_id               i_nOwner,
88                             const String &      i_sName,
89                             Type_id             i_nBase ) = 0;
90     virtual Struct &    Store_Struct(
91                             Ce_id               i_nOwner,
92                             const String &      i_sName,
93                             Type_id             i_nBase,
94                             const String &      i_sTemplateParam = String::Null_() ) = 0;
95     virtual Exception & Store_Exception(
96                             Ce_id               i_nOwner,
97                             const String &      i_sName,
98                             Type_id             i_nBase ) = 0;
99     virtual Enum &      Store_Enum(
100                             Ce_id               i_nOwner,
101                             const String &      i_sName ) = 0;
102     virtual Typedef &   Store_Typedef(
103                             Ce_id               i_nOwner,
104                             const String &      i_sName,
105                             Type_id             i_nDefiningType ) = 0;
106     virtual ConstantsGroup &
107                         Store_ConstantsGroup(
108                             Ce_id               i_nOwner,
109                             const String &      i_sName ) = 0;
110     virtual Singleton & Store_Singleton(
111                             Ce_id               i_nOwner,
112                             const String &      i_sName ) = 0;
113     virtual SglIfcSingleton &
114                         Store_SglIfcSingleton(
115                             Ce_id               i_nOwner,
116                             const String &      i_sName,
117                             Type_id             i_nBaseInterface ) = 0;
118 
119     virtual Constant &  Store_Constant(
120                             Ce_id               i_nOwner,
121                             const String &      i_sName,
122                             Type_id             i_nType,
123                             const String &      i_sValue ) = 0;
124     virtual Property &  Store_Property(
125                             Ce_id               i_nOwner,
126                             const String &      i_sName,
127                             Type_id             i_nType,
128                             Property::Stereotypes
129                                                 i_stereotypes ) = 0;
130     virtual Function &  Store_Function(
131                             Ce_id               i_nOwner,
132                             const String &      i_sName,
133                             Type_id             i_nReturnType,
134                             bool                i_bOneWay ) = 0;
135     virtual Function &  Store_ServiceConstructor(
136                             Ce_id               i_nOwner,
137                             const String &      i_sName ) = 0;
138     virtual StructElement &
139                         Store_StructMember(
140                             Ce_id               i_nOwner,
141                             const String &      i_sName,
142                             Type_id             i_nType ) = 0;
143     virtual StructElement &
144                         Store_ExceptionMember(
145                             Ce_id               i_nOwner,
146                             const String &      i_sName,
147                             Type_id             i_nType ) = 0;
148     virtual EnumValue & Store_EnumValue(
149                             Ce_id               i_nOwner,
150                             const String &      i_sName,
151                             const String &      i_sValue ) = 0;
152     virtual Attribute & Store_Attribute(
153                             Ce_id               i_nOwner,
154                             const String &      i_sName,
155                             Type_id             i_nType,
156                             bool                i_bReadOnly,
157                             bool                i_bBound ) = 0;
158     // INQUIRY
159     virtual const Module &
160                         GlobalNamespace() const = 0;
161     virtual const CodeEntity &
162                         Find_Ce(
163                             Ce_id               i_nId ) const = 0;
164 
165     virtual const Module &
166                         Find_Module(
167                             Ce_id               i_nId ) const = 0;
168     virtual const Module *
169                         Search_Module(
170                             Ce_id               i_nId ) const = 0;
171     virtual const Function &
172                         Find_Function(
173                             Ce_id               i_nId ) const = 0;
174     virtual const Property &
175                         Find_Property(
176                             Ce_id               i_nId ) const = 0;
177     virtual const EnumValue &
178                         Find_EnumValue(
179                             Ce_id               i_nId ) const = 0;
180     virtual const Constant &
181                         Find_Constant(
182                             Ce_id               i_nId ) const = 0;
183     virtual const StructElement &
184                         Find_StructElement(
185                             Ce_id               i_nId ) const = 0;
186     virtual void        Get_Text(
187                             StringVector &      o_module,
188                             String &            o_ce,
189                             String &            o_member,
190                             const CodeEntity &  i_ce ) const = 0;
191     virtual const NameLookup &
192                         NameDictionary() const = 0;
193     virtual void        Get_AlphabeticalIndex(
194                             std::vector<Ce_id> &
195                                                 o_rResult,
196                             alphabetical_index::E_Letter
197                                                 i_cLetter) const = 0;
198     // ACCESS
199     virtual Module &    GlobalNamespace() = 0;
200     virtual CodeEntity &
201                         Find_Ce(
202                             Ce_id               i_nId ) = 0;
203 };
204 
205 
206 
207 
208 }   // namespace idl
209 }   // namespace ary
210 #endif
211