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 //------------------------------------------------------------------------------
11 using System.Reflection;
16 internal class ItemFactory : global::System.IDisposable
\r
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
\r
19 protected bool swigCMemOwn;
\r
21 internal ItemFactory(global::System.IntPtr cPtr, bool cMemoryOwn)
\r
23 swigCMemOwn = cMemoryOwn;
\r
24 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
\r
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemFactory obj)
\r
29 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
\r
34 DisposeQueue.Instance.Add(this);
\r
37 public virtual void Dispose()
\r
39 if (!Stage.IsInstalled())
\r
41 DisposeQueue.Instance.Add(this);
\r
47 if (swigCPtr.Handle != global::System.IntPtr.Zero)
\r
51 swigCMemOwn = false;
\r
52 NDalicPINVOKE.delete_ItemFactory(swigCPtr);
\r
54 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
\r
56 global::System.GC.SuppressFinalize(this);
\r
61 public virtual uint GetNumberOfItems()
\r
63 uint ret = NDalicPINVOKE.ItemFactory_GetNumberOfItems(swigCPtr);
\r
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
68 public virtual Actor NewItem(uint itemId)
\r
70 Actor ret = new Actor(NDalicPINVOKE.ItemFactory_NewItem(swigCPtr, itemId), true);
\r
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
75 public virtual void ItemReleased(uint itemId, Actor actor)
\r
77 if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2)) NDalicPINVOKE.ItemFactory_ItemReleasedSwigExplicitItemFactory(swigCPtr, itemId, Actor.getCPtr(actor)); else NDalicPINVOKE.ItemFactory_ItemReleased(swigCPtr, itemId, Actor.getCPtr(actor));
\r
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
81 public ItemFactory() : this(NDalicPINVOKE.new_ItemFactory(), true)
\r
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
84 SwigDirectorConnect();
\r
87 private void SwigDirectorConnect()
\r
89 if (SwigDerivedClassHasMethod("GetNumberOfItems", swigMethodTypes0))
\r
90 swigDelegate0 = new SwigDelegateItemFactory_0(SwigDirectorGetNumberOfItems);
\r
91 if (SwigDerivedClassHasMethod("NewItem", swigMethodTypes1))
\r
92 swigDelegate1 = new SwigDelegateItemFactory_1(SwigDirectorNewItem);
\r
93 if (SwigDerivedClassHasMethod("ItemReleased", swigMethodTypes2))
\r
94 swigDelegate2 = new SwigDelegateItemFactory_2(SwigDirectorItemReleased);
\r
95 NDalicPINVOKE.ItemFactory_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
\r
99 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)
\r
101 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
\r
102 bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(ItemFactory));
\r
103 return hasDerivedMethod;
\r
106 private uint SwigDirectorGetNumberOfItems()
\r
108 return GetNumberOfItems();
\r
111 private global::System.IntPtr SwigDirectorNewItem(uint itemId)
\r
113 return Actor.getCPtr(NewItem(itemId)).Handle;
\r
116 private void SwigDirectorItemReleased(uint itemId, global::System.IntPtr actor)
\r
118 ItemReleased(itemId, new Actor(actor, true));
\r
121 public delegate uint SwigDelegateItemFactory_0();
\r
122 public delegate global::System.IntPtr SwigDelegateItemFactory_1(uint itemId);
\r
123 public delegate void SwigDelegateItemFactory_2(uint itemId, global::System.IntPtr actor);
\r
125 private SwigDelegateItemFactory_0 swigDelegate0;
\r
126 private SwigDelegateItemFactory_1 swigDelegate1;
\r
127 private SwigDelegateItemFactory_2 swigDelegate2;
\r
129 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
\r
130 private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(uint) };
\r
131 private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { typeof(uint), typeof(Actor) };
\r