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