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_CP_DEF_HXX 25 #define ARY_CPP_CP_DEF_HXX 26 27 28 // USED SERVICES 29 // BASE CLASSES 30 // OTHER 31 #include <ary/cpp/c_types4cpp.hxx> 32 33 namespace ary 34 { 35 namespace cpp 36 { 37 class Define; 38 class InputContext; 39 class Macro; 40 } 41 } 42 43 44 45 46 namespace ary 47 { 48 namespace cpp 49 { 50 51 52 53 /** Acess to C++ defines and macros in the repository. 54 */ 55 class DefPilot 56 { 57 public: 58 typedef DefsList::const_iterator DefsIterator; 59 60 61 62 // LIFECYCLE 63 virtual ~DefPilot() {} 64 65 66 // OPERATIONS 67 virtual Define & Store_Define( 68 const InputContext& i_rContext, 69 const String & i_sName, 70 const StringVector & 71 i_rDefinition ) = 0; 72 virtual Macro & Store_Macro( 73 const InputContext& i_rContext, 74 const String & i_sName, 75 const StringVector & 76 i_rParams, 77 const StringVector & 78 i_rDefinition ) = 0; 79 // INQUIRY 80 virtual const DefineEntity & 81 Find_Def( 82 De_id i_id ) const = 0; 83 virtual DefsResultList 84 AllDefines() const = 0; 85 virtual DefsResultList 86 AllMacros() const = 0; 87 }; 88 89 90 91 92 93 } // namespace cpp 94 } // namespace ary 95 #endif 96