1 /**
2 A Visual Script node which deconstructs a base type instance into its parts.
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.visualscriptdeconstruct;
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 A Visual Script node which deconstructs a base type instance into its parts.
27 
28 
29 */
30 @GodotBaseClass struct VisualScriptDeconstruct
31 {
32 	package(godot) enum string _GODOT_internal_name = "VisualScriptDeconstruct";
33 public:
34 @nogc nothrow:
35 	union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; }
36 	alias _GODOT_base this;
37 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
38 	package(godot) __gshared bool _classBindingInitialized = false;
39 	package(godot) static struct GDNativeClassBinding
40 	{
41 		__gshared:
42 		@GodotName("_get_elem_cache") GodotMethod!(Array) _getElemCache;
43 		@GodotName("_set_elem_cache") GodotMethod!(void, Array) _setElemCache;
44 		@GodotName("get_deconstruct_type") GodotMethod!(Variant.Type) getDeconstructType;
45 		@GodotName("set_deconstruct_type") GodotMethod!(void, long) setDeconstructType;
46 	}
47 	/// 
48 	pragma(inline, true) bool opEquals(in VisualScriptDeconstruct other) const
49 	{ return _godot_object.ptr is other._godot_object.ptr; }
50 	/// 
51 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
52 	{ _godot_object.ptr = n; return null; }
53 	/// 
54 	pragma(inline, true) bool opEquals(typeof(null) n) const
55 	{ return _godot_object.ptr is n; }
56 	/// 
57 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
58 	mixin baseCasts;
59 	/// Construct a new instance of VisualScriptDeconstruct.
60 	/// Note: use `memnew!VisualScriptDeconstruct` instead.
61 	static VisualScriptDeconstruct _new()
62 	{
63 		static godot_class_constructor constructor;
64 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptDeconstruct");
65 		if(constructor is null) return typeof(this).init;
66 		return cast(VisualScriptDeconstruct)(constructor());
67 	}
68 	@disable new(size_t s);
69 	/**
70 	
71 	*/
72 	Array _getElemCache() const
73 	{
74 		Array _GODOT_args = Array.make();
75 		String _GODOT_method_name = String("_get_elem_cache");
76 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Array);
77 	}
78 	/**
79 	
80 	*/
81 	void _setElemCache(in Array _cache)
82 	{
83 		Array _GODOT_args = Array.make();
84 		_GODOT_args.append(_cache);
85 		String _GODOT_method_name = String("_set_elem_cache");
86 		this.callv(_GODOT_method_name, _GODOT_args);
87 	}
88 	/**
89 	
90 	*/
91 	Variant.Type getDeconstructType() const
92 	{
93 		checkClassBinding!(typeof(this))();
94 		return ptrcall!(Variant.Type)(GDNativeClassBinding.getDeconstructType, _godot_object);
95 	}
96 	/**
97 	
98 	*/
99 	void setDeconstructType(in long type)
100 	{
101 		checkClassBinding!(typeof(this))();
102 		ptrcall!(void)(GDNativeClassBinding.setDeconstructType, _godot_object, type);
103 	}
104 	/**
105 	
106 	*/
107 	@property Array elemCache()
108 	{
109 		return _getElemCache();
110 	}
111 	/// ditto
112 	@property void elemCache(Array v)
113 	{
114 		_setElemCache(v);
115 	}
116 	/**
117 	The type to deconstruct.
118 	*/
119 	@property Variant.Type type()
120 	{
121 		return getDeconstructType();
122 	}
123 	/// ditto
124 	@property void type(long v)
125 	{
126 		setDeconstructType(v);
127 	}
128 }