api/property.vala \
api/propertyaccessor.vala \
api/propertyaccessortype.vala \
- api/propertybindingtype.vala \
api/signal.vala \
api/signaturebuilder.vala \
api/sourcefile.vala \
* Represents a property declaration.
*/
public class Valadoc.Api.Property : Symbol {
- private PropertyBindingType binding_type;
private string? dbus_name;
private string? cname;
public Property (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
SourceComment? comment, string? cname, string? dbus_name, bool is_dbus_visible,
- PropertyBindingType binding_type, Vala.Property data)
+ Vala.Property data)
{
base (parent, file, name, accessibility, comment, data);
this.is_dbus_visible = is_dbus_visible;
- this.binding_type = binding_type;
this.dbus_name = dbus_name;
this.cname = cname;
*/
public bool is_virtual {
get {
- return binding_type == PropertyBindingType.VIRTUAL;
+ return ((Vala.Property) data).is_virtual;
}
}
*/
public bool is_abstract {
get {
- return binding_type == PropertyBindingType.ABSTRACT;
+ return ((Vala.Property) data).is_abstract;
}
}
*/
public bool is_override {
get {
- return binding_type == PropertyBindingType.OVERRIDE;
+ return ((Vala.Property) data).overrides;
}
}
+++ /dev/null
-/* propertybindingtype.vala
- *
- * Copyright (C) 2011 Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Author:
- * Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-public enum Valadoc.Api.PropertyBindingType {
- UNMODIFIED,
- OVERRIDE,
- ABSTRACT,
- VIRTUAL;
-
- public unowned string to_string () {
- switch (this) {
- case OVERRIDE:
- return "override";
-
- case ABSTRACT:
- return "abstract";
-
- case VIRTUAL:
- return "virtual";
-
- case UNMODIFIED:
- return "";
- }
-
- assert_not_reached ();
- }
-}
-
return Ownership.UNOWNED;
}
- private PropertyBindingType get_property_binding_type (Vala.Property element) {
- if (element.is_abstract) {
- return PropertyBindingType.ABSTRACT;
- } else if (element.is_virtual) {
- return PropertyBindingType.VIRTUAL;
- } else if (element.overrides) {
- return PropertyBindingType.OVERRIDE;
- }
-
- return PropertyBindingType.UNMODIFIED;
- }
-
//
// Vala tree creation:
element.nick,
Vala.GDBusModule.get_dbus_name_for_member (element),
Vala.GDBusModule.is_dbus_visible (element),
- get_property_binding_type (element),
element);
node.property_type = create_type_reference (element.property_type, node, node);
symbol_map.set (element, node);