1 /**
2 Optimized translation.
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.phashtranslation;
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.translation;
24 import godot.resource;
25 import godot.reference;
26 /**
27 Optimized translation.
28 
29 Uses real-time compressed translations, which results in very small dictionaries.
30 */
31 @GodotBaseClass struct PHashTranslation
32 {
33 	enum string _GODOT_internal_name = "PHashTranslation";
34 public:
35 @nogc nothrow:
36 	union { godot_object _godot_object; Translation _GODOT_base; }
37 	alias _GODOT_base this;
38 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
39 	package(godot) __gshared bool _classBindingInitialized = false;
40 	package(godot) static struct _classBinding
41 	{
42 		__gshared:
43 		@GodotName("generate") GodotMethod!(void, Translation) generate;
44 	}
45 	bool opEquals(in PHashTranslation other) const { return _godot_object.ptr is other._godot_object.ptr; }
46 	PHashTranslation opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
47 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
48 	mixin baseCasts;
49 	static PHashTranslation _new()
50 	{
51 		static godot_class_constructor constructor;
52 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PHashTranslation");
53 		if(constructor is null) return typeof(this).init;
54 		return cast(PHashTranslation)(constructor());
55 	}
56 	@disable new(size_t s);
57 	/**
58 	
59 	*/
60 	void generate(Translation from)
61 	{
62 		checkClassBinding!(typeof(this))();
63 		ptrcall!(void)(_classBinding.generate, _godot_object, from);
64 	}
65 }