3 * Copyright (C) 2008-2011 Florian Brosch
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Florian Brosch <flo.brosch@gmail.com>
24 using Valadoc
.Content
;
27 * Represents a namespace declaration.
29 public class Valadoc
.Api
.Namespace
: Symbol
{
30 private SourceComment? source_comment
;
32 public Namespace (Api
.Node parent
, SourceFile file
, string? name
, SourceComment? comment
, Vala
.Namespace data
) {
33 base (parent
, file
, name
, SymbolAccessibility
.PUBLIC
, data
);
35 this
.source_comment
= comment
;
42 internal override void parse_comments (Settings settings
, DocumentationParser parser
) {
43 if (documentation
!= null) {
47 if (source_comment
!= null) {
48 documentation
= parser
.parse (this
, source_comment
);
51 base.parse_comments (settings
, parser
);
57 internal override void check_comments (Settings settings
, DocumentationParser parser
) {
58 if (documentation
!= null) {
59 parser
.check (this
, documentation
);
62 base.check_comments (settings
, parser
);
69 protected override Inline
build_signature () {
70 return new
SignatureBuilder ()
71 .append_keyword (accessibility
.to_string ())
72 .append_keyword ("namespace")
80 public override NodeType node_type
{ get { return NodeType
.NAMESPACE
; } }
85 public override void accept (Visitor visitor
) {
86 visitor
.visit_namespace (this
);
92 public override bool is_browsable (Settings settings
) {
93 return has_visible_children (settings
);