11c78a5d6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31c78a5d6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41c78a5d6SAndrew Rist * or more contributor license agreements. See the NOTICE file 51c78a5d6SAndrew Rist * distributed with this work for additional information 61c78a5d6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71c78a5d6SAndrew Rist * to you under the Apache License, Version 2.0 (the 81c78a5d6SAndrew Rist * "License"); you may not use this file except in compliance 91c78a5d6SAndrew Rist * with the License. You may obtain a copy of the License at 101c78a5d6SAndrew Rist * 111c78a5d6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 121c78a5d6SAndrew Rist * 131c78a5d6SAndrew Rist * Unless required by applicable law or agreed to in writing, 141c78a5d6SAndrew Rist * software distributed under the License is distributed on an 151c78a5d6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161c78a5d6SAndrew Rist * KIND, either express or implied. See the License for the 171c78a5d6SAndrew Rist * specific language governing permissions and limitations 181c78a5d6SAndrew Rist * under the License. 191c78a5d6SAndrew Rist * 201c78a5d6SAndrew Rist *************************************************************/ 211c78a5d6SAndrew Rist 221c78a5d6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef ARY_CPP_CP_CE_HXX 25cdf0e10cSrcweir #define ARY_CPP_CP_CE_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir 28cdf0e10cSrcweir // USED SERVICES 29cdf0e10cSrcweir // BASE CLASSES 30cdf0e10cSrcweir // OTHER 31cdf0e10cSrcweir #include <ary/cpp/c_types4cpp.hxx> 32cdf0e10cSrcweir 33cdf0e10cSrcweir namespace ary 34cdf0e10cSrcweir { 35cdf0e10cSrcweir class QualifiedName; 36cdf0e10cSrcweir 37cdf0e10cSrcweir namespace cpp 38cdf0e10cSrcweir { 39cdf0e10cSrcweir class Class; 40cdf0e10cSrcweir class CodeEntity; 41cdf0e10cSrcweir class Enum; 42cdf0e10cSrcweir class EnumValue; 43cdf0e10cSrcweir class Function; 44cdf0e10cSrcweir class InputContext; 45cdf0e10cSrcweir class Namespace; 46cdf0e10cSrcweir class OperationSignature; 47cdf0e10cSrcweir class Typedef; 48cdf0e10cSrcweir class Variable; 49cdf0e10cSrcweir 50cdf0e10cSrcweir struct FunctionFlags; 51cdf0e10cSrcweir struct S_Parameter; 52cdf0e10cSrcweir struct VariableFlags; 53cdf0e10cSrcweir } 54cdf0e10cSrcweir } 55cdf0e10cSrcweir 56cdf0e10cSrcweir 57cdf0e10cSrcweir 58cdf0e10cSrcweir 59cdf0e10cSrcweir 60cdf0e10cSrcweir namespace ary 61cdf0e10cSrcweir { 62cdf0e10cSrcweir namespace cpp 63cdf0e10cSrcweir { 64cdf0e10cSrcweir 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67*07a3d7f1SPedro Giffuni /** Access to all declared C++ code entites (types, variables, operations) 68cdf0e10cSrcweir in the repository. 69cdf0e10cSrcweir */ 70cdf0e10cSrcweir class CePilot 71cdf0e10cSrcweir { 72cdf0e10cSrcweir public: 73cdf0e10cSrcweir // LIFECYCLE ~CePilot()74cdf0e10cSrcweir virtual ~CePilot() {} 75cdf0e10cSrcweir 76cdf0e10cSrcweir // OPERATIONS 77cdf0e10cSrcweir virtual Namespace & 78cdf0e10cSrcweir CheckIn_Namespace( 79cdf0e10cSrcweir const InputContext & 80cdf0e10cSrcweir i_context, 81cdf0e10cSrcweir const String & i_localName ) = 0; 82cdf0e10cSrcweir virtual Class & Store_Class( 83cdf0e10cSrcweir const InputContext & 84cdf0e10cSrcweir i_context, 85cdf0e10cSrcweir const String & i_localName, 86cdf0e10cSrcweir E_ClassKey i_classKey ) = 0; 87cdf0e10cSrcweir virtual Enum & Store_Enum( 88cdf0e10cSrcweir const InputContext & 89cdf0e10cSrcweir i_context, 90cdf0e10cSrcweir const String & i_localName ) = 0; 91cdf0e10cSrcweir virtual Typedef & Store_Typedef( 92cdf0e10cSrcweir const InputContext & 93cdf0e10cSrcweir i_context, 94cdf0e10cSrcweir const String & i_localName, 95cdf0e10cSrcweir Type_id i_referredType ) = 0; 96cdf0e10cSrcweir 97cdf0e10cSrcweir /// @return 0, if the function is duplicate. 98cdf0e10cSrcweir virtual Function * Store_Operation( 99cdf0e10cSrcweir const InputContext & 100cdf0e10cSrcweir i_context, 101cdf0e10cSrcweir const String & i_localName, 102cdf0e10cSrcweir Type_id i_returnType, 103cdf0e10cSrcweir const std::vector<S_Parameter> & 104cdf0e10cSrcweir i_parameters, 105cdf0e10cSrcweir E_Virtuality i_virtuality, 106cdf0e10cSrcweir E_ConVol i_conVol, 107cdf0e10cSrcweir FunctionFlags i_flags, 108cdf0e10cSrcweir bool i_throwExists, 109cdf0e10cSrcweir const std::vector<Tid> & 110cdf0e10cSrcweir i_exceptions ) = 0; 111cdf0e10cSrcweir virtual Variable & Store_Variable( 112cdf0e10cSrcweir const InputContext & 113cdf0e10cSrcweir i_context, 114cdf0e10cSrcweir const String & i_localName, 115cdf0e10cSrcweir Type_id i_type, 116cdf0e10cSrcweir VariableFlags i_flags, 117cdf0e10cSrcweir const String & i_arraySize, 118cdf0e10cSrcweir const String & i_initValue ) = 0; 119cdf0e10cSrcweir virtual EnumValue & Store_EnumValue( 120cdf0e10cSrcweir const InputContext & 121cdf0e10cSrcweir i_context, 122cdf0e10cSrcweir const String & i_localName, 123cdf0e10cSrcweir const String & i_initValue ) = 0; 124cdf0e10cSrcweir // INQUIRY 125cdf0e10cSrcweir virtual const Namespace & 126cdf0e10cSrcweir GlobalNamespace() const = 0; 127cdf0e10cSrcweir virtual const CodeEntity & 128cdf0e10cSrcweir Find_Ce( 129cdf0e10cSrcweir Ce_id i_id ) const = 0; 130cdf0e10cSrcweir virtual const CodeEntity * 131cdf0e10cSrcweir Search_Ce( 132cdf0e10cSrcweir Ce_id i_id ) const = 0; 133cdf0e10cSrcweir 134cdf0e10cSrcweir /// It's assumed that i_rSearchedName is an absolute name. 135cdf0e10cSrcweir virtual const CodeEntity * 136cdf0e10cSrcweir Search_CeAbsolute( 137cdf0e10cSrcweir const CodeEntity & i_curScope, 138cdf0e10cSrcweir const QualifiedName & 139cdf0e10cSrcweir i_absoluteName ) const = 0; 140cdf0e10cSrcweir virtual const CodeEntity * 141cdf0e10cSrcweir Search_CeLocal( 142cdf0e10cSrcweir const String & i_relativeName, 143cdf0e10cSrcweir bool i_isFunction, 144cdf0e10cSrcweir const Namespace & i_curNamespace, 145cdf0e10cSrcweir const Class * i_curClass ) const = 0; 146cdf0e10cSrcweir virtual void Get_QualifiedName( 147cdf0e10cSrcweir StreamStr & o_result, 148cdf0e10cSrcweir const String & i_localName, 149cdf0e10cSrcweir Ce_id i_owner, 150cdf0e10cSrcweir const char * i_delimiter = "::" ) const = 0; 151cdf0e10cSrcweir virtual void Get_SignatureText( 152cdf0e10cSrcweir StreamStr & o_rOut, 153cdf0e10cSrcweir const OperationSignature & 154cdf0e10cSrcweir i_signature, 155cdf0e10cSrcweir const StringVector * 156cdf0e10cSrcweir i_sParameterNames = 0 ) const = 0; 157cdf0e10cSrcweir virtual CesResultList 158cdf0e10cSrcweir Search_TypeName( 159cdf0e10cSrcweir const String & i_sName ) const = 0; 160cdf0e10cSrcweir // ACCESS 161cdf0e10cSrcweir virtual Namespace & GlobalNamespace() = 0; 162cdf0e10cSrcweir }; 163cdf0e10cSrcweir 164cdf0e10cSrcweir 165cdf0e10cSrcweir 166cdf0e10cSrcweir 167cdf0e10cSrcweir } // namespace cpp 168cdf0e10cSrcweir } // namespace ary 169cdf0e10cSrcweir #endif 170