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_ICPRIVOW_HXX 25 #define ARY_CPP_ICPRIVOW_HXX 26 27 28 29 // USED SERVICES 30 // BASE CLASSES 31 #include <ary/cpp/inpcontx.hxx> 32 // COMPONENTS 33 // PARAMETERS 34 35 namespace cpp 36 { 37 38 39 40 typedef ary::cpp::Ce_id Cid; 41 42 43 class Owner_Namespace : public ary::cpp::InputContext::Owner 44 { 45 public: 46 Owner_Namespace(); 47 void SetAnotherNamespace( 48 ary::cpp::Namespace & 49 io_rScope ); 50 virtual bool HasClass( 51 const String & i_sLocalName ); 52 private: 53 virtual void do_Add_Class( 54 const String & i_sLocalName, 55 Cid i_nId ); 56 virtual void do_Add_Enum( 57 const String & i_sLocalName, 58 Cid i_nId ); 59 virtual void do_Add_Typedef( 60 const String & i_sLocalName, 61 Cid i_nId ); 62 virtual void do_Add_Operation( 63 const String & i_sLocalName, 64 Cid i_nId, 65 bool ); 66 virtual void do_Add_Variable( 67 const String & i_sLocalName, 68 Cid i_nId, 69 bool i_bIsConst, 70 bool i_bIsStatic ); 71 virtual Cid inq_CeId() const; 72 73 // DATA 74 ary::cpp::Namespace * 75 pScope; 76 }; 77 78 class Owner_Class : public ary::cpp::InputContext::Owner 79 { 80 public: 81 Owner_Class(); 82 void SetAnotherClass( 83 ary::cpp::Class & io_rScope ); 84 85 /** @attention Only a dummy for use at ary::cpp::Gate! 86 Will work nerver! 87 */ 88 virtual bool HasClass( 89 const String & i_sLocalName ); 90 private: 91 virtual void do_Add_Class( 92 const String & i_sLocalName, 93 Cid i_nId ); 94 virtual void do_Add_Enum( 95 const String & i_sLocalName, 96 Cid i_nId ); 97 virtual void do_Add_Typedef( 98 const String & i_sLocalName, 99 Cid i_nId ); 100 virtual void do_Add_Operation( 101 const String & i_sLocalName, 102 Cid i_nId, 103 bool i_bIsStaticMember ); 104 virtual void do_Add_Variable( 105 const String & i_sLocalName, 106 Cid i_nId, 107 bool i_bIsConst, 108 bool i_bIsStatic ); 109 virtual Cid inq_CeId() const; 110 111 // DATA 112 ary::cpp::Class * pScope; 113 }; 114 115 116 117 118 } // namespace cpp 119 #endif 120