Update ooo320-m1
[ooovba.git] / autodoc / inc / ary / cpp / cp_ce.hxx
blob894426adb6eb2ed9fa3219c8420d5619749e28fb
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: cp_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_CP_CE_HXX
32 #define ARY_CPP_CP_CE_HXX
35 // USED SERVICES
36 // BASE CLASSES
37 // OTHER
38 #include <ary/cpp/c_types4cpp.hxx>
40 namespace ary
42 class QualifiedName;
44 namespace cpp
46 class Class;
47 class CodeEntity;
48 class Enum;
49 class EnumValue;
50 class Function;
51 class InputContext;
52 class Namespace;
53 class OperationSignature;
54 class Typedef;
55 class Variable;
57 struct FunctionFlags;
58 struct S_Parameter;
59 struct VariableFlags;
67 namespace ary
69 namespace cpp
74 /** Acess to all declared C++ code entites (types, variables, operations)
75 in the repository.
77 class CePilot
79 public:
80 // LIFECYCLE
81 virtual ~CePilot() {}
83 // OPERATIONS
84 virtual Namespace &
85 CheckIn_Namespace(
86 const InputContext &
87 i_context,
88 const String & i_localName ) = 0;
89 virtual Class & Store_Class(
90 const InputContext &
91 i_context,
92 const String & i_localName,
93 E_ClassKey i_classKey ) = 0;
94 virtual Enum & Store_Enum(
95 const InputContext &
96 i_context,
97 const String & i_localName ) = 0;
98 virtual Typedef & Store_Typedef(
99 const InputContext &
100 i_context,
101 const String & i_localName,
102 Type_id i_referredType ) = 0;
104 /// @return 0, if the function is duplicate.
105 virtual Function * Store_Operation(
106 const InputContext &
107 i_context,
108 const String & i_localName,
109 Type_id i_returnType,
110 const std::vector<S_Parameter> &
111 i_parameters,
112 E_Virtuality i_virtuality,
113 E_ConVol i_conVol,
114 FunctionFlags i_flags,
115 bool i_throwExists,
116 const std::vector<Tid> &
117 i_exceptions ) = 0;
118 virtual Variable & Store_Variable(
119 const InputContext &
120 i_context,
121 const String & i_localName,
122 Type_id i_type,
123 VariableFlags i_flags,
124 const String & i_arraySize,
125 const String & i_initValue ) = 0;
126 virtual EnumValue & Store_EnumValue(
127 const InputContext &
128 i_context,
129 const String & i_localName,
130 const String & i_initValue ) = 0;
131 // INQUIRY
132 virtual const Namespace &
133 GlobalNamespace() const = 0;
134 virtual const CodeEntity &
135 Find_Ce(
136 Ce_id i_id ) const = 0;
137 virtual const CodeEntity *
138 Search_Ce(
139 Ce_id i_id ) const = 0;
141 /// It's assumed that i_rSearchedName is an absolute name.
142 virtual const CodeEntity *
143 Search_CeAbsolute(
144 const CodeEntity & i_curScope,
145 const QualifiedName &
146 i_absoluteName ) const = 0;
147 virtual const CodeEntity *
148 Search_CeLocal(
149 const String & i_relativeName,
150 bool i_isFunction,
151 const Namespace & i_curNamespace,
152 const Class * i_curClass ) const = 0;
153 virtual void Get_QualifiedName(
154 StreamStr & o_result,
155 const String & i_localName,
156 Ce_id i_owner,
157 const char * i_delimiter = "::" ) const = 0;
158 virtual void Get_SignatureText(
159 StreamStr & o_rOut,
160 const OperationSignature &
161 i_signature,
162 const StringVector *
163 i_sParameterNames = 0 ) const = 0;
164 virtual CesResultList
165 Search_TypeName(
166 const String & i_sName ) const = 0;
167 // ACCESS
168 virtual Namespace & GlobalNamespace() = 0;
174 } // namespace cpp
175 } // namespace ary
176 #endif