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