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.visualscriptfunctioncall;
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 /**
26 
27 */
28 @GodotBaseClass struct VisualScriptFunctionCall
29 {
30 	package(godot) enum string _GODOT_internal_name = "VisualScriptFunctionCall";
31 public:
32 @nogc nothrow:
33 	union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; }
34 	alias _GODOT_base this;
35 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
36 	package(godot) __gshared bool _classBindingInitialized = false;
37 	package(godot) static struct GDNativeClassBinding
38 	{
39 		__gshared:
40 		@GodotName("_get_argument_cache") GodotMethod!(Dictionary) _getArgumentCache;
41 		@GodotName("_set_argument_cache") GodotMethod!(void, Dictionary) _setArgumentCache;
42 		@GodotName("get_base_path") GodotMethod!(NodePath) getBasePath;
43 		@GodotName("get_base_script") GodotMethod!(String) getBaseScript;
44 		@GodotName("get_base_type") GodotMethod!(String) getBaseType;
45 		@GodotName("get_basic_type") GodotMethod!(Variant.Type) getBasicType;
46 		@GodotName("get_call_mode") GodotMethod!(VisualScriptFunctionCall.CallMode) getCallMode;
47 		@GodotName("get_function") GodotMethod!(String) getFunction;
48 		@GodotName("get_rpc_call_mode") GodotMethod!(VisualScriptFunctionCall.RPCCallMode) getRpcCallMode;
49 		@GodotName("get_singleton") GodotMethod!(String) getSingleton;
50 		@GodotName("get_use_default_args") GodotMethod!(long) getUseDefaultArgs;
51 		@GodotName("get_validate") GodotMethod!(bool) getValidate;
52 		@GodotName("set_base_path") GodotMethod!(void, NodePath) setBasePath;
53 		@GodotName("set_base_script") GodotMethod!(void, String) setBaseScript;
54 		@GodotName("set_base_type") GodotMethod!(void, String) setBaseType;
55 		@GodotName("set_basic_type") GodotMethod!(void, long) setBasicType;
56 		@GodotName("set_call_mode") GodotMethod!(void, long) setCallMode;
57 		@GodotName("set_function") GodotMethod!(void, String) setFunction;
58 		@GodotName("set_rpc_call_mode") GodotMethod!(void, long) setRpcCallMode;
59 		@GodotName("set_singleton") GodotMethod!(void, String) setSingleton;
60 		@GodotName("set_use_default_args") GodotMethod!(void, long) setUseDefaultArgs;
61 		@GodotName("set_validate") GodotMethod!(void, bool) setValidate;
62 	}
63 	/// 
64 	pragma(inline, true) bool opEquals(in VisualScriptFunctionCall other) const
65 	{ return _godot_object.ptr is other._godot_object.ptr; }
66 	/// 
67 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
68 	{ _godot_object.ptr = n; return null; }
69 	/// 
70 	pragma(inline, true) bool opEquals(typeof(null) n) const
71 	{ return _godot_object.ptr is n; }
72 	/// 
73 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
74 	mixin baseCasts;
75 	/// Construct a new instance of VisualScriptFunctionCall.
76 	/// Note: use `memnew!VisualScriptFunctionCall` instead.
77 	static VisualScriptFunctionCall _new()
78 	{
79 		static godot_class_constructor constructor;
80 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptFunctionCall");
81 		if(constructor is null) return typeof(this).init;
82 		return cast(VisualScriptFunctionCall)(constructor());
83 	}
84 	@disable new(size_t s);
85 	/// 
86 	enum RPCCallMode : int
87 	{
88 		/**
89 		
90 		*/
91 		rpcDisabled = 0,
92 		/**
93 		
94 		*/
95 		rpcReliable = 1,
96 		/**
97 		
98 		*/
99 		rpcUnreliable = 2,
100 		/**
101 		
102 		*/
103 		rpcReliableToId = 3,
104 		/**
105 		
106 		*/
107 		rpcUnreliableToId = 4,
108 	}
109 	/// 
110 	enum CallMode : int
111 	{
112 		/**
113 		
114 		*/
115 		callModeSelf = 0,
116 		/**
117 		
118 		*/
119 		callModeNodePath = 1,
120 		/**
121 		
122 		*/
123 		callModeInstance = 2,
124 		/**
125 		
126 		*/
127 		callModeBasicType = 3,
128 		/**
129 		
130 		*/
131 		callModeSingleton = 4,
132 	}
133 	/// 
134 	enum Constants : int
135 	{
136 		callModeSelf = 0,
137 		rpcDisabled = 0,
138 		rpcReliable = 1,
139 		callModeNodePath = 1,
140 		rpcUnreliable = 2,
141 		callModeInstance = 2,
142 		callModeBasicType = 3,
143 		rpcReliableToId = 3,
144 		callModeSingleton = 4,
145 		rpcUnreliableToId = 4,
146 	}
147 	/**
148 	
149 	*/
150 	Dictionary _getArgumentCache() const
151 	{
152 		Array _GODOT_args = Array.make();
153 		String _GODOT_method_name = String("_get_argument_cache");
154 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!Dictionary);
155 	}
156 	/**
157 	
158 	*/
159 	void _setArgumentCache(in Dictionary argument_cache)
160 	{
161 		Array _GODOT_args = Array.make();
162 		_GODOT_args.append(argument_cache);
163 		String _GODOT_method_name = String("_set_argument_cache");
164 		this.callv(_GODOT_method_name, _GODOT_args);
165 	}
166 	/**
167 	
168 	*/
169 	NodePath getBasePath() const
170 	{
171 		checkClassBinding!(typeof(this))();
172 		return ptrcall!(NodePath)(GDNativeClassBinding.getBasePath, _godot_object);
173 	}
174 	/**
175 	
176 	*/
177 	String getBaseScript() const
178 	{
179 		checkClassBinding!(typeof(this))();
180 		return ptrcall!(String)(GDNativeClassBinding.getBaseScript, _godot_object);
181 	}
182 	/**
183 	
184 	*/
185 	String getBaseType() const
186 	{
187 		checkClassBinding!(typeof(this))();
188 		return ptrcall!(String)(GDNativeClassBinding.getBaseType, _godot_object);
189 	}
190 	/**
191 	
192 	*/
193 	Variant.Type getBasicType() const
194 	{
195 		checkClassBinding!(typeof(this))();
196 		return ptrcall!(Variant.Type)(GDNativeClassBinding.getBasicType, _godot_object);
197 	}
198 	/**
199 	
200 	*/
201 	VisualScriptFunctionCall.CallMode getCallMode() const
202 	{
203 		checkClassBinding!(typeof(this))();
204 		return ptrcall!(VisualScriptFunctionCall.CallMode)(GDNativeClassBinding.getCallMode, _godot_object);
205 	}
206 	/**
207 	
208 	*/
209 	String getFunction() const
210 	{
211 		checkClassBinding!(typeof(this))();
212 		return ptrcall!(String)(GDNativeClassBinding.getFunction, _godot_object);
213 	}
214 	/**
215 	
216 	*/
217 	VisualScriptFunctionCall.RPCCallMode getRpcCallMode() const
218 	{
219 		checkClassBinding!(typeof(this))();
220 		return ptrcall!(VisualScriptFunctionCall.RPCCallMode)(GDNativeClassBinding.getRpcCallMode, _godot_object);
221 	}
222 	/**
223 	
224 	*/
225 	String getSingleton() const
226 	{
227 		checkClassBinding!(typeof(this))();
228 		return ptrcall!(String)(GDNativeClassBinding.getSingleton, _godot_object);
229 	}
230 	/**
231 	
232 	*/
233 	long getUseDefaultArgs() const
234 	{
235 		checkClassBinding!(typeof(this))();
236 		return ptrcall!(long)(GDNativeClassBinding.getUseDefaultArgs, _godot_object);
237 	}
238 	/**
239 	
240 	*/
241 	bool getValidate() const
242 	{
243 		checkClassBinding!(typeof(this))();
244 		return ptrcall!(bool)(GDNativeClassBinding.getValidate, _godot_object);
245 	}
246 	/**
247 	
248 	*/
249 	void setBasePath(NodePathArg0)(in NodePathArg0 base_path)
250 	{
251 		checkClassBinding!(typeof(this))();
252 		ptrcall!(void)(GDNativeClassBinding.setBasePath, _godot_object, base_path);
253 	}
254 	/**
255 	
256 	*/
257 	void setBaseScript(in String base_script)
258 	{
259 		checkClassBinding!(typeof(this))();
260 		ptrcall!(void)(GDNativeClassBinding.setBaseScript, _godot_object, base_script);
261 	}
262 	/**
263 	
264 	*/
265 	void setBaseType(in String base_type)
266 	{
267 		checkClassBinding!(typeof(this))();
268 		ptrcall!(void)(GDNativeClassBinding.setBaseType, _godot_object, base_type);
269 	}
270 	/**
271 	
272 	*/
273 	void setBasicType(in long basic_type)
274 	{
275 		checkClassBinding!(typeof(this))();
276 		ptrcall!(void)(GDNativeClassBinding.setBasicType, _godot_object, basic_type);
277 	}
278 	/**
279 	
280 	*/
281 	void setCallMode(in long mode)
282 	{
283 		checkClassBinding!(typeof(this))();
284 		ptrcall!(void)(GDNativeClassBinding.setCallMode, _godot_object, mode);
285 	}
286 	/**
287 	
288 	*/
289 	void setFunction(in String _function)
290 	{
291 		checkClassBinding!(typeof(this))();
292 		ptrcall!(void)(GDNativeClassBinding.setFunction, _godot_object, _function);
293 	}
294 	/**
295 	
296 	*/
297 	void setRpcCallMode(in long mode)
298 	{
299 		checkClassBinding!(typeof(this))();
300 		ptrcall!(void)(GDNativeClassBinding.setRpcCallMode, _godot_object, mode);
301 	}
302 	/**
303 	
304 	*/
305 	void setSingleton(in String singleton)
306 	{
307 		checkClassBinding!(typeof(this))();
308 		ptrcall!(void)(GDNativeClassBinding.setSingleton, _godot_object, singleton);
309 	}
310 	/**
311 	
312 	*/
313 	void setUseDefaultArgs(in long amount)
314 	{
315 		checkClassBinding!(typeof(this))();
316 		ptrcall!(void)(GDNativeClassBinding.setUseDefaultArgs, _godot_object, amount);
317 	}
318 	/**
319 	
320 	*/
321 	void setValidate(in bool enable)
322 	{
323 		checkClassBinding!(typeof(this))();
324 		ptrcall!(void)(GDNativeClassBinding.setValidate, _godot_object, enable);
325 	}
326 	/**
327 	
328 	*/
329 	@property Dictionary argumentCache()
330 	{
331 		return _getArgumentCache();
332 	}
333 	/// ditto
334 	@property void argumentCache(Dictionary v)
335 	{
336 		_setArgumentCache(v);
337 	}
338 	/**
339 	
340 	*/
341 	@property String baseScript()
342 	{
343 		return getBaseScript();
344 	}
345 	/// ditto
346 	@property void baseScript(String v)
347 	{
348 		setBaseScript(v);
349 	}
350 	/**
351 	
352 	*/
353 	@property String baseType()
354 	{
355 		return getBaseType();
356 	}
357 	/// ditto
358 	@property void baseType(String v)
359 	{
360 		setBaseType(v);
361 	}
362 	/**
363 	
364 	*/
365 	@property Variant.Type basicType()
366 	{
367 		return getBasicType();
368 	}
369 	/// ditto
370 	@property void basicType(long v)
371 	{
372 		setBasicType(v);
373 	}
374 	/**
375 	
376 	*/
377 	@property VisualScriptFunctionCall.CallMode callMode()
378 	{
379 		return getCallMode();
380 	}
381 	/// ditto
382 	@property void callMode(long v)
383 	{
384 		setCallMode(v);
385 	}
386 	/**
387 	
388 	*/
389 	@property String _function()
390 	{
391 		return getFunction();
392 	}
393 	/// ditto
394 	@property void _function(String v)
395 	{
396 		setFunction(v);
397 	}
398 	/**
399 	
400 	*/
401 	@property NodePath nodePath()
402 	{
403 		return getBasePath();
404 	}
405 	/// ditto
406 	@property void nodePath(NodePath v)
407 	{
408 		setBasePath(v);
409 	}
410 	/**
411 	
412 	*/
413 	@property VisualScriptFunctionCall.RPCCallMode rpcCallMode()
414 	{
415 		return getRpcCallMode();
416 	}
417 	/// ditto
418 	@property void rpcCallMode(long v)
419 	{
420 		setRpcCallMode(v);
421 	}
422 	/**
423 	
424 	*/
425 	@property String singleton()
426 	{
427 		return getSingleton();
428 	}
429 	/// ditto
430 	@property void singleton(String v)
431 	{
432 		setSingleton(v);
433 	}
434 	/**
435 	
436 	*/
437 	@property long useDefaultArgs()
438 	{
439 		return getUseDefaultArgs();
440 	}
441 	/// ditto
442 	@property void useDefaultArgs(long v)
443 	{
444 		setUseDefaultArgs(v);
445 	}
446 	/**
447 	
448 	*/
449 	@property bool validate()
450 	{
451 		return getValidate();
452 	}
453 	/// ditto
454 	@property void validate(bool v)
455 	{
456 		setValidate(v);
457 	}
458 }