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 #include <precomp.h>
23 #include <ary/cessentl.hxx>
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <ary/cpp/c_ce.hxx>
28 #include <ary/doc/d_oldcppdocu.hxx>
29 
30 
31 namespace ary
32 {
33 namespace cpp
34 {
35 
36 
CeEssentials()37 CeEssentials::CeEssentials()
38 	:   sLocalName(),
39 		nOwner(0),
40 		nLocation(0)
41 {
42 }
43 
CeEssentials(const String & i_sLocalName,Cid i_nOwner,loc::Le_id i_nLocation)44 CeEssentials::CeEssentials( const String  &     i_sLocalName,
45 							Cid					i_nOwner,
46 							loc::Le_id  		i_nLocation )
47 	:   sLocalName(i_sLocalName),
48 		nOwner(i_nOwner),
49 		nLocation(i_nLocation)
50 {
51 }
52 
~CeEssentials()53 CeEssentials::~CeEssentials()
54 {
55 }
56 
57 
58 
59 inline bool
IsInternal(const doc::Documentation & i_doc)60 IsInternal(const doc::Documentation & i_doc)
61 {
62     const ary::doc::OldCppDocu *
63         docu = dynamic_cast< const ary::doc::OldCppDocu* >(i_doc.Data());
64     if (docu != 0)
65         return docu->IsInternal();
66     return false;
67 }
68 
69 
70 bool
IsVisible() const71 CodeEntity::IsVisible() const
72 {
73     // KORR_FUTURE:   Improve the whole handling of internal and visibility.
74     return bIsVisible && NOT IsInternal(Docu());
75 }
76 
77 
78 
79 }   // namespace cpp
80 }   // namespace ary
81