Line data Source code
1 : /* valagircomment.vala
2 : *
3 : * Copyright (C) 2011 Florian Brosch
4 : *
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.
9 : *
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.
14 : *
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
18 : *
19 : * Author:
20 : * Florian Brosch <flo.brosch@gmail.com>
21 : */
22 :
23 : using GLib;
24 :
25 :
26 : /**
27 : * A documentation comment used by valadoc
28 : */
29 3 : public class Vala.GirComment : Comment {
30 2 : private HashMap<string, Comment> parameter_content = new HashMap<string, Comment> ();
31 :
32 0 : public MapIterator<string, Comment> parameter_iterator () {
33 0 : return this.parameter_content.map_iterator ();
34 : }
35 :
36 1 : public Comment? return_content { get; set; }
37 :
38 3 : public GirComment (string? comment, SourceReference _source_reference) {
39 1 : base (comment ?? "", _source_reference);
40 : }
41 :
42 2 : internal void add_content_for_parameter (string name, Comment comment) {
43 2 : parameter_content.set (name, comment);
44 : }
45 :
46 0 : public Comment? get_content_for_parameter (string name) {
47 0 : return parameter_content.get (name);
48 : }
49 : }
50 :
|