1 /**
2 Reference version of $(D PackedDataContainer).
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.packeddatacontainerref;
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.reference;
24 /**
25 Reference version of $(D PackedDataContainer).
26 */
27 @GodotBaseClass struct PackedDataContainerRef
28 {
29 	package(godot) enum string _GODOT_internal_name = "PackedDataContainerRef";
30 public:
31 @nogc nothrow:
32 	union { /** */ godot_object _godot_object; /** */ Reference _GODOT_base; }
33 	alias _GODOT_base this;
34 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
35 	package(godot) __gshared bool _classBindingInitialized = false;
36 	package(godot) static struct GDNativeClassBinding
37 	{
38 		__gshared:
39 		@GodotName("_is_dictionary") GodotMethod!(bool) _isDictionary;
40 		@GodotName("_iter_get") GodotMethod!(Variant, Variant) _iterGet;
41 		@GodotName("_iter_init") GodotMethod!(Variant, Array) _iterInit;
42 		@GodotName("_iter_next") GodotMethod!(Variant, Array) _iterNext;
43 		@GodotName("size") GodotMethod!(long) size;
44 	}
45 	/// 
46 	pragma(inline, true) bool opEquals(in PackedDataContainerRef other) const
47 	{ return _godot_object.ptr is other._godot_object.ptr; }
48 	/// 
49 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
50 	{ _godot_object.ptr = n; return null; }
51 	/// 
52 	pragma(inline, true) bool opEquals(typeof(null) n) const
53 	{ return _godot_object.ptr is n; }
54 	/// 
55 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
56 	mixin baseCasts;
57 	/// Construct a new instance of PackedDataContainerRef.
58 	/// Note: use `memnew!PackedDataContainerRef` instead.
59 	static PackedDataContainerRef _new()
60 	{
61 		static godot_class_constructor constructor;
62 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PackedDataContainerRef");
63 		if(constructor is null) return typeof(this).init;
64 		return cast(PackedDataContainerRef)(constructor());
65 	}
66 	@disable new(size_t s);
67 	/**
68 	
69 	*/
70 	bool _isDictionary() const
71 	{
72 		Array _GODOT_args = Array.make();
73 		String _GODOT_method_name = String("_is_dictionary");
74 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!bool);
75 	}
76 	/**
77 	
78 	*/
79 	Variant _iterGet(VariantArg0)(in VariantArg0 arg0)
80 	{
81 		Array _GODOT_args = Array.make();
82 		_GODOT_args.append(arg0);
83 		String _GODOT_method_name = String("_iter_get");
84 		return this.callv(_GODOT_method_name, _GODOT_args);
85 	}
86 	/**
87 	
88 	*/
89 	Variant _iterInit(in Array arg0)
90 	{
91 		Array _GODOT_args = Array.make();
92 		_GODOT_args.append(arg0);
93 		String _GODOT_method_name = String("_iter_init");
94 		return this.callv(_GODOT_method_name, _GODOT_args);
95 	}
96 	/**
97 	
98 	*/
99 	Variant _iterNext(in Array arg0)
100 	{
101 		Array _GODOT_args = Array.make();
102 		_GODOT_args.append(arg0);
103 		String _GODOT_method_name = String("_iter_next");
104 		return this.callv(_GODOT_method_name, _GODOT_args);
105 	}
106 	/**
107 	
108 	*/
109 	long size() const
110 	{
111 		checkClassBinding!(typeof(this))();
112 		return ptrcall!(long)(GDNativeClassBinding.size, _godot_object);
113 	}
114 }