libvaladoc: Replace void* with corresponding Vala API
[vala-gnome.git] / libvaladoc / api / errordomain.vala
blob80b16bb7f692f996ecd245c5b60efb63dba1c59b
1 /* errordomain.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 an error domain declaration.
29 public class Valadoc.Api.ErrorDomain : TypeSymbol {
30 private string? quark_function_name;
31 private string? quark_macro_name;
32 private string? dbus_name;
33 private string? cname;
35 public ErrorDomain (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
36 SourceComment? comment, string? cname, string? quark_macro_name,
37 string? quark_function_name, string? dbus_name, Vala.ErrorDomain data)
39 base (parent, file, name, accessibility, comment, null, null, null, null, false, data);
41 this.quark_function_name = quark_function_name;
42 this.quark_macro_name = quark_macro_name;
43 this.dbus_name = dbus_name;
44 this.cname = cname;
47 /**
48 * Returns the name of this errordomain as it is used in C.
50 public string? get_cname () {
51 return this.cname;
54 /**
55 * Returns the dbus-name.
57 public string? get_dbus_name () {
58 return dbus_name;
61 /**
62 * Gets the name of the quark() function which represents the error domain
64 public string get_quark_function_name () {
65 return quark_function_name;
68 /**
69 * Gets the name of the quark macro which represents the error domain
71 public string get_quark_macro_name () {
72 return quark_macro_name;
75 /**
76 * {@inheritDoc}
78 public override NodeType node_type {
79 get { return NodeType.ERROR_DOMAIN; }
82 /**
83 * {@inheritDoc}
85 public override void accept (Visitor visitor) {
86 visitor.visit_error_domain (this);
89 /**
90 * {@inheritDoc}
92 protected override Inline build_signature () {
93 return new SignatureBuilder ()
94 .append_keyword (accessibility.to_string ())
95 .append_keyword ("errordomain")
96 .append_symbol (this)
97 .get ();