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