Line data Source code
1 : /* valagenericsymbol.vala
2 : *
3 : * Copyright (C) 2023 Rico Tzschichholz
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 : * Rico Tzschichholz <ricotz@ubuntu.com>
21 : */
22 :
23 : using GLib;
24 :
25 : /**
26 : * The interface for symbols which support type parameters.
27 : */
28 : public interface Vala.GenericSymbol : Symbol {
29 : /**
30 : * Appends the specified parameter to the list of type parameters.
31 : *
32 : * @param p a type parameter
33 : */
34 130521 : public abstract void add_type_parameter (TypeParameter p);
35 :
36 : /**
37 : * Returns the type parameter list.
38 : *
39 : * @return list of type parameters
40 : */
41 58536878 : public abstract unowned List<TypeParameter> get_type_parameters ();
42 :
43 : /**
44 : * Returns whether this symbol has type parameters.
45 : *
46 : * @return true if there are type parameters
47 : */
48 390943 : public abstract bool has_type_parameters ();
49 :
50 : /**
51 : * Returns the index of the type parameter with the given name.
52 : *
53 : * @return index of a type parameter, or -1
54 : */
55 3129 : public abstract int get_type_parameter_index (string name);
56 : }
|