xref: /aoo41x/main/autodoc/inc/ary/idl/i_ce.hxx (revision 1c78a5d6)
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_IDL_I_CE_HXX
25 #define ARY_IDL_I_CE_HXX
26 
27 // BASE CLASSES
28 #include <ary/entity.hxx>
29 // USED SERVICES
30 #include <ary/doc/d_docu.hxx>
31 #include <ary/idl/i_ce2s.hxx>
32 #include <ary/idl/i_types4idl.hxx>
33 
34 
35 
36 
37 
38 
39 namespace ary
40 {
41 namespace idl
42 {
43 
44 
45 /** @resp Base class for all IDL code entities.
46 
47     A @->CodeEntity is a namespace, type, data or function, which occures in
48     the parsed UNO IDL code and is described and/or commented within the
49     Autodoc repository.
50 
51     This is a storage base class, where more special classes are
52     derived from.
53 */
54 class CodeEntity : public ary::Entity
55 {
56   public:
57     // LIFECYCLE
58     virtual             ~CodeEntity();
59 
60     // OPERATION
61 
62     // INQUIRY
CeId() const63     Ce_id               CeId() const            { return Ce_id(Id()); }
64     const String &      LocalName() const;
65     Ce_id               NameRoom() const;
66     Ce_id               Owner() const;
67     E_SightLevel        SightLevel() const;
68 
69     const ary::doc::Documentation &
70                         Docu() const;
71     const Ce_2s &       Secondaries() const;
72 
73     static const CodeEntity &
74                         Null_();
75     // ACCESS
76     void                Set_Docu(
77                             DYN ary::doc::Node &
78                                                 pass_data );
79     Ce_2s &             Secondaries();
80 
81   protected:
82                         CodeEntity();
83   private:
84     // Locals
85     virtual const String &  inq_LocalName() const = 0;
86     virtual Ce_id           inq_NameRoom() const = 0;
87     virtual Ce_id           inq_Owner() const = 0;
88     virtual E_SightLevel    inq_SightLevel() const = 0;
89 
90     // DATA
91 	ary::doc::Documentation
92 	                    aDocu;
93     Dyn<Ce_2s>          p2s;
94 };
95 
96 
97 
98 
99 // IMPLEMENTATION
100 inline const String &
LocalName() const101 CodeEntity::LocalName() const
102     { return inq_LocalName(); }
103 
104 inline Ce_id
NameRoom() const105 CodeEntity::NameRoom() const
106     { return inq_NameRoom(); }
107 
108 inline Ce_id
Owner() const109 CodeEntity::Owner() const
110     { return inq_Owner(); }
111 
112 inline E_SightLevel
SightLevel() const113 CodeEntity::SightLevel() const
114     { return inq_SightLevel(); }
115 
116 inline const ary::doc::Documentation &
Docu() const117 CodeEntity::Docu() const
118     { return aDocu; }
119 
120 inline void
Set_Docu(DYN ary::doc::Node & pass_data)121 CodeEntity::Set_Docu(DYN ary::doc::Node & pass_data)
122 {
123     aDocu.Set_Data(pass_data);
124 }
125 
126 
127 
128 
129 }   // namespace idl
130 }   // namespace ary
131 #endif
132