glib-2.0: Add float.parse/try_parse()
[vala-gnome.git] / vala / valatypesymbol.vala
blobce1d4ea30e0b29ba52902c1af55a9f1e90de1840
1 /* valatypesymbol.vala
3 * Copyright (C) 2006-2010 Jürg Billeter
4 * Copyright (C) 2006-2008 Raffaele Sandrini
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Author:
21 * Jürg Billeter <j@bitron.ch>
22 * Raffaele Sandrini <raffaele@sandrini.ch>
25 using GLib;
27 /**
28 * Represents a runtime data type. This data type may be defined in Vala source
29 * code or imported from an external library with a Vala API file.
31 public abstract class Vala.TypeSymbol : Symbol {
32 public TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = null) {
33 base (name, source_reference, comment);
36 /**
37 * Checks whether this data type has value or reference type semantics.
39 * @return true if this data type has reference type semantics
41 public virtual bool is_reference_type () {
42 return false;
45 /**
46 * Checks whether this data type is equal to or a subtype of the
47 * specified data type.
49 * @param t a data type
50 * @return true if t is a supertype of this data type, false otherwise
52 public virtual bool is_subtype_of (TypeSymbol t) {
53 return (this == t);
56 /**
57 * Return the index of the specified type parameter name.
59 public virtual int get_type_parameter_index (string name) {
60 return -1;