1 /** 2 Outputs a reference to the current instance. 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.visualscriptself; 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 Outputs a reference to the current instance. 29 30 Provides a reference to the node running the visual script. 31 $(B Input Ports:) 32 none 33 $(B Output Ports:) 34 - Data (object): `instance` 35 */ 36 @GodotBaseClass struct VisualScriptSelf 37 { 38 package(godot) enum string _GODOT_internal_name = "VisualScriptSelf"; 39 public: 40 @nogc nothrow: 41 union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; } 42 alias _GODOT_base this; 43 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 44 package(godot) __gshared bool _classBindingInitialized = false; 45 package(godot) static struct GDNativeClassBinding 46 { 47 __gshared: 48 } 49 /// 50 pragma(inline, true) bool opEquals(in VisualScriptSelf other) const 51 { return _godot_object.ptr is other._godot_object.ptr; } 52 /// 53 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 54 { _godot_object.ptr = n; return null; } 55 /// 56 pragma(inline, true) bool opEquals(typeof(null) n) const 57 { return _godot_object.ptr is n; } 58 /// 59 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 60 mixin baseCasts; 61 /// Construct a new instance of VisualScriptSelf. 62 /// Note: use `memnew!VisualScriptSelf` instead. 63 static VisualScriptSelf _new() 64 { 65 static godot_class_constructor constructor; 66 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptSelf"); 67 if(constructor is null) return typeof(this).init; 68 return cast(VisualScriptSelf)(constructor()); 69 } 70 @disable new(size_t s); 71 }