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.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 import godot.resource;
26 import godot.reference;
27 /**
28 Chooses between two input values.
29 
30 Chooses between two input values based on a Boolean condition.
31 $(B Input Ports:)
32 - Data (boolean): `cond`
33 - Data (variant): `a`
34 - Data (variant): `b`
35 $(B Output Ports:)
36 - Data (variant): `out`
37 */
38 @GodotBaseClass struct VisualScriptSelect
39 {
40 	package(godot) enum string _GODOT_internal_name = "VisualScriptSelect";
41 public:
42 @nogc nothrow:
43 	union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; }
44 	alias _GODOT_base this;
45 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
46 	package(godot) __gshared bool _classBindingInitialized = false;
47 	package(godot) static struct GDNativeClassBinding
48 	{
49 		__gshared:
50 		@GodotName("get_typed") GodotMethod!(Variant.Type) getTyped;
51 		@GodotName("set_typed") GodotMethod!(void, long) setTyped;
52 	}
53 	/// 
54 	pragma(inline, true) bool opEquals(in VisualScriptSelect other) const
55 	{ return _godot_object.ptr is other._godot_object.ptr; }
56 	/// 
57 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
58 	{ _godot_object.ptr = n; return null; }
59 	/// 
60 	pragma(inline, true) bool opEquals(typeof(null) n) const
61 	{ return _godot_object.ptr is n; }
62 	/// 
63 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
64 	mixin baseCasts;
65 	/// Construct a new instance of VisualScriptSelect.
66 	/// Note: use `memnew!VisualScriptSelect` instead.
67 	static VisualScriptSelect _new()
68 	{
69 		static godot_class_constructor constructor;
70 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptSelect");
71 		if(constructor is null) return typeof(this).init;
72 		return cast(VisualScriptSelect)(constructor());
73 	}
74 	@disable new(size_t s);
75 	/**
76 	
77 	*/
78 	Variant.Type getTyped() const
79 	{
80 		checkClassBinding!(typeof(this))();
81 		return ptrcall!(Variant.Type)(GDNativeClassBinding.getTyped, _godot_object);
82 	}
83 	/**
84 	
85 	*/
86 	void setTyped(in long type)
87 	{
88 		checkClassBinding!(typeof(this))();
89 		ptrcall!(void)(GDNativeClassBinding.setTyped, _godot_object, type);
90 	}
91 	/**
92 	The input variables' type.
93 	*/
94 	@property Variant.Type type()
95 	{
96 		return getTyped();
97 	}
98 	/// ditto
99 	@property void type(long v)
100 	{
101 		setTyped(v);
102 	}
103 }