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