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