xref: /AOO41X/main/autodoc/inc/ary/cpp/cp_ce.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef ARY_CPP_CP_CE_HXX
29*cdf0e10cSrcweir #define ARY_CPP_CP_CE_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir // USED SERVICES
33*cdf0e10cSrcweir 	// BASE CLASSES
34*cdf0e10cSrcweir 	// OTHER
35*cdf0e10cSrcweir #include <ary/cpp/c_types4cpp.hxx>
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir namespace ary
38*cdf0e10cSrcweir {
39*cdf0e10cSrcweir     class QualifiedName;
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir namespace cpp
42*cdf0e10cSrcweir {
43*cdf0e10cSrcweir     class Class;
44*cdf0e10cSrcweir     class CodeEntity;
45*cdf0e10cSrcweir     class Enum;
46*cdf0e10cSrcweir     class EnumValue;
47*cdf0e10cSrcweir     class Function;
48*cdf0e10cSrcweir     class InputContext;
49*cdf0e10cSrcweir     class Namespace;
50*cdf0e10cSrcweir     class OperationSignature;
51*cdf0e10cSrcweir     class Typedef;
52*cdf0e10cSrcweir     class Variable;
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir     struct FunctionFlags;
55*cdf0e10cSrcweir     struct S_Parameter;
56*cdf0e10cSrcweir     struct VariableFlags;
57*cdf0e10cSrcweir }
58*cdf0e10cSrcweir }
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir 
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir namespace ary
65*cdf0e10cSrcweir {
66*cdf0e10cSrcweir namespace cpp
67*cdf0e10cSrcweir {
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir /** Acess to all declared C++ code entites (types, variables, operations)
72*cdf0e10cSrcweir     in the repository.
73*cdf0e10cSrcweir */
74*cdf0e10cSrcweir class CePilot
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir   public:
77*cdf0e10cSrcweir     // LIFECYCLE
78*cdf0e10cSrcweir 	virtual             ~CePilot() {}
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir     // OPERATIONS
81*cdf0e10cSrcweir 	virtual Namespace &
82*cdf0e10cSrcweir 	                    CheckIn_Namespace(
83*cdf0e10cSrcweir                             const InputContext &
84*cdf0e10cSrcweir                                                 i_context,
85*cdf0e10cSrcweir                             const String  &     i_localName ) = 0;
86*cdf0e10cSrcweir 	virtual Class &     Store_Class(
87*cdf0e10cSrcweir                             const InputContext &
88*cdf0e10cSrcweir                                                 i_context,
89*cdf0e10cSrcweir 							const String  &     i_localName,
90*cdf0e10cSrcweir                             E_ClassKey          i_classKey ) = 0;
91*cdf0e10cSrcweir 	virtual Enum &      Store_Enum(
92*cdf0e10cSrcweir                             const InputContext &
93*cdf0e10cSrcweir                                                 i_context,
94*cdf0e10cSrcweir 							const String  &     i_localName ) = 0;
95*cdf0e10cSrcweir 	virtual Typedef &   Store_Typedef(
96*cdf0e10cSrcweir                             const InputContext &
97*cdf0e10cSrcweir                                                 i_context,
98*cdf0e10cSrcweir 							const String  &     i_localName,
99*cdf0e10cSrcweir                             Type_id             i_referredType ) = 0;
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir     /// @return 0, if the function is duplicate.
102*cdf0e10cSrcweir 	virtual Function *  Store_Operation(
103*cdf0e10cSrcweir                             const InputContext &
104*cdf0e10cSrcweir                                                 i_context,
105*cdf0e10cSrcweir 							const String  &     i_localName,
106*cdf0e10cSrcweir                             Type_id             i_returnType,
107*cdf0e10cSrcweir                             const std::vector<S_Parameter> &
108*cdf0e10cSrcweir                                                 i_parameters,
109*cdf0e10cSrcweir                             E_Virtuality        i_virtuality,
110*cdf0e10cSrcweir                             E_ConVol            i_conVol,
111*cdf0e10cSrcweir                             FunctionFlags       i_flags,
112*cdf0e10cSrcweir                             bool                i_throwExists,
113*cdf0e10cSrcweir                             const std::vector<Tid> &
114*cdf0e10cSrcweir                                                 i_exceptions ) = 0;
115*cdf0e10cSrcweir 	virtual Variable &  Store_Variable(
116*cdf0e10cSrcweir                             const InputContext &
117*cdf0e10cSrcweir                                                 i_context,
118*cdf0e10cSrcweir 							const String  &     i_localName,
119*cdf0e10cSrcweir                             Type_id             i_type,
120*cdf0e10cSrcweir                             VariableFlags       i_flags,
121*cdf0e10cSrcweir                             const String  &     i_arraySize,
122*cdf0e10cSrcweir                             const String  &     i_initValue ) = 0;
123*cdf0e10cSrcweir 	virtual EnumValue & Store_EnumValue(
124*cdf0e10cSrcweir                             const InputContext &
125*cdf0e10cSrcweir                                                 i_context,
126*cdf0e10cSrcweir 							const String  &     i_localName,
127*cdf0e10cSrcweir                             const String  &     i_initValue ) = 0;
128*cdf0e10cSrcweir     // INQUIRY
129*cdf0e10cSrcweir 	virtual const Namespace &
130*cdf0e10cSrcweir 	                    GlobalNamespace() const = 0;
131*cdf0e10cSrcweir 	virtual const CodeEntity &
132*cdf0e10cSrcweir 	                    Find_Ce(
133*cdf0e10cSrcweir 							Ce_id				i_id ) const = 0;
134*cdf0e10cSrcweir 	virtual const CodeEntity *
135*cdf0e10cSrcweir 	                    Search_Ce(
136*cdf0e10cSrcweir 							Ce_id		        i_id ) const = 0;
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir     /// It's assumed that i_rSearchedName is an absolute name.
139*cdf0e10cSrcweir     virtual const CodeEntity *
140*cdf0e10cSrcweir                         Search_CeAbsolute(
141*cdf0e10cSrcweir                             const CodeEntity &  i_curScope,
142*cdf0e10cSrcweir                             const QualifiedName &
143*cdf0e10cSrcweir                                                 i_absoluteName ) const = 0;
144*cdf0e10cSrcweir     virtual const CodeEntity *
145*cdf0e10cSrcweir                         Search_CeLocal(
146*cdf0e10cSrcweir                             const String  &     i_relativeName,
147*cdf0e10cSrcweir                             bool                i_isFunction,
148*cdf0e10cSrcweir                             const Namespace &   i_curNamespace,
149*cdf0e10cSrcweir                             const Class *       i_curClass ) const = 0;
150*cdf0e10cSrcweir     virtual void        Get_QualifiedName(
151*cdf0e10cSrcweir                             StreamStr &         o_result,
152*cdf0e10cSrcweir                             const String  &     i_localName,
153*cdf0e10cSrcweir                             Ce_id               i_owner,
154*cdf0e10cSrcweir                             const char *        i_delimiter = "::" ) const = 0;
155*cdf0e10cSrcweir     virtual void        Get_SignatureText(
156*cdf0e10cSrcweir                             StreamStr &         o_rOut,
157*cdf0e10cSrcweir                             const OperationSignature &
158*cdf0e10cSrcweir                                                 i_signature,
159*cdf0e10cSrcweir                             const StringVector *
160*cdf0e10cSrcweir                                                 i_sParameterNames = 0 ) const = 0;
161*cdf0e10cSrcweir     virtual CesResultList
162*cdf0e10cSrcweir                         Search_TypeName(
163*cdf0e10cSrcweir                             const String  &     i_sName ) const = 0;
164*cdf0e10cSrcweir     // ACCESS
165*cdf0e10cSrcweir    	virtual Namespace & GlobalNamespace() = 0;
166*cdf0e10cSrcweir };
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir 
171*cdf0e10cSrcweir }   // namespace cpp
172*cdf0e10cSrcweir }   // namespace ary
173*cdf0e10cSrcweir #endif
174