Release 0.41.92
[vala-gnome.git] / libvaladoc / api / namespace.vala
blobc441782cae3f043e438b404503159a512859db9c
1 /* namespace.vala
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
19 * Author:
20 * Florian Brosch <flo.brosch@gmail.com>
24 using Valadoc.Content;
26 /**
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;
39 /**
40 * {@inheritDoc}
42 internal override void parse_comments (Settings settings, DocumentationParser parser) {
43 if (documentation != null) {
44 return ;
47 if (source_comment != null) {
48 documentation = parser.parse (this, source_comment);
51 base.parse_comments (settings, parser);
54 /**
55 * {@inheritDoc}
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);
66 /**
67 * {@inheritDoc}
69 protected override Inline build_signature () {
70 return new SignatureBuilder ()
71 .append_keyword (accessibility.to_string ())
72 .append_keyword ("namespace")
73 .append_symbol (this)
74 .get ();
77 /**
78 * {@inheritDoc}
80 public override NodeType node_type { get { return NodeType.NAMESPACE; } }
82 /**
83 * {@inheritDoc}
85 public override void accept (Visitor visitor) {
86 visitor.visit_namespace (this);
89 /**
90 * {@inheritDoc}
92 public override bool is_browsable (Settings settings) {
93 return has_visible_children (settings);