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.gdnativelibrary;
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.resource;
24 import godot.configfile;
25 import godot.reference;
26 /**
27 
28 */
29 @GodotBaseClass struct GDNativeLibrary
30 {
31 	enum string _GODOT_internal_name = "GDNativeLibrary";
32 public:
33 @nogc nothrow:
34 	union { godot_object _godot_object; Resource _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("get_config_file") GodotMethod!(ConfigFile) getConfigFile;
42 		@GodotName("set_config_file") GodotMethod!(void, ConfigFile) setConfigFile;
43 		@GodotName("get_current_library_path") GodotMethod!(String) getCurrentLibraryPath;
44 		@GodotName("get_current_dependencies") GodotMethod!(PoolStringArray) getCurrentDependencies;
45 		@GodotName("should_load_once") GodotMethod!(bool) shouldLoadOnce;
46 		@GodotName("is_singleton") GodotMethod!(bool) isSingleton;
47 		@GodotName("get_symbol_prefix") GodotMethod!(String) getSymbolPrefix;
48 		@GodotName("is_reloadable") GodotMethod!(bool) isReloadable;
49 		@GodotName("set_load_once") GodotMethod!(void, bool) setLoadOnce;
50 		@GodotName("set_singleton") GodotMethod!(void, bool) setSingleton;
51 		@GodotName("set_symbol_prefix") GodotMethod!(void, String) setSymbolPrefix;
52 		@GodotName("set_reloadable") GodotMethod!(void, bool) setReloadable;
53 	}
54 	bool opEquals(in GDNativeLibrary other) const { return _godot_object.ptr is other._godot_object.ptr; }
55 	GDNativeLibrary opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
56 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
57 	mixin baseCasts;
58 	static GDNativeLibrary _new()
59 	{
60 		static godot_class_constructor constructor;
61 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("GDNativeLibrary");
62 		if(constructor is null) return typeof(this).init;
63 		return cast(GDNativeLibrary)(constructor());
64 	}
65 	@disable new(size_t s);
66 	/**
67 	
68 	*/
69 	Ref!ConfigFile getConfigFile()
70 	{
71 		checkClassBinding!(typeof(this))();
72 		return ptrcall!(ConfigFile)(_classBinding.getConfigFile, _godot_object);
73 	}
74 	/**
75 	
76 	*/
77 	void setConfigFile(ConfigFile config_file)
78 	{
79 		checkClassBinding!(typeof(this))();
80 		ptrcall!(void)(_classBinding.setConfigFile, _godot_object, config_file);
81 	}
82 	/**
83 	
84 	*/
85 	String getCurrentLibraryPath() const
86 	{
87 		checkClassBinding!(typeof(this))();
88 		return ptrcall!(String)(_classBinding.getCurrentLibraryPath, _godot_object);
89 	}
90 	/**
91 	
92 	*/
93 	PoolStringArray getCurrentDependencies() const
94 	{
95 		checkClassBinding!(typeof(this))();
96 		return ptrcall!(PoolStringArray)(_classBinding.getCurrentDependencies, _godot_object);
97 	}
98 	/**
99 	
100 	*/
101 	bool shouldLoadOnce() const
102 	{
103 		checkClassBinding!(typeof(this))();
104 		return ptrcall!(bool)(_classBinding.shouldLoadOnce, _godot_object);
105 	}
106 	/**
107 	
108 	*/
109 	bool isSingleton() const
110 	{
111 		checkClassBinding!(typeof(this))();
112 		return ptrcall!(bool)(_classBinding.isSingleton, _godot_object);
113 	}
114 	/**
115 	
116 	*/
117 	String getSymbolPrefix() const
118 	{
119 		checkClassBinding!(typeof(this))();
120 		return ptrcall!(String)(_classBinding.getSymbolPrefix, _godot_object);
121 	}
122 	/**
123 	
124 	*/
125 	bool isReloadable() const
126 	{
127 		checkClassBinding!(typeof(this))();
128 		return ptrcall!(bool)(_classBinding.isReloadable, _godot_object);
129 	}
130 	/**
131 	
132 	*/
133 	void setLoadOnce(in bool load_once)
134 	{
135 		checkClassBinding!(typeof(this))();
136 		ptrcall!(void)(_classBinding.setLoadOnce, _godot_object, load_once);
137 	}
138 	/**
139 	
140 	*/
141 	void setSingleton(in bool singleton)
142 	{
143 		checkClassBinding!(typeof(this))();
144 		ptrcall!(void)(_classBinding.setSingleton, _godot_object, singleton);
145 	}
146 	/**
147 	
148 	*/
149 	void setSymbolPrefix(StringArg0)(in StringArg0 symbol_prefix)
150 	{
151 		checkClassBinding!(typeof(this))();
152 		ptrcall!(void)(_classBinding.setSymbolPrefix, _godot_object, symbol_prefix);
153 	}
154 	/**
155 	
156 	*/
157 	void setReloadable(in bool reloadable)
158 	{
159 		checkClassBinding!(typeof(this))();
160 		ptrcall!(void)(_classBinding.setReloadable, _godot_object, reloadable);
161 	}
162 	/**
163 	
164 	*/
165 	@property ConfigFile configFile()
166 	{
167 		return getConfigFile();
168 	}
169 	/// ditto
170 	@property void configFile(ConfigFile v)
171 	{
172 		setConfigFile(v);
173 	}
174 	/**
175 	
176 	*/
177 	@property bool loadOnce()
178 	{
179 		return shouldLoadOnce();
180 	}
181 	/// ditto
182 	@property void loadOnce(bool v)
183 	{
184 		setLoadOnce(v);
185 	}
186 	/**
187 	
188 	*/
189 	@property bool singleton()
190 	{
191 		return isSingleton();
192 	}
193 	/// ditto
194 	@property void singleton(bool v)
195 	{
196 		setSingleton(v);
197 	}
198 	/**
199 	
200 	*/
201 	@property String symbolPrefix()
202 	{
203 		return getSymbolPrefix();
204 	}
205 	/// ditto
206 	@property void symbolPrefix(String v)
207 	{
208 		setSymbolPrefix(v);
209 	}
210 	/**
211 	
212 	*/
213 	@property bool reloadable()
214 	{
215 		return isReloadable();
216 	}
217 	/// ditto
218 	@property void reloadable(bool v)
219 	{
220 		setReloadable(v);
221 	}
222 }