xref: /trunk/main/autodoc/inc/ary/idl/ip_ce.hxx (revision 1c78a5d6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ARY_IDL_IP_CE_HXX
25 #define ARY_IDL_IP_CE_HXX
26 
27 // USED SERVICES
28 #include <ary/idl/i_types4idl.hxx>
29 #include <ary/idl/i_property.hxx>
30 
31 
32 
33 
34 namespace ary
35 {
36 namespace idl
37 {
38     class Module;
39 
40     class ConstantsGroup;
41     class Enum;
42     class Exception;
43     class Interface;
44     class Service;
45     class SglIfcService;
46     class Singleton;
47     class SglIfcSingleton;
48     class Struct;
49     class Typedef;
50 
51     class Attribute;
52     class Constant;
53     class EnumValue;
54     class Function;
55     class Property;
56     class StructElement;
57     class Variable;
58 
59     class NameLookup;
60 
61 
62 /** Provides the access logic for all code entities.
63 */
64 class CePilot
65 {
66   public:
67     // LIFECYCLE
~CePilot()68     virtual             ~CePilot() {}
69 
70     // OPERATIONS
71     virtual Module &    CheckIn_Module(
72                             Ce_id               i_nParentId,
73                             const String &      i_sName ) = 0;
74     virtual Service &   Store_Service(
75                             Ce_id               i_nOwner,
76                             const String &      i_sName ) = 0;
77     virtual SglIfcService &
78                         Store_SglIfcService(
79                             Ce_id               i_nOwner,
80                             const String &      i_sName,
81                             Type_id             i_nBaseInterface ) = 0;
82     virtual Interface & Store_Interface(
83                             Ce_id               i_nOwner,
84                             const String &      i_sName,
85                             Type_id             i_nBase ) = 0;
86     virtual Struct &    Store_Struct(
87                             Ce_id               i_nOwner,
88                             const String &      i_sName,
89                             Type_id             i_nBase,
90                             const String &      i_sTemplateParam = String::Null_() ) = 0;
91     virtual Exception & Store_Exception(
92                             Ce_id               i_nOwner,
93                             const String &      i_sName,
94                             Type_id             i_nBase ) = 0;
95     virtual Enum &      Store_Enum(
96                             Ce_id               i_nOwner,
97                             const String &      i_sName ) = 0;
98     virtual Typedef &   Store_Typedef(
99                             Ce_id               i_nOwner,
100                             const String &      i_sName,
101                             Type_id             i_nDefiningType ) = 0;
102     virtual ConstantsGroup &
103                         Store_ConstantsGroup(
104                             Ce_id               i_nOwner,
105                             const String &      i_sName ) = 0;
106     virtual Singleton & Store_Singleton(
107                             Ce_id               i_nOwner,
108                             const String &      i_sName ) = 0;
109     virtual SglIfcSingleton &
110                         Store_SglIfcSingleton(
111                             Ce_id               i_nOwner,
112                             const String &      i_sName,
113                             Type_id             i_nBaseInterface ) = 0;
114 
115     virtual Constant &  Store_Constant(
116                             Ce_id               i_nOwner,
117                             const String &      i_sName,
118                             Type_id             i_nType,
119                             const String &      i_sValue ) = 0;
120     virtual Property &  Store_Property(
121                             Ce_id               i_nOwner,
122                             const String &      i_sName,
123                             Type_id             i_nType,
124                             Property::Stereotypes
125                                                 i_stereotypes ) = 0;
126     virtual Function &  Store_Function(
127                             Ce_id               i_nOwner,
128                             const String &      i_sName,
129                             Type_id             i_nReturnType,
130                             bool                i_bOneWay ) = 0;
131     virtual Function &  Store_ServiceConstructor(
132                             Ce_id               i_nOwner,
133                             const String &      i_sName ) = 0;
134     virtual StructElement &
135                         Store_StructMember(
136                             Ce_id               i_nOwner,
137                             const String &      i_sName,
138                             Type_id             i_nType ) = 0;
139     virtual StructElement &
140                         Store_ExceptionMember(
141                             Ce_id               i_nOwner,
142                             const String &      i_sName,
143                             Type_id             i_nType ) = 0;
144     virtual EnumValue & Store_EnumValue(
145                             Ce_id               i_nOwner,
146                             const String &      i_sName,
147                             const String &      i_sValue ) = 0;
148     virtual Attribute & Store_Attribute(
149                             Ce_id               i_nOwner,
150                             const String &      i_sName,
151                             Type_id             i_nType,
152                             bool                i_bReadOnly,
153                             bool                i_bBound ) = 0;
154     // INQUIRY
155     virtual const Module &
156                         GlobalNamespace() const = 0;
157     virtual const CodeEntity &
158                         Find_Ce(
159                             Ce_id               i_nId ) const = 0;
160 
161     virtual const Module &
162                         Find_Module(
163                             Ce_id               i_nId ) const = 0;
164     virtual const Module *
165                         Search_Module(
166                             Ce_id               i_nId ) const = 0;
167     virtual const Function &
168                         Find_Function(
169                             Ce_id               i_nId ) const = 0;
170     virtual const Property &
171                         Find_Property(
172                             Ce_id               i_nId ) const = 0;
173     virtual const EnumValue &
174                         Find_EnumValue(
175                             Ce_id               i_nId ) const = 0;
176     virtual const Constant &
177                         Find_Constant(
178                             Ce_id               i_nId ) const = 0;
179     virtual const StructElement &
180                         Find_StructElement(
181                             Ce_id               i_nId ) const = 0;
182     virtual void        Get_Text(
183                             StringVector &      o_module,
184                             String &            o_ce,
185                             String &            o_member,
186                             const CodeEntity &  i_ce ) const = 0;
187     virtual const NameLookup &
188                         NameDictionary() const = 0;
189     virtual void        Get_AlphabeticalIndex(
190                             std::vector<Ce_id> &
191                                                 o_rResult,
192                             alphabetical_index::E_Letter
193                                                 i_cLetter) const = 0;
194     // ACCESS
195     virtual Module &    GlobalNamespace() = 0;
196     virtual CodeEntity &
197                         Find_Ce(
198                             Ce_id               i_nId ) = 0;
199 };
200 
201 
202 
203 
204 }   // namespace idl
205 }   // namespace ary
206 #endif
207