merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / ary / cpp / ca_ce.hxx
blob8ac2bb3c421c71fba342aed81bf397492f0be11f
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: ca_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_CPP_CA_CE_HXX
32 #define ARY_CPP_CA_CE_HXX
34 // USED SERVICES
35 // BASE CLASSES
36 #include <ary/cpp/cp_ce.hxx>
37 // OTHER
38 #include "cs_ce.hxx"
41 namespace ary
43 namespace cpp
45 class Ce_Storage;
46 class RepositoryPartition;
54 namespace ary
56 namespace cpp
61 /** Administrates all C++ code entities (types, operations, variables).
63 class CeAdmin : public CePilot
65 public:
66 // LIFECYCLE
67 CeAdmin(
68 RepositoryPartition &
69 io_myReposyPartition );
70 void Set_Related(
71 const TypePilot & i_types );
72 virtual ~CeAdmin();
74 // INQUIRY
75 const Ce_Storage & Storage() const;
77 // ACCESS
78 Ce_Storage & Storage();
80 // INHERITED
81 // Interface CePilot:
82 virtual Namespace & CheckIn_Namespace(
83 const InputContext &
84 i_context,
85 const String & i_localName );
86 virtual Class & Store_Class(
87 const InputContext &
88 i_context,
89 const String & i_localName,
90 E_ClassKey i_classKey );
91 virtual Enum & Store_Enum(
92 const InputContext &
93 i_context,
94 const String & i_localName );
95 virtual Typedef & Store_Typedef(
96 const InputContext &
97 i_context,
98 const String & i_localName,
99 Type_id i_referredType );
100 virtual Function * Store_Operation(
101 const InputContext &
102 i_context,
103 const String & i_localName,
104 Type_id i_returnType,
105 const std::vector<S_Parameter> &
106 i_parameters,
107 E_Virtuality i_virtuality,
108 E_ConVol i_conVol,
109 FunctionFlags i_flags,
110 bool i_throwExists,
111 const std::vector<Type_id> &
112 i_exceptions );
113 virtual Variable & Store_Variable(
114 const InputContext &
115 i_context,
116 const String & i_localName,
117 Type_id i_type,
118 VariableFlags i_flags,
119 const String & i_arraySize,
120 const String & i_initValue );
121 virtual EnumValue & Store_EnumValue(
122 const InputContext &
123 i_context,
124 const String & i_localName,
125 const String & i_initValue );
126 virtual const Namespace &
127 GlobalNamespace() const;
128 virtual const CodeEntity &
129 Find_Ce(
130 Ce_id i_id ) const;
131 virtual const CodeEntity *
132 Search_Ce(
133 Ce_id i_id ) const;
134 virtual const CodeEntity *
135 Search_CeAbsolute(
136 const CodeEntity & i_curScope,
137 const QualifiedName &
138 i_absoluteName ) const;
139 virtual const CodeEntity *
140 Search_CeLocal(
141 const String & i_relativeName,
142 bool i_isFunction,
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,
148 Ce_id i_owner,
149 const char * i_delimiter = "::" ) const;
150 virtual void Get_SignatureText(
151 StreamStr & o_rOut,
152 const OperationSignature &
153 i_signature,
154 const StringVector *
155 i_sParameterNames = 0 ) const;
156 virtual CesResultList
157 Search_TypeName(
158 const String & i_sName ) const;
159 virtual Namespace & GlobalNamespace();
161 private:
162 // Locals
163 /// @return true, if function is duplicate.
164 enum E_DuplicateFunction
166 df_no,
167 df_replace,
168 df_discard_new
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,
176 const InputContext &
177 i_context,
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;
187 // DATA
188 Ce_Storage aStorage;
189 const TypePilot * pTypes;
190 RepositoryPartition *
191 pCppRepositoryPartition;
197 // IMPLEMENTATION
198 inline const Ce_Storage &
199 CeAdmin::Storage() const
201 return aStorage;
204 inline Ce_Storage &
205 CeAdmin::Storage()
207 return aStorage;
214 } // namespace cpp
215 } // namespace ary
216 #endif