1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef ARY_CPP_C_TYPES4CPP_HXX 25 #define ARY_CPP_C_TYPES4CPP_HXX 26 27 28 29 // USED SERVICES 30 // BASE CLASSES 31 // OTHER 32 #include <cosv/tpl/range.hxx> 33 #include <ary/types.hxx> 34 35 36 37 namespace ary 38 { 39 namespace cpp 40 { 41 42 class Namespace; 43 class CodeEntity; 44 class Type; 45 class DefineEntity; 46 class Gate; 47 class CePilot; 48 class TypePilot; 49 class SecondariesPilot; 50 class Ce_Storage; 51 class Def_Storage; 52 class Type_Storage; 53 class UsedType; 54 55 56 typedef TypedId< ::ary::cpp::CodeEntity > Ce_id; 57 typedef TypedId< ::ary::cpp::Type > Type_id; 58 typedef TypedId< ::ary::cpp::DefineEntity > De_id; 59 60 61 typedef std::vector<Ce_id> CesList; 62 typedef std::vector<De_id> DefsList; 63 typedef std::vector<Type_id> TypesList; 64 65 typedef std::vector<Ce_id>::const_iterator CesConstIterator; 66 typedef std::vector<De_id>::const_iterator DefsConstIterator; 67 typedef std::vector<Type_id>::const_iterator TypesConstIterator; 68 69 typedef csv::range< CesConstIterator > CesResultList; 70 typedef csv::range< DefsConstIterator > DefsResultList; 71 typedef csv::range< TypesConstIterator > TypesResultList; 72 73 74 typedef std::map<String, Ce_id> Map_LocalCe; 75 76 77 78 enum E_Protection 79 { 80 PROTECT_global = 0, 81 PROTECT_local, /// within Functions 82 PROTECT_public, 83 PROTECT_protected, 84 PROTECT_private 85 }; 86 87 /** The sequence of E_Virtuality's values must not be changed, 88 because they are used in int-comparisons. 89 */ 90 enum E_Virtuality 91 { 92 VIRTUAL_none = 0, 93 VIRTUAL_virtual, 94 VIRTUAL_abstract 95 }; 96 97 enum E_ClassKey 98 { 99 CK_class, 100 CK_struct, 101 CK_union 102 }; 103 104 enum E_TypeSpecialisation 105 { 106 TYSP_none = 0, 107 TYSP_unsigned, 108 TYSP_signed 109 }; 110 111 enum E_ConVol 112 { 113 CONVOL_none = 0, 114 CONVOL_const = 0x0001, 115 CONVOL_volatile = 0x0002, 116 CONVOL_both = 0x0003 117 }; 118 119 120 121 // Backwards compatibility: 122 typedef Ce_id Cid; 123 typedef Type_id Tid; 124 125 126 127 128 } // namespace cpp 129 } // namespace ary 130 #endif 131