1 /**
2 Emits a specified signal.
3 
4 Copyright:
5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
7 Copyright (c) 2017-2018 Godot-D contributors  
8 
9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
10 
11 
12 */
13 module godot.visualscriptemitsignal;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.visualscriptnode;
25 /**
26 Emits a specified signal.
27 
28 Emits a specified signal when it is executed.
29 $(B Input Ports:)
30 - Sequence: `emit`
31 $(B Output Ports:)
32 - Sequence
33 */
34 @GodotBaseClass struct VisualScriptEmitSignal
35 {
36 	package(godot) enum string _GODOT_internal_name = "VisualScriptEmitSignal";
37 public:
38 @nogc nothrow:
39 	union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; }
40 	alias _GODOT_base this;
41 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
42 	package(godot) __gshared bool _classBindingInitialized = false;
43 	package(godot) static struct GDNativeClassBinding
44 	{
45 		__gshared:
46 		@GodotName("get_signal") GodotMethod!(String) getSignal;
47 		@GodotName("set_signal") GodotMethod!(void, String) setSignal;
48 	}
49 	/// 
50 	pragma(inline, true) bool opEquals(in VisualScriptEmitSignal other) const
51 	{ return _godot_object.ptr is other._godot_object.ptr; }
52 	/// 
53 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
54 	{ _godot_object.ptr = n; return null; }
55 	/// 
56 	pragma(inline, true) bool opEquals(typeof(null) n) const
57 	{ return _godot_object.ptr is n; }
58 	/// 
59 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
60 	mixin baseCasts;
61 	/// Construct a new instance of VisualScriptEmitSignal.
62 	/// Note: use `memnew!VisualScriptEmitSignal` instead.
63 	static VisualScriptEmitSignal _new()
64 	{
65 		static godot_class_constructor constructor;
66 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptEmitSignal");
67 		if(constructor is null) return typeof(this).init;
68 		return cast(VisualScriptEmitSignal)(constructor());
69 	}
70 	@disable new(size_t s);
71 	/**
72 	
73 	*/
74 	String getSignal() const
75 	{
76 		checkClassBinding!(typeof(this))();
77 		return ptrcall!(String)(GDNativeClassBinding.getSignal, _godot_object);
78 	}
79 	/**
80 	
81 	*/
82 	void setSignal(in String name)
83 	{
84 		checkClassBinding!(typeof(this))();
85 		ptrcall!(void)(GDNativeClassBinding.setSignal, _godot_object, name);
86 	}
87 	/**
88 	The signal to emit.
89 	*/
90 	@property String signal()
91 	{
92 		return getSignal();
93 	}
94 	/// ditto
95 	@property void signal(String v)
96 	{
97 		setSignal(v);
98 	}
99 }