1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
13 public class ItemFactory : global::System.IDisposable {
14 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 protected bool swigCMemOwn;
17 internal ItemFactory(global::System.IntPtr cPtr, bool cMemoryOwn) {
18 swigCMemOwn = cMemoryOwn;
19 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemFactory obj) {
23 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27 DisposeQueue.Instance.Add(this);
30 public virtual void Dispose() {
31 if (!Stage.IsInstalled()) {
32 DisposeQueue.Instance.Add(this);
37 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40 NDalicPINVOKE.delete_ItemFactory(swigCPtr);
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
44 global::System.GC.SuppressFinalize(this);
49 public virtual uint GetNumberOfItems() {
50 uint ret = NDalicPINVOKE.ItemFactory_GetNumberOfItems(swigCPtr);
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 public virtual View NewItem(uint itemId) {
56 View ret = new View(NDalicPINVOKE.ItemFactory_NewItem(swigCPtr, itemId), true);
57 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61 public virtual void ItemReleased(uint itemId, View view) {
62 if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2)) NDalicPINVOKE.ItemFactory_ItemReleasedSwigExplicitItemFactory(swigCPtr, itemId, View.getCPtr(view)); else NDalicPINVOKE.ItemFactory_ItemReleased(swigCPtr, itemId, View.getCPtr(view));
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66 public ItemFactory() : this(NDalicPINVOKE.new_ItemFactory(), true) {
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68 SwigDirectorConnect();
71 private void SwigDirectorConnect() {
72 if (SwigDerivedClassHasMethod("GetNumberOfItems", swigMethodTypes0))
73 swigDelegate0 = new SwigDelegateItemFactory_0(SwigDirectorGetNumberOfItems);
74 if (SwigDerivedClassHasMethod("NewItem", swigMethodTypes1))
75 swigDelegate1 = new SwigDelegateItemFactory_1(SwigDirectorNewItem);
76 if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2))
77 swigDelegate2 = new SwigDelegateItemFactory_2(SwigDirectorItemReleased);
78 NDalicPINVOKE.ItemFactory_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
81 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
82 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
83 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ItemFactory));
84 return hasDerivedMethod;
87 private uint SwigDirectorGetNumberOfItems() {
88 return GetNumberOfItems();
91 private global::System.IntPtr SwigDirectorNewItem(uint itemId) {
92 return View.getCPtr(NewItem(itemId)).Handle;
95 private void SwigDirectorItemReleased(uint itemId, global::System.IntPtr actor) {
96 ItemReleased(itemId, new View(actor, true));
99 public delegate uint SwigDelegateItemFactory_0();
100 public delegate global::System.IntPtr SwigDelegateItemFactory_1(uint itemId);
101 public delegate void SwigDelegateItemFactory_2(uint itemId, global::System.IntPtr actor);
103 private SwigDelegateItemFactory_0 swigDelegate0;
104 private SwigDelegateItemFactory_1 swigDelegate1;
105 private SwigDelegateItemFactory_2 swigDelegate2;
107 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
108 private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(uint) };
109 private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { typeof(uint), typeof(View) };