1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ca_ce.hxx,v $
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_CPP_CA_CE_HXX
32 #define ARY_CPP_CA_CE_HXX
36 #include <ary/cpp/cp_ce.hxx>
46 class RepositoryPartition
;
61 /** Administrates all C++ code entities (types, operations, variables).
63 class CeAdmin
: public CePilot
69 io_myReposyPartition
);
71 const TypePilot
& i_types
);
75 const Ce_Storage
& Storage() const;
78 Ce_Storage
& Storage();
82 virtual Namespace
& CheckIn_Namespace(
85 const String
& i_localName
);
86 virtual Class
& Store_Class(
89 const String
& i_localName
,
90 E_ClassKey i_classKey
);
91 virtual Enum
& Store_Enum(
94 const String
& i_localName
);
95 virtual Typedef
& Store_Typedef(
98 const String
& i_localName
,
99 Type_id i_referredType
);
100 virtual Function
* Store_Operation(
103 const String
& i_localName
,
104 Type_id i_returnType
,
105 const std::vector
<S_Parameter
> &
107 E_Virtuality i_virtuality
,
109 FunctionFlags i_flags
,
111 const std::vector
<Type_id
> &
113 virtual Variable
& Store_Variable(
116 const String
& i_localName
,
118 VariableFlags i_flags
,
119 const String
& i_arraySize
,
120 const String
& i_initValue
);
121 virtual EnumValue
& Store_EnumValue(
124 const String
& i_localName
,
125 const String
& i_initValue
);
126 virtual const Namespace
&
127 GlobalNamespace() const;
128 virtual const CodeEntity
&
131 virtual const CodeEntity
*
134 virtual const CodeEntity
*
136 const CodeEntity
& i_curScope
,
137 const QualifiedName
&
138 i_absoluteName
) const;
139 virtual const CodeEntity
*
141 const String
& i_relativeName
,
143 const Namespace
& i_curNamespace
,
144 const Class
* i_curClass
) const;
145 virtual void Get_QualifiedName(
146 StreamStr
& o_result
,
147 const String
& i_localName
,
149 const char * i_delimiter
= "::" ) const;
150 virtual void Get_SignatureText(
152 const OperationSignature
&
155 i_sParameterNames
= 0 ) const;
156 virtual CesResultList
158 const String
& i_sName
) const;
159 virtual Namespace
& GlobalNamespace();
163 /// @return true, if function is duplicate.
164 enum E_DuplicateFunction
171 /** @param o_existentFunction
172 The id of the already existing function, else unset.
174 E_DuplicateFunction
lhf_CheckAndHandle_DuplicateOperation(
175 Ce_id
& o_existentFunction
,
178 const Function
& i_newFunction
);
179 Namespace
& Create_Namespace(
180 Namespace
& o_parent
,
181 const String
& i_localName
);
182 Ce_id
Search_MatchingInstance(
183 CesResultList i_list
,
184 Ce_id i_owner
) const;
185 const TypePilot
& Types() const;
189 const TypePilot
* pTypes
;
190 RepositoryPartition
*
191 pCppRepositoryPartition
;
198 inline const Ce_Storage
&
199 CeAdmin::Storage() const