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.visualscriptpropertyset; 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 VisualScriptPropertySet 31 { 32 package(godot) enum string _GODOT_internal_name = "VisualScriptPropertySet"; 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!(Dictionary) _getTypeCache; 43 @GodotName("_set_type_cache") GodotMethod!(void, Dictionary) _setTypeCache; 44 @GodotName("get_assign_op") GodotMethod!(VisualScriptPropertySet.AssignOp) getAssignOp; 45 @GodotName("get_base_path") GodotMethod!(NodePath) getBasePath; 46 @GodotName("get_base_script") GodotMethod!(String) getBaseScript; 47 @GodotName("get_base_type") GodotMethod!(String) getBaseType; 48 @GodotName("get_basic_type") GodotMethod!(Variant.Type) getBasicType; 49 @GodotName("get_call_mode") GodotMethod!(VisualScriptPropertySet.CallMode) getCallMode; 50 @GodotName("get_index") GodotMethod!(String) getIndex; 51 @GodotName("get_property") GodotMethod!(String) getProperty; 52 @GodotName("set_assign_op") GodotMethod!(void, long) setAssignOp; 53 @GodotName("set_base_path") GodotMethod!(void, NodePath) setBasePath; 54 @GodotName("set_base_script") GodotMethod!(void, String) setBaseScript; 55 @GodotName("set_base_type") GodotMethod!(void, String) setBaseType; 56 @GodotName("set_basic_type") GodotMethod!(void, long) setBasicType; 57 @GodotName("set_call_mode") GodotMethod!(void, long) setCallMode; 58 @GodotName("set_index") GodotMethod!(void, String) setIndex; 59 @GodotName("set_property") GodotMethod!(void, String) setProperty; 60 } 61 /// 62 pragma(inline, true) bool opEquals(in VisualScriptPropertySet other) const 63 { return _godot_object.ptr is other._godot_object.ptr; } 64 /// 65 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 66 { _godot_object.ptr = n; return null; } 67 /// 68 pragma(inline, true) bool opEquals(typeof(null) n) const 69 { return _godot_object.ptr is n; } 70 /// 71 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 72 mixin baseCasts; 73 /// Construct a new instance of VisualScriptPropertySet. 74 /// Note: use `memnew!VisualScriptPropertySet` instead. 75 static VisualScriptPropertySet _new() 76 { 77 static godot_class_constructor constructor; 78 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptPropertySet"); 79 if(constructor is null) return typeof(this).init; 80 return cast(VisualScriptPropertySet)(constructor()); 81 } 82 @disable new(size_t s); 83 /// 84 enum AssignOp : int 85 { 86 /** 87 88 */ 89 assignOpNone = 0, 90 /** 91 92 */ 93 assignOpAdd = 1, 94 /** 95 96 */ 97 assignOpSub = 2, 98 /** 99 100 */ 101 assignOpMul = 3, 102 /** 103 104 */ 105 assignOpDiv = 4, 106 /** 107 108 */ 109 assignOpMod = 5, 110 /** 111 112 */ 113 assignOpShiftLeft = 6, 114 /** 115 116 */ 117 assignOpShiftRight = 7, 118 /** 119 120 */ 121 assignOpBitAnd = 8, 122 /** 123 124 */ 125 assignOpBitOr = 9, 126 /** 127 128 */ 129 assignOpBitXor = 10, 130 } 131 /// 132 enum CallMode : int 133 { 134 /** 135 136 */ 137 callModeSelf = 0, 138 /** 139 140 */ 141 callModeNodePath = 1, 142 /** 143 144 */ 145 callModeInstance = 2, 146 /** 147 148 */ 149 callModeBasicType = 3, 150 } 151 /// 152 enum Constants : int 153 { 154 assignOpNone = 0, 155 callModeSelf = 0, 156 assignOpAdd = 1, 157 callModeNodePath = 1, 158 callModeInstance = 2, 159 assignOpSub = 2, 160 assignOpMul = 3, 161 callModeBasicType = 3, 162 assignOpDiv = 4, 163 assignOpMod = 5, 164 assignOpShiftLeft = 6, 165 assignOpShiftRight = 7, 166 assignOpBitAnd = 8, 167 assignOpBitOr = 9, 168 assignOpBitXor = 10, 169 } 170 /** 171 172 */ 173 Dictionary _getTypeCache() const 174 { 175 Array _GODOT_args = Array.make(); 176 String _GODOT_method_name = String("_get_type_cache"); 177 return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Dictionary); 178 } 179 /** 180 181 */ 182 void _setTypeCache(in Dictionary type_cache) 183 { 184 Array _GODOT_args = Array.make(); 185 _GODOT_args.append(type_cache); 186 String _GODOT_method_name = String("_set_type_cache"); 187 this.callv(_GODOT_method_name, _GODOT_args); 188 } 189 /** 190 191 */ 192 VisualScriptPropertySet.AssignOp getAssignOp() const 193 { 194 checkClassBinding!(typeof(this))(); 195 return ptrcall!(VisualScriptPropertySet.AssignOp)(GDNativeClassBinding.getAssignOp, _godot_object); 196 } 197 /** 198 199 */ 200 NodePath getBasePath() const 201 { 202 checkClassBinding!(typeof(this))(); 203 return ptrcall!(NodePath)(GDNativeClassBinding.getBasePath, _godot_object); 204 } 205 /** 206 207 */ 208 String getBaseScript() const 209 { 210 checkClassBinding!(typeof(this))(); 211 return ptrcall!(String)(GDNativeClassBinding.getBaseScript, _godot_object); 212 } 213 /** 214 215 */ 216 String getBaseType() const 217 { 218 checkClassBinding!(typeof(this))(); 219 return ptrcall!(String)(GDNativeClassBinding.getBaseType, _godot_object); 220 } 221 /** 222 223 */ 224 Variant.Type getBasicType() const 225 { 226 checkClassBinding!(typeof(this))(); 227 return ptrcall!(Variant.Type)(GDNativeClassBinding.getBasicType, _godot_object); 228 } 229 /** 230 231 */ 232 VisualScriptPropertySet.CallMode getCallMode() const 233 { 234 checkClassBinding!(typeof(this))(); 235 return ptrcall!(VisualScriptPropertySet.CallMode)(GDNativeClassBinding.getCallMode, _godot_object); 236 } 237 /** 238 239 */ 240 String getIndex() const 241 { 242 checkClassBinding!(typeof(this))(); 243 return ptrcall!(String)(GDNativeClassBinding.getIndex, _godot_object); 244 } 245 /** 246 247 */ 248 String getProperty() const 249 { 250 checkClassBinding!(typeof(this))(); 251 return ptrcall!(String)(GDNativeClassBinding.getProperty, _godot_object); 252 } 253 /** 254 255 */ 256 void setAssignOp(in long assign_op) 257 { 258 checkClassBinding!(typeof(this))(); 259 ptrcall!(void)(GDNativeClassBinding.setAssignOp, _godot_object, assign_op); 260 } 261 /** 262 263 */ 264 void setBasePath(NodePathArg0)(in NodePathArg0 base_path) 265 { 266 checkClassBinding!(typeof(this))(); 267 ptrcall!(void)(GDNativeClassBinding.setBasePath, _godot_object, base_path); 268 } 269 /** 270 271 */ 272 void setBaseScript(in String base_script) 273 { 274 checkClassBinding!(typeof(this))(); 275 ptrcall!(void)(GDNativeClassBinding.setBaseScript, _godot_object, base_script); 276 } 277 /** 278 279 */ 280 void setBaseType(in String base_type) 281 { 282 checkClassBinding!(typeof(this))(); 283 ptrcall!(void)(GDNativeClassBinding.setBaseType, _godot_object, base_type); 284 } 285 /** 286 287 */ 288 void setBasicType(in long basic_type) 289 { 290 checkClassBinding!(typeof(this))(); 291 ptrcall!(void)(GDNativeClassBinding.setBasicType, _godot_object, basic_type); 292 } 293 /** 294 295 */ 296 void setCallMode(in long mode) 297 { 298 checkClassBinding!(typeof(this))(); 299 ptrcall!(void)(GDNativeClassBinding.setCallMode, _godot_object, mode); 300 } 301 /** 302 303 */ 304 void setIndex(in String index) 305 { 306 checkClassBinding!(typeof(this))(); 307 ptrcall!(void)(GDNativeClassBinding.setIndex, _godot_object, index); 308 } 309 /** 310 311 */ 312 void setProperty(in String property) 313 { 314 checkClassBinding!(typeof(this))(); 315 ptrcall!(void)(GDNativeClassBinding.setProperty, _godot_object, property); 316 } 317 /** 318 319 */ 320 @property VisualScriptPropertySet.AssignOp assignOp() 321 { 322 return getAssignOp(); 323 } 324 /// ditto 325 @property void assignOp(long v) 326 { 327 setAssignOp(v); 328 } 329 /** 330 331 */ 332 @property String baseScript() 333 { 334 return getBaseScript(); 335 } 336 /// ditto 337 @property void baseScript(String v) 338 { 339 setBaseScript(v); 340 } 341 /** 342 343 */ 344 @property String baseType() 345 { 346 return getBaseType(); 347 } 348 /// ditto 349 @property void baseType(String v) 350 { 351 setBaseType(v); 352 } 353 /** 354 355 */ 356 @property Variant.Type basicType() 357 { 358 return getBasicType(); 359 } 360 /// ditto 361 @property void basicType(long v) 362 { 363 setBasicType(v); 364 } 365 /** 366 367 */ 368 @property String index() 369 { 370 return getIndex(); 371 } 372 /// ditto 373 @property void index(String v) 374 { 375 setIndex(v); 376 } 377 /** 378 379 */ 380 @property NodePath nodePath() 381 { 382 return getBasePath(); 383 } 384 /// ditto 385 @property void nodePath(NodePath v) 386 { 387 setBasePath(v); 388 } 389 /** 390 391 */ 392 @property String property() 393 { 394 return getProperty(); 395 } 396 /// ditto 397 @property void property(String v) 398 { 399 setProperty(v); 400 } 401 /** 402 403 */ 404 @property VisualScriptPropertySet.CallMode setMode() 405 { 406 return getCallMode(); 407 } 408 /// ditto 409 @property void setMode(long v) 410 { 411 setCallMode(v); 412 } 413 /** 414 415 */ 416 @property Dictionary typeCache() 417 { 418 return _getTypeCache(); 419 } 420 /// ditto 421 @property void typeCache(Dictionary v) 422 { 423 _setTypeCache(v); 424 } 425 }