1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
8 /// <summary>Generic model that allows any property to be manually set. Also children of the same type can be added and deleted.
9 /// Intended to be used in scenarios where the user needs a manually defined data model, like in tests.
11 /// It does not model anything in particular and does not affect anything else in the system.</summary>
12 [GenericModelNativeInherit]
13 public class GenericModel : Efl.LoopModel, Efl.Eo.IWrapper
15 public new static System.IntPtr klass = System.IntPtr.Zero;
16 public new static Efl.GenericModelNativeInherit nativeInherit = new Efl.GenericModelNativeInherit();
17 ///<summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass {
20 if (((object)this).GetType() == typeof (GenericModel))
21 return Efl.GenericModelNativeInherit.GetEflClassStatic();
23 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
26 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
27 efl_generic_model_class_get();
28 ///<summary>Creates a new instance.</summary>
29 ///<param name="parent">Parent instance.</param>
30 public GenericModel(Efl.Object parent= null
32 base(efl_generic_model_class_get(), typeof(GenericModel), parent)
34 FinishInstantiation();
36 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
37 public GenericModel(System.IntPtr raw) : base(raw)
39 register_event_proxies();
41 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
42 protected GenericModel(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
43 ///<summary>Casts obj into an instance of this type.</summary>
44 public new static GenericModel static_cast(Efl.Object obj)
47 throw new System.ArgumentNullException("obj");
48 return new GenericModel(obj.NativeHandle);
50 ///<summary>Verifies if the given object is equal to this one.</summary>
51 public override bool Equals(object obj)
53 var other = obj as Efl.Object;
56 return this.NativeHandle == other.NativeHandle;
58 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
59 public override int GetHashCode()
61 return this.NativeHandle.ToInt32();
63 ///<summary>Turns the native pointer into a string representation.</summary>
64 public override String ToString()
66 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
68 protected override void register_event_proxies()
70 base.register_event_proxies();
72 private static new IntPtr GetEflClassStatic()
74 return Efl.GenericModel.efl_generic_model_class_get();
77 public class GenericModelNativeInherit : Efl.LoopModelNativeInherit{
78 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Ecore);
79 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
81 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
82 descs.AddRange(base.GetEoOps(type));
85 public override IntPtr GetEflClass()
87 return Efl.GenericModel.efl_generic_model_class_get();
89 public static new IntPtr GetEflClassStatic()
91 return Efl.GenericModel.efl_generic_model_class_get();