xref: /aoo4110/main/autodoc/inc/ary/cpp/c_ce.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_C_CE_HXX
25 #define ARY_CPP_C_CE_HXX
26 
27 
28 // USED SERVICES
29 	// BASE CLASSES
30 #include <ary/cpp/c_cppentity.hxx>
31 	// COMPONENTS
32 #include <ary/doc/d_docu.hxx>
33 	// PARAMETERS
34 #include <ary/cpp/c_types4cpp.hxx>
35 #include <ary/cpp/c_traits.hxx>
36 #include <ary/loc/loc_types4loc.hxx>
37 
38 
39 namespace ary
40 {
41 namespace cpp
42 {
43 
44 typedef loc::Le_id  Lid;
45 
46 
47 
48 /** Represents a C++ code entity.
49 */
50 class CodeEntity : public ary::cpp::CppEntity
51 {
52   public:
53     typedef Ce_Traits       traits_t;
54 
55 	// LIFECYCLE
~CodeEntity()56 	virtual			   	~CodeEntity() {}
57 
58 	// INQUIRY
CeId() const59     Ce_id               CeId() const            { return Ce_id(Id()); }
60 	const String  &     LocalName() const;
61 	Cid                 Owner() const;
62 	Lid			        Location() const;
63     bool                IsVisible() const;
64 
65     // ACCESS
Set_InVisible()66     void                Set_InVisible()         { bIsVisible = false; }
67 
68   protected:
CodeEntity()69                         CodeEntity() : bIsVisible(true) {}
70 
71   private:
72     // Locals
73 	virtual const String  &
74                         inq_LocalName() const = 0;
75 	virtual Cid         inq_Owner() const = 0;
76 	virtual Lid			inq_Location() const = 0;
77 
78 	// DATA
79 	mutable bool        bIsVisible;
80 };
81 
82 
83 // IMPLEMENTATION
84 inline const String  &
LocalName() const85 CodeEntity::LocalName() const
86     { return inq_LocalName(); }
87 inline Cid
Owner() const88 CodeEntity::Owner() const
89     { return inq_Owner(); }
90 inline Lid
Location() const91 CodeEntity::Location() const
92     { return inq_Location(); }
93 
94 
95 
96 
97 }   // namespace cpp
98 }   // namespace ary
99 #endif
100