<commit_before>/* delegate.vala
 *
 * Copyright (C) 2008-2011  <NAME>
 *
 * 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:
 * 	<NAME> <<EMAIL>>
 */

using Gee;
using Valadoc.Content;


/**
 * Represents a Delegate.
 */
public class Valadoc.Api.Delegate : TypeSymbol {
	private string? cname;

	public Delegate (Node parent, SourceFile file, string name, SymbolAccessibility accessibility, SourceComment? comment, string? cname, bool is_static, void* data) {
		base (parent, file, name, accessibility, comment, false, data);

		this.is_static = is_static;
		this.cname = cname;
	}

	/**
	 * Returns the name of this delegate as it is used in C.
	 */
	public string? get_cname () {
		return cname;
	}

	/**
	 * The return type of this callback.
	 *
	 * @return The return type of this callback or null for void
	 */
	public TypeReference? return_type {
		set;
		get;
	}

	/**
	 * {@inheritDoc}
	 */
	public override NodeType node_type {
		get { return NodeType.DELEGATE; }
	}

	/**
	 * {@inheritDoc}
	 */
	public override void accept (Visitor visitor) {
		visitor.visit_delegate (this);
	}

	/**
	 * Specifies whether this delegate is static
	 */
	public bool is_static {
		private set;
		get;
	}

	/**
	 * {@inheritDoc}
	 */
	protected override Inline build_signature () {
		var signature = new SignatureBuilder ();

		signature.append_keyword (get_accessibility_modifier ());
		if (is_static) {
			signature.append_keyword ("static");
		}

		signature.append_content (return_type.signature);<commit_msg>libvaladoc/api: Delegate: build_signature: Add missing keyword<commit_after>/* delegate.vala
 *
 * Copyright (C) 2008-2011  <NAME>
 *
 * 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:
 * 	<NAME> <<EMAIL>>
 */

using Gee;
using Valadoc.Content;


/**
 * Represents a Delegate.
 */
public class Valadoc.Api.Delegate : TypeSymbol {
	private string? cname;

	public Delegate (Node parent, SourceFile file, string name, SymbolAccessibility accessibility, SourceComment? comment, string? cname, bool is_static, void* data) {
		base (parent, file, name, accessibility, comment, false, data);

		this.is_static = is_static;
		this.cname = cname;
	}

	/**
	 * Returns the name of this delegate as it is used in C.
	 */
	public string? get_cname () {
		return cname;
	}

	/**
	 * The return type of this callback.
	 *
	 * @return The return type of this callback or null for void
	 */
	public TypeReference? return_type {
		set;
		get;
	}

	/**
	 * {@inheritDoc}
	 */
	public override NodeType node_type {
		get { return NodeType.DELEGATE; }
	}

	/**
	 * {@inheritDoc}
	 */
	public override void accept (Visitor visitor) {
		visitor.visit_delegate (this);
	}

	/**
	 * Specifies whether this delegate is static
	 */
	public bool is_static {
		private set;
		get;
	}

	/**
	 * {@inheritDoc}
	 */
	protected override Inline build_signature () {
		var signature = new SignatureBuilder ();

		signature.append_keyword (get_accessibility_modifier ());
		signature.append_keyword ("delegate");
		signature.append_content (return_type.signature);
{'fraction_non_alphanumeric': 0.09549549549549549, 'fraction_numerical': 0.00945945945945946, 'mean_word_length': 3.630865484880083, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7227240', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1265, 'n_words': 510}