1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef ARY_CPP_ICPRIVOW_HXX 29 #define ARY_CPP_ICPRIVOW_HXX 30 31 32 33 // USED SERVICES 34 // BASE CLASSES 35 #include <ary/cpp/inpcontx.hxx> 36 // COMPONENTS 37 // PARAMETERS 38 39 namespace cpp 40 { 41 42 43 44 typedef ary::cpp::Ce_id Cid; 45 46 47 class Owner_Namespace : public ary::cpp::InputContext::Owner 48 { 49 public: 50 Owner_Namespace(); 51 void SetAnotherNamespace( 52 ary::cpp::Namespace & 53 io_rScope ); 54 virtual bool HasClass( 55 const String & i_sLocalName ); 56 private: 57 virtual void do_Add_Class( 58 const String & i_sLocalName, 59 Cid i_nId ); 60 virtual void do_Add_Enum( 61 const String & i_sLocalName, 62 Cid i_nId ); 63 virtual void do_Add_Typedef( 64 const String & i_sLocalName, 65 Cid i_nId ); 66 virtual void do_Add_Operation( 67 const String & i_sLocalName, 68 Cid i_nId, 69 bool ); 70 virtual void do_Add_Variable( 71 const String & i_sLocalName, 72 Cid i_nId, 73 bool i_bIsConst, 74 bool i_bIsStatic ); 75 virtual Cid inq_CeId() const; 76 77 // DATA 78 ary::cpp::Namespace * 79 pScope; 80 }; 81 82 class Owner_Class : public ary::cpp::InputContext::Owner 83 { 84 public: 85 Owner_Class(); 86 void SetAnotherClass( 87 ary::cpp::Class & io_rScope ); 88 89 /** @attention Only a dummy for use at ary::cpp::Gate! 90 Will work nerver! 91 */ 92 virtual bool HasClass( 93 const String & i_sLocalName ); 94 private: 95 virtual void do_Add_Class( 96 const String & i_sLocalName, 97 Cid i_nId ); 98 virtual void do_Add_Enum( 99 const String & i_sLocalName, 100 Cid i_nId ); 101 virtual void do_Add_Typedef( 102 const String & i_sLocalName, 103 Cid i_nId ); 104 virtual void do_Add_Operation( 105 const String & i_sLocalName, 106 Cid i_nId, 107 bool i_bIsStaticMember ); 108 virtual void do_Add_Variable( 109 const String & i_sLocalName, 110 Cid i_nId, 111 bool i_bIsConst, 112 bool i_bIsStatic ); 113 virtual Cid inq_CeId() const; 114 115 // DATA 116 ary::cpp::Class * pScope; 117 }; 118 119 120 121 122 } // namespace cpp 123 #endif 124