1 /**
2 Chooses between two input values.
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.visualscriptselect;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.meta;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.object;
22 import godot.classdb;
23 import godot.visualscriptnode;
24 import godot.resource;
25 import godot.reference;
26 /**
27 Chooses between two input values.
28 
29 Chooses between two input values based on a Boolean condition.
30 $(B Input Ports:)
31 - Data (boolean): `cond`
32 - Data (variant): `a`
33 - Data (variant): `b`
34 $(B Output Ports:)
35 - Data (variant): `out`
36 */
37 @GodotBaseClass struct VisualScriptSelect
38 {
39 	enum string _GODOT_internal_name = "VisualScriptSelect";
40 public:
41 @nogc nothrow:
42 	union { godot_object _godot_object; VisualScriptNode _GODOT_base; }
43 	alias _GODOT_base this;
44 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
45 	package(godot) __gshared bool _classBindingInitialized = false;
46 	package(godot) static struct _classBinding
47 	{
48 		__gshared:
49 		@GodotName("set_typed") GodotMethod!(void, long) setTyped;
50 		@GodotName("get_typed") GodotMethod!(Variant.Type) getTyped;
51 	}
52 	bool opEquals(in VisualScriptSelect other) const { return _godot_object.ptr is other._godot_object.ptr; }
53 	VisualScriptSelect opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
54 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
55 	mixin baseCasts;
56 	static VisualScriptSelect _new()
57 	{
58 		static godot_class_constructor constructor;
59 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptSelect");
60 		if(constructor is null) return typeof(this).init;
61 		return cast(VisualScriptSelect)(constructor());
62 	}
63 	@disable new(size_t s);
64 	/**
65 	
66 	*/
67 	void setTyped(in long type)
68 	{
69 		checkClassBinding!(typeof(this))();
70 		ptrcall!(void)(_classBinding.setTyped, _godot_object, type);
71 	}
72 	/**
73 	
74 	*/
75 	Variant.Type getTyped() const
76 	{
77 		checkClassBinding!(typeof(this))();
78 		return ptrcall!(Variant.Type)(_classBinding.getTyped, _godot_object);
79 	}
80 	/**
81 	The input variables' type.
82 	*/
83 	@property Variant.Type type()
84 	{
85 		return getTyped();
86 	}
87 	/// ditto
88 	@property void type(long v)
89 	{
90 		setTyped(v);
91 	}
92 }