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_CA_DEF_HXX 29 #define ARY_CPP_CA_DEF_HXX 30 31 // USED SERVICES 32 // BASE CLASSES 33 #include <ary/cpp/cp_def.hxx> 34 // OTHER 35 #include "cs_def.hxx" 36 37 38 39 namespace ary 40 { 41 namespace cpp 42 { 43 class Def_Storage; 44 class RepositoryPartition; 45 } 46 } 47 48 49 50 51 52 namespace ary 53 { 54 namespace cpp 55 { 56 57 58 59 60 class DefAdmin : public DefPilot 61 { 62 public: 63 // LIFECYCLE 64 DefAdmin( 65 RepositoryPartition & 66 io_myReposyPartition ); 67 ~DefAdmin(); 68 69 // INQUIRY 70 const Def_Storage & Storage() const; 71 72 // INHERITED 73 // Interface DefPilot: 74 virtual Define & Store_Define( 75 const InputContext& i_rContext, 76 const String & i_sName, 77 const StringVector & 78 i_rDefinition ); 79 virtual Macro & Store_Macro( 80 const InputContext& i_rContext, 81 const String & i_sName, 82 const StringVector & 83 i_rParams, 84 const StringVector & 85 i_rDefinition ); 86 virtual const DefineEntity & 87 Find_Def( 88 De_id i_id ) const; 89 virtual DefsResultList 90 AllDefines() const; 91 virtual DefsResultList 92 AllMacros() const; 93 94 private: 95 // DATA 96 Def_Storage aStorage; 97 RepositoryPartition * 98 pCppRepositoryPartition; 99 }; 100 101 102 103 104 // IMPLEMENTATION 105 inline const Def_Storage & 106 DefAdmin::Storage() const 107 { 108 return aStorage; 109 } 110 111 112 113 } // namespace cpp 114 } // namespace ary 115 #endif 116