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.visualscriptpropertyget; 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 29 */ 30 @GodotBaseClass struct VisualScriptPropertyGet 31 { 32 package(godot) enum string _GODOT_internal_name = "VisualScriptPropertyGet"; 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_type_cache") GodotMethod!(Variant.Type) _getTypeCache; 43 @GodotName("_set_type_cache") GodotMethod!(void, long) _setTypeCache; 44 @GodotName("get_base_path") GodotMethod!(NodePath) getBasePath; 45 @GodotName("get_base_script") GodotMethod!(String) getBaseScript; 46 @GodotName("get_base_type") GodotMethod!(String) getBaseType; 47 @GodotName("get_basic_type") GodotMethod!(Variant.Type) getBasicType; 48 @GodotName("get_call_mode") GodotMethod!(VisualScriptPropertyGet.CallMode) getCallMode; 49 @GodotName("get_index") GodotMethod!(String) getIndex; 50 @GodotName("get_property") GodotMethod!(String) getProperty; 51 @GodotName("set_base_path") GodotMethod!(void, NodePath) setBasePath; 52 @GodotName("set_base_script") GodotMethod!(void, String) setBaseScript; 53 @GodotName("set_base_type") GodotMethod!(void, String) setBaseType; 54 @GodotName("set_basic_type") GodotMethod!(void, long) setBasicType; 55 @GodotName("set_call_mode") GodotMethod!(void, long) setCallMode; 56 @GodotName("set_index") GodotMethod!(void, String) setIndex; 57 @GodotName("set_property") GodotMethod!(void, String) setProperty; 58 } 59 /// 60 pragma(inline, true) bool opEquals(in VisualScriptPropertyGet other) const 61 { return _godot_object.ptr is other._godot_object.ptr; } 62 /// 63 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 64 { _godot_object.ptr = n; return null; } 65 /// 66 pragma(inline, true) bool opEquals(typeof(null) n) const 67 { return _godot_object.ptr is n; } 68 /// 69 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 70 mixin baseCasts; 71 /// Construct a new instance of VisualScriptPropertyGet. 72 /// Note: use `memnew!VisualScriptPropertyGet` instead. 73 static VisualScriptPropertyGet _new() 74 { 75 static godot_class_constructor constructor; 76 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptPropertyGet"); 77 if(constructor is null) return typeof(this).init; 78 return cast(VisualScriptPropertyGet)(constructor()); 79 } 80 @disable new(size_t s); 81 /// 82 enum CallMode : int 83 { 84 /** 85 86 */ 87 callModeSelf = 0, 88 /** 89 90 */ 91 callModeNodePath = 1, 92 /** 93 94 */ 95 callModeInstance = 2, 96 /** 97 98 */ 99 callModeBasicType = 3, 100 } 101 /// 102 enum Constants : int 103 { 104 callModeSelf = 0, 105 callModeNodePath = 1, 106 callModeInstance = 2, 107 callModeBasicType = 3, 108 } 109 /** 110 111 */ 112 Variant.Type _getTypeCache() const 113 { 114 Array _GODOT_args = Array.make(); 115 String _GODOT_method_name = String("_get_type_cache"); 116 return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Variant.Type); 117 } 118 /** 119 120 */ 121 void _setTypeCache(in long type_cache) 122 { 123 Array _GODOT_args = Array.make(); 124 _GODOT_args.append(type_cache); 125 String _GODOT_method_name = String("_set_type_cache"); 126 this.callv(_GODOT_method_name, _GODOT_args); 127 } 128 /** 129 130 */ 131 NodePath getBasePath() const 132 { 133 checkClassBinding!(typeof(this))(); 134 return ptrcall!(NodePath)(GDNativeClassBinding.getBasePath, _godot_object); 135 } 136 /** 137 138 */ 139 String getBaseScript() const 140 { 141 checkClassBinding!(typeof(this))(); 142 return ptrcall!(String)(GDNativeClassBinding.getBaseScript, _godot_object); 143 } 144 /** 145 146 */ 147 String getBaseType() const 148 { 149 checkClassBinding!(typeof(this))(); 150 return ptrcall!(String)(GDNativeClassBinding.getBaseType, _godot_object); 151 } 152 /** 153 154 */ 155 Variant.Type getBasicType() const 156 { 157 checkClassBinding!(typeof(this))(); 158 return ptrcall!(Variant.Type)(GDNativeClassBinding.getBasicType, _godot_object); 159 } 160 /** 161 162 */ 163 VisualScriptPropertyGet.CallMode getCallMode() const 164 { 165 checkClassBinding!(typeof(this))(); 166 return ptrcall!(VisualScriptPropertyGet.CallMode)(GDNativeClassBinding.getCallMode, _godot_object); 167 } 168 /** 169 170 */ 171 String getIndex() const 172 { 173 checkClassBinding!(typeof(this))(); 174 return ptrcall!(String)(GDNativeClassBinding.getIndex, _godot_object); 175 } 176 /** 177 178 */ 179 String getProperty() const 180 { 181 checkClassBinding!(typeof(this))(); 182 return ptrcall!(String)(GDNativeClassBinding.getProperty, _godot_object); 183 } 184 /** 185 186 */ 187 void setBasePath(NodePathArg0)(in NodePathArg0 base_path) 188 { 189 checkClassBinding!(typeof(this))(); 190 ptrcall!(void)(GDNativeClassBinding.setBasePath, _godot_object, base_path); 191 } 192 /** 193 194 */ 195 void setBaseScript(in String base_script) 196 { 197 checkClassBinding!(typeof(this))(); 198 ptrcall!(void)(GDNativeClassBinding.setBaseScript, _godot_object, base_script); 199 } 200 /** 201 202 */ 203 void setBaseType(in String base_type) 204 { 205 checkClassBinding!(typeof(this))(); 206 ptrcall!(void)(GDNativeClassBinding.setBaseType, _godot_object, base_type); 207 } 208 /** 209 210 */ 211 void setBasicType(in long basic_type) 212 { 213 checkClassBinding!(typeof(this))(); 214 ptrcall!(void)(GDNativeClassBinding.setBasicType, _godot_object, basic_type); 215 } 216 /** 217 218 */ 219 void setCallMode(in long mode) 220 { 221 checkClassBinding!(typeof(this))(); 222 ptrcall!(void)(GDNativeClassBinding.setCallMode, _godot_object, mode); 223 } 224 /** 225 226 */ 227 void setIndex(in String index) 228 { 229 checkClassBinding!(typeof(this))(); 230 ptrcall!(void)(GDNativeClassBinding.setIndex, _godot_object, index); 231 } 232 /** 233 234 */ 235 void setProperty(in String property) 236 { 237 checkClassBinding!(typeof(this))(); 238 ptrcall!(void)(GDNativeClassBinding.setProperty, _godot_object, property); 239 } 240 /** 241 242 */ 243 @property String baseScript() 244 { 245 return getBaseScript(); 246 } 247 /// ditto 248 @property void baseScript(String v) 249 { 250 setBaseScript(v); 251 } 252 /** 253 254 */ 255 @property String baseType() 256 { 257 return getBaseType(); 258 } 259 /// ditto 260 @property void baseType(String v) 261 { 262 setBaseType(v); 263 } 264 /** 265 266 */ 267 @property Variant.Type basicType() 268 { 269 return getBasicType(); 270 } 271 /// ditto 272 @property void basicType(long v) 273 { 274 setBasicType(v); 275 } 276 /** 277 278 */ 279 @property String index() 280 { 281 return getIndex(); 282 } 283 /// ditto 284 @property void index(String v) 285 { 286 setIndex(v); 287 } 288 /** 289 290 */ 291 @property NodePath nodePath() 292 { 293 return getBasePath(); 294 } 295 /// ditto 296 @property void nodePath(NodePath v) 297 { 298 setBasePath(v); 299 } 300 /** 301 302 */ 303 @property String property() 304 { 305 return getProperty(); 306 } 307 /// ditto 308 @property void property(String v) 309 { 310 setProperty(v); 311 } 312 /** 313 314 */ 315 @property VisualScriptPropertyGet.CallMode setMode() 316 { 317 return getCallMode(); 318 } 319 /// ditto 320 @property void setMode(long v) 321 { 322 setCallMode(v); 323 } 324 /** 325 326 */ 327 @property Variant.Type typeCache() 328 { 329 return _getTypeCache(); 330 } 331 /// ditto 332 @property void typeCache(long v) 333 { 334 _setTypeCache(v); 335 } 336 }