api/interface.vala \
api/item.vala \
api/method.vala \
- api/methodbindingtype.vala \
api/namespace.vala \
api/node.vala \
api/nodetype.vala \
private string? dbus_name;
private string? cname;
- private MethodBindingType binding_type;
-
/**
* {@inheritDoc}
*/
public Method (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
SourceComment? comment, string? cname, string? dbus_name, string? dbus_result_name,
- string? finish_function_cname, MethodBindingType binding_type, bool is_yields,
+ string? finish_function_cname, bool is_yields,
bool is_dbus_visible, bool is_constructor, Vala.Method data)
{
base (parent, file, name, accessibility, comment, data);
this.dbus_name = dbus_name;
this.cname = cname;
- this.binding_type = binding_type;
this.is_dbus_visible = is_dbus_visible;
this.is_constructor = is_constructor;
this.is_yields = is_yields;
*/
public bool is_abstract {
get {
- return binding_type == MethodBindingType.ABSTRACT;
+ return ((Vala.Method) data).is_abstract;
}
}
*/
public bool is_virtual {
get {
- return binding_type == MethodBindingType.VIRTUAL;
+ return ((Vala.Method) data).is_virtual;
}
}
*/
public bool is_override {
get {
- return binding_type == MethodBindingType.OVERRIDE;
+ return ((Vala.Method) data).overrides;
}
}
*/
public bool is_static {
get {
- return !is_constructor && binding_type == MethodBindingType.STATIC
+ return !is_constructor && ((Vala.Method) data).binding == Vala.MemberBinding.STATIC
&& parent is Namespace == false;
}
}
*/
public bool is_inline {
get {
- return binding_type == MethodBindingType.INLINE;
+ return ((Vala.Method) data).is_inline;
}
}
+++ /dev/null
-/* methodbindingtype.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:
- * Brosch Florian <flo.brosch@gmail.com>
- */
-
-
-public enum Valadoc.MethodBindingType {
- UNMODIFIED,
- OVERRIDE,
- ABSTRACT,
- VIRTUAL,
- INLINE,
- STATIC;
-
- public unowned string to_string () {
- switch (this) {
- case OVERRIDE:
- return "override";
-
- case ABSTRACT:
- return "abstract";
-
- case VIRTUAL:
- return "virtual";
-
- case INLINE:
- return "inline";
-
- case STATIC:
- return "static";
-
- case UNMODIFIED:
- return "";
- }
-
- assert_not_reached ();
- }
-}
return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
}
- private MethodBindingType get_method_binding_type (Vala.Method element) {
- if (element.is_inline) {
- return MethodBindingType.INLINE;
- } else if (element.is_abstract) {
- return MethodBindingType.ABSTRACT;
- } else if (element.is_virtual) {
- return MethodBindingType.VIRTUAL;
- } else if (element.overrides) {
- return MethodBindingType.OVERRIDE;
- } else if (element.is_inline) {
- return MethodBindingType.INLINE;
- } else if (element.binding != Vala.MemberBinding.INSTANCE) {
- return MethodBindingType.STATIC;
- }
- return MethodBindingType.UNMODIFIED;
- }
-
private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
if (element.writable) {
Vala.GDBusModule.get_dbus_name_for_member (element),
Vala.GDBusModule.dbus_result_name (element),
(element.coroutine)? get_finish_name (element) : null,
- get_method_binding_type (element),
element.coroutine,
Vala.GDBusModule.is_dbus_visible (element),
element is Vala.CreationMethod,
Vala.GDBusModule.get_dbus_name_for_member (element),
Vala.GDBusModule.dbus_result_name (element),
(element.coroutine)? get_finish_name (element) : null,
- get_method_binding_type (element),
element.coroutine,
Vala.GDBusModule.is_dbus_visible (element),
element is Vala.CreationMethod,