Example #1
0
        /** [シングルトン]constructor
         */
        private Ui()
        {
            //フォーカス。
            this.focus = new Focus();

            //ウィンドウリスト。
            this.windowlist = new Ui_WindowList();

            //target_list
            this.target_list = new System.Collections.Generic.LinkedList <Fee.Ui.OnTarget_CallBackInterface>();

            //target_add_list
            this.target_add_list = new System.Collections.Generic.List <Fee.Ui.OnTarget_CallBackInterface>();

            //target_remove_list
            this.target_remove_list = new System.Collections.Generic.List <Fee.Ui.OnTarget_CallBackInterface>();

            //ウィンドウレジュームリスト。
            this.windowresumelist = new Ui_WindowResumeList();

            //ダウン中ボタンインスタンス。
            this.down_button_instance = null;

            //プールリスト。
            this.pool_list_sprite_clip = new Pool.PoolList <Sprite2D_Clip>(0);
        }
        public Entity AddTurnOrder(System.Collections.Generic.LinkedList <Entitas.Entity> newValue)
        {
            var component = CreateComponent <TurnOrderComponent>(ComponentIds.TurnOrder);

            component.value = newValue;
            return(AddComponent(ComponentIds.TurnOrder, component));
        }
Example #3
0
        /** [シングルトン]constructor
         */
        private Ui()
        {
            //ウィンドウリスト。
            this.windowlist = new Ui_WindowList();

            //target_list
            this.target_list = new System.Collections.Generic.LinkedList <Fee.Ui.OnTarget_CallBackInterface>();

            //target_add_list
            this.target_add_list = new System.Collections.Generic.List <Fee.Ui.OnTarget_CallBackInterface>();

            //target_remove_list
            this.target_remove_list = new System.Collections.Generic.List <Fee.Ui.OnTarget_CallBackInterface>();

            //ウィンドウレジュームリスト。
            this.windowresumelist = new Ui_WindowResumeList();

            //ダウン中ボタンインスタンス。
            this.down_button_instance = null;

            //プールリスト。
            this.pool_list_sprite_clip = new Pool.PoolList <Sprite_Clip>(0);

            //PlayerLoopType
            this.playerloop_flag = true;
            Fee.PlayerLoopSystem.PlayerLoopSystem.GetInstance().Add(Config.PLAYERLOOP_ADDTYPE, Config.PLAYERLOOP_TARGETTYPE, typeof(PlayerLoopType.Fee_Ui_Main), this.Main);
        }
Example #4
0
        /** 隙間を埋める。使用リストの順序に合わせてバッファを入れ替える。
         */
        private static void GarbageCollectionSwapUseListOder(System.Collections.Generic.LinkedList <NODE> a_list_use, System.Collections.Generic.LinkedList <NODE> a_list_free, BUFFER[] a_buffer)
        {
            int t_max = a_list_use.Count;

            System.Collections.Generic.LinkedListNode <NODE> t_node = a_list_use.First;
            for (int ii = 0; ii < t_max; ii++)
            {
                if (t_node.Value.GetBufferIndex() != ii)
                {
                    System.Collections.Generic.LinkedListNode <NODE> t_node_next = t_node.Next;

                    //t_node : 未使用にすべきノード。
                    //t_node_find : 使用にすべきノード。

                    //インデックスがiiのノードを検索。使用リストから。
                    System.Collections.Generic.LinkedListNode <NODE> t_node_find = BufferNodeFind <NODE> .FindEequalIndexNode(a_list_use.First, ii);

                    if (t_node_find == null)
                    {
                        //インデックスがiiのノードを検索。未使用リストから。
                        t_node_find = BufferNodeFind <NODE> .FindEequalIndexNode(a_list_free.First, ii);
                    }

                    //バッファをスワップする。
                    SwapBuffer(t_node, t_node_find, a_buffer);

                    t_node = t_node_next;
                }
            }
        }
Example #5
0
 EnqueuePackageRepositoryToVisit(
     System.Collections.Generic.LinkedList <System.Tuple <string, PackageDefinition> > reposToVisit,
     string repoPath,
     PackageDefinition sourcePackageDefinition)
 {
     // need to always pre-load the search paths (reposToVisit) with the repo that the master package resides in
     if (null != sourcePackageDefinition)
     {
         // visited already? ignore
         if (Graph.Instance.PackageRepositories.Contains(repoPath))
         {
             return;
         }
         // visited parent already? ignore
         if (Graph.Instance.PackageRepositories.Any(item => repoPath.StartsWith(item)))
         {
             return;
         }
     }
     // already planned to visit? ignore
     if (reposToVisit.Any(item => item.Item1 == repoPath))
     {
         return;
     }
     // new path is a parent path of a repo waiting to be viewed? replace all children with the parent (as it's a recursive search)
     if (reposToVisit.Any(item => item.Item1.StartsWith(repoPath)))
     {
         foreach (var repo in reposToVisit.Where(item => item.Item1.StartsWith(repoPath)).ToList())
         {
             reposToVisit.Remove(repo);
         }
     }
     reposToVisit.AddLast(System.Tuple.Create <string, PackageDefinition>(repoPath, sourcePackageDefinition));
 }
Example #6
0
        /** [シングルトン]constructor
         */
        private File()
        {
            //work
            this.work_pool = new List.NodePool <WorkItem>(16);
            this.work_add  = new System.Collections.Generic.LinkedList <WorkItem>();
            this.work_list = new System.Collections.Generic.LinkedList <WorkItem>();

            //main_androidcontent
            this.main_androidcontent = new Main_AndroidContent();

            //main_io
            this.main_io = new Main_Io();

            //main_webrequest
            this.main_webrequest = new Main_WebRequest();

            //main_resources
            this.main_resources = new Main_Resources();

            //certificate_list
            this.certificate_list = new CertificateList();

            //PlayerLoopType
            this.playerloop_flag = true;
            Fee.PlayerLoopSystem.PlayerLoopSystem.GetInstance().Add(Config.PLAYERLOOP_ADDTYPE, Config.PLAYERLOOP_TARGETTYPE, typeof(PlayerLoopType.Fee_File_Main), this.Main);
        }
Example #7
0
    public void ReplaceTurnOrder(System.Collections.Generic.LinkedList <PoolEntity> newValue)
    {
        var index     = PoolComponentsLookup.TurnOrder;
        var component = CreateComponent <TurnOrderComponent>(index);

        component.value = newValue;
        ReplaceComponent(index, component);
    }
Example #8
0
        /// <summary>
        /// Default initialisations
        /// </summary>
        public AStarPathFinder()
        {
            openNodesList   = new System.Collections.Generic.LinkedList <AStarNodeWrapper>();
            closedNodesList = new System.Collections.Generic.List <AStarNodeWrapper>();
            pathNodes       = new System.Collections.Generic.List <AStarNodeWrapper>();

            IsComplete = false;
        }
Example #9
0
    public void ReplaceActors(System.Collections.Generic.LinkedList <GameEntity> newValue)
    {
        var index     = GameComponentsLookup.Actors;
        var component = CreateComponent <ActorsComponent>(index);

        component.value = newValue;
        ReplaceComponent(index, component);
    }
Example #10
0
 public void Meth()
 {
     System.Collections.Generic.LinkedList <Special <Scan> > test  = new System.Collections.Generic.LinkedList <Special <Scan> >();
     System.Collections.Generic.LinkedList <Scan>            test2 = new System.Collections.Generic.LinkedList <Scan>();
     System.Collections.Generic.LinkedList <ImportCoverage>  test3 = new System.Collections.Generic.LinkedList <ImportCoverage>();
     test.Clear();
     test2.Clear();
     test3.Clear();
 }
Example #11
0
            internal Enumerator(System.Collections.Generic.LinkedList <T> linkedList)
            {
                if (linkedList == null)
                {
                    throw new GameException("Linked list is invalid.");
                }

                m_Enumerator = linkedList.GetEnumerator();
            }
Example #12
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new System.Collections.Generic.LinkedList <System.EventHandler <ILRuntime.Runtime.Intepreter.ILTypeInstance> >();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Example #13
0
        static void Main(string[] args)
        {
            LinkedList linkedList = new LinkedList();

            Console.WriteLine(linkedList.GetLengthRecursive());

            linkedList.Push(5);
            linkedList.Push(6);
            linkedList.Push(1);
            linkedList.Push(8);
            linkedList.Push(1);
            linkedList.Push(6);
            linkedList.Push(5);

            //linkedList.Append(10);
            linkedList.PrintList();

            Console.WriteLine(linkedList.IsPalindrome());
            //Console.WriteLine(linkedList.SearchCountRecursive(6));



            //Console.WriteLine(linkedList.GetMiddleValueUsing3rdApproach());
            //Console.WriteLine(linkedList.GetMiddleValueUsingLength());
            //Console.WriteLine(linkedList.GetNthValueFromLast2ndApproach(6));
            //Console.WriteLine(linkedList.GetNthValueFromLast2ndApproach(3));
            //Console.WriteLine(linkedList.GetNthValueFromLast2ndApproach(2));
            //Console.WriteLine(linkedList.GetNthValueFromLast2ndApproach(1));
            //Console.WriteLine(linkedList.GetNthValueFromLast2ndApproach(0));
            //Console.WriteLine(linkedList.GetNthValueFromLast2ndApproach(4));

            //Console.WriteLine(linkedList.GetNthValueRecursion(0));
            //Console.WriteLine(linkedList.GetNthValueRecursion(1));
            //Console.WriteLine(linkedList.GetNthValueRecursion(3));
            //Console.WriteLine(linkedList.GetNthValueRecursion(6));
            //Console.WriteLine(linkedList.GetNthValueRecursion(5));

            // Console.WriteLine(linkedList.GetNthValue(5));



            //Console.WriteLine(linkedList.SearchRecursive(5));
            //Console.WriteLine(linkedList.SearchRecursive(6));
            //Console.WriteLine(linkedList.SearchRecursive(1));
            //Console.WriteLine(linkedList.SearchRecursive(8));
            //Console.WriteLine(linkedList.SearchRecursive(4));


            //linkedList.DeleteValue(1);
            //linkedList.PrintList();
            //Console.WriteLine(linkedList.GetLengthRecursive());
            //linkedList.DeletePosition(4);
            Console.WriteLine("Hello World!");
            System.Collections.Generic.LinkedList <string> b = new System.Collections.Generic.LinkedList <string>();
            Console.ReadLine();
        }
        public void BulkInsert()
        {
            System.Collections.Generic.LinkedList<SqlEntity1> list = new System.Collections.Generic.LinkedList<SqlEntity1>();

            for (int i = 0; i < 100; i++)
                list.AddLast(new SqlEntity1() { Message = "Bulk insert " + i });


            SqlDatabase.Default.Insert<SqlEntity1>(list);
        }
Example #15
0
        public void StandartLinkedList()
        {
            var l  = 256 * 16 * 256;
            var ll = new System.Collections.Generic.LinkedList <Char>();

            for (int i = 0; i < l; i++)
            {
                ll.AddLast('a');
            }
        }
Example #16
0
        /** constructor
         */
        public JsonItemToObject_WorkPool()
        {
            //list
            this.list = new System.Collections.Generic.LinkedList <JsonItemToObject_WorkPool_Item>();

            //temp_parameter_list_1
            this.temp_parameter_list_1 = new System.Object[1] {
                null
            };
        }
Example #17
0
 private static void Display(System.Collections.Generic.LinkedList <string> words, string test)
 {
     Console.WriteLine(test);
     foreach (string word in words)
     {
         Console.Write(word + " ");
     }
     Console.WriteLine();
     Console.WriteLine();
 }
Example #18
0
        // Convert a given Binary Tree to Doubly Linked List
        public System.Collections.Generic.LinkedList <int> GetDoublyLinkedList(BinaryTreeNode binaryTree)
        {
            System.Collections.Generic.LinkedList <int> doublyLinkedList =
                new System.Collections.Generic.LinkedList <int>();

            // In order Traversal
            InOrderTraversal(binaryTree.Left, ref doublyLinkedList);

            return(doublyLinkedList);
        }
Example #19
0
 /** constructor
  */
 public NodePool(int a_capacity)
 {
     //list
     this.list = new System.Collections.Generic.LinkedList <NODE>();
     for (int ii = 0; ii < a_capacity; ii++)
     {
         NODE t_raw = new NODE();
         System.Collections.Generic.LinkedListNode <NODE> t_node = new System.Collections.Generic.LinkedListNode <NODE>(t_raw);
         this.list.AddLast(t_node);
     }
 }
Example #20
0
        private void InOrderTraversal(BinaryTreeNode binaryTreeNode, ref System.Collections.Generic.LinkedList <int> doublyLinkedList)
        {
            if (binaryTreeNode == null)
            {
                return;
            }

            InOrderTraversal(binaryTreeNode.Left, ref doublyLinkedList);
            doublyLinkedList.AddLast(binaryTreeNode.Value);
            InOrderTraversal(binaryTreeNode.Right, ref doublyLinkedList);
        }
Example #21
0
 public Cache(int size = 1024 * 32)
 {
     lock (mLock)
     {
         mSize = size;
         mDict =
             new System.Collections.Generic.Dictionary
             <TKey, System.Collections.Generic.LinkedListNode <CacheEntry> >(mSize);
         mList = new System.Collections.Generic.LinkedList <CacheEntry>();
     }
 }
Example #22
0
 /** constructor
  */
 public BufferNodeIndexList(System.Collections.Generic.LinkedList <NODE> a_list)
 {
     //list
     this.list = new System.Collections.Generic.LinkedListNode <NODE> [a_list.Count];
     System.Collections.Generic.LinkedListNode <NODE> t_node = a_list.First;
     while (t_node != null)
     {
         this.list[t_node.Value.GetBufferIndex()] = t_node;
         t_node = t_node.Next;
     }
 }
Example #23
0
        static void Main(string[] args)
        {
            System.Collections.Generic.LinkedList <int> list = new System.Collections.Generic.LinkedList <int>();
            list.AddFirst(1);
            list.AddLast(2);
            list.AddLast(3);
            list.AddLast(4);
            list.AddLast(5);

            var result = list.FindKthFromLastRecursive(2);
        }
Example #24
0
        internal static bool ruby_thread_abort = false; //TODO: Not done yet - back ground logic!!
        //needs a default group

        //-----------------------------------------------------------------

        internal Thread()
            : base(Ruby.Runtime.Init.rb_cThread)
        {
            if (thread_list == null)
            {
                //create the thread_list and add the main thread
                thread_list = new System.Collections.Generic.LinkedList<Thread>();
                thread_list.AddLast(Eval.main_thread);
            }
            thGroup = Eval.thgroup_default;
        }
Example #25
0
        /** a_index から 後方向へ、a_listに所属するノードのインデックスを検索。
         */
        public int FindInListIndexToEnd(System.Collections.Generic.LinkedList <NODE> a_list, int a_index)
        {
            for (int ii = a_index; ii < this.list.Length; ii++)
            {
                if (this.list[ii].List == a_list)
                {
                    return(ii);
                }
            }

            return(-1);
        }
        public Entity SetTurnOrder(System.Collections.Generic.LinkedList <Entitas.Entity> newValue)
        {
            if (hasTurnOrder)
            {
                throw new EntitasException("Could not set turnOrder!\n" + this + " already has an entity with TurnOrderComponent!",
                                           "You should check if the pool already has a turnOrderEntity before setting it or use pool.ReplaceTurnOrder().");
            }
            var entity = CreateEntity();

            entity.AddTurnOrder(newValue);
            return(entity);
        }
Example #27
0
    public GameEntity SetActors(System.Collections.Generic.LinkedList <GameEntity> newValue)
    {
        if (hasActors)
        {
            throw new Entitas.EntitasException("Could not set Actors!\n" + this + " already has an entity with ActorsComponent!",
                                               "You should check if the context already has a actorsEntity before setting it or use context.ReplaceActors().");
        }
        var entity = CreateEntity();

        entity.AddActors(newValue);
        return(entity);
    }
Example #28
0
        /** a_index から 前方向へ、a_listに所属するノードのインデックスを検索。
         */
        public int FindInListIndexToStart(System.Collections.Generic.LinkedList <NODE> a_list, int a_index)
        {
            for (int ii = a_index; ii >= 0; ii--)
            {
                if (this.list[ii].List == a_list)
                {
                    return(ii);
                }
            }

            return(-1);
        }
Example #29
0
    public void ReplaceActors(System.Collections.Generic.LinkedList <GameEntity> newValue)
    {
        var entity = actorsEntity;

        if (entity == null)
        {
            entity = SetActors(newValue);
        }
        else
        {
            entity.ReplaceActors(newValue);
        }
    }
 public override com.epl.geometry.Geometry Next()
 {
     if (m_geomList != null && !(m_geomList.Count == 0))
     {
         m_index++;
         com.epl.geometry.Geometry data = m_geomList.FirstOrDefault();
         m_geomList.RemoveFirst();
         return(data);
     }
     m_geomList = null;
     //prevent the class from being used again
     return(null);
 }
Example #31
0
    public void ReplaceTurnOrder(System.Collections.Generic.LinkedList <PoolEntity> newValue)
    {
        var entity = turnOrderEntity;

        if (entity == null)
        {
            entity = SetTurnOrder(newValue);
        }
        else
        {
            entity.ReplaceTurnOrder(newValue);
        }
    }
Example #32
0
        /** [シングルトン]constructor
         */
        private Crypt()
        {
            //work
            this.work_pool = new List.NodePool <WorkItem>(16);
            this.work_add  = new System.Collections.Generic.LinkedList <WorkItem>();
            this.work_list = new System.Collections.Generic.LinkedList <WorkItem>();

            //main_security
            this.main_security = new Main_Security();

            //PlayerLoopType
            this.playerloop_flag = true;
            Fee.PlayerLoopSystem.PlayerLoopSystem.GetInstance().Add(Config.PLAYERLOOP_ADDTYPE, Config.PLAYERLOOP_TARGETTYPE, typeof(PlayerLoopType.Fee_Crypt_Main), this.Main);
        }
Example #33
0
 public override bool IncrementToken()
 {
     if (cache == null)
     {
         // fill cache lazily
         cache = new System.Collections.Generic.LinkedList<State>();
         FillCache();
         iterator = cache.GetEnumerator();
     }
     
     if (!iterator.MoveNext())
     {
         // the cache is exhausted, return false
         return false;
     }
     // Since the TokenFilter can be reset, the tokens need to be preserved as immutable.
     RestoreState(iterator.Current);
     return true;
 }
    // Reset controller
    void reset()
    {
        engine1.CutEngine();
        engine2.CutEngine();
        engine3.CutEngine();
        engine4.CutEngine();

        transform.position = new Vector3(0,2,0);
        transform.rotation = new Quaternion();

        m_debugCurrentHeight = new System.Collections.Generic.LinkedList<float>();
        m_debugTargetHeight = new System.Collections.Generic.LinkedList<float>();
    }
Example #35
0
        public string getDisServiceId(string objectId, string instanceId)
        {
            if (_host == null)
                throw new ObjectDisposedException("DisServiceProxy");

            while (true)
            {
                try
                {
                    connectFlag.WaitOne();
                    lock (bigDisServiceLock)
                    {
                        throwIfInCallbackHandler();
                        _commHelper.sendLine("getDisServiceId");
                        _commHelper.sendStringBlock(objectId);
                        _commHelper.sendStringBlock(instanceId);

                        string response = _commHelper.receiveLine(_timeout);
                        if (response == "ERROR")
                        {
                            throw new DisServiceException("remote error.");
                        }

                        System.Collections.Generic.LinkedList<string> list = new System.Collections.Generic.LinkedList<string>();
                        byte[] b;
                        while ((b = _commHelper.receiveBlock()) != null)
                        {
                            string id = (new System.Text.ASCIIEncoding()).GetString(b);
                            list.AddFirst(id);
                        }

                        response = _commHelper.receiveLine(_timeout);
                        if (response == "ERROR")
                        {
                            throw new DisServiceException("remote error.");
                        }
                        return (list.Count == 0 ? null : list.First.Value);
                    }
                }
                catch (CommException)
                {
                    reconnect();
                }
            }
        }
Example #36
0
		public void LoseConditionIsMet()
		{
			var blockLists = new System.Collections.Generic.List<System.Collections.Generic.LinkedList<Block>>();

			for (int counter = 0; counter < 6; counter++)
			{
				var linkedList = new System.Collections.Generic.LinkedList<Block>();

				for (int listCounter = 0; listCounter < 14; listCounter++)
				{
					linkedList.AddFirst(new Block());
				}
					
				blockLists.Add(linkedList);
			}
				
			Board target = new Board()
			{
				BlockLists = blockLists
			};

			bool actual = target.IsLoseConditionMet();

			Assert.IsTrue(actual);
		}
Example #37
0
		public void PushBlocksTest()
		{
			int numberOfBlocksInTheList = 10;
			var blockLists = new System.Collections.Generic.List<System.Collections.Generic.LinkedList<Block>>();

			for (int counter = 0; counter < 6; counter++)
			{
				var linkedList = new System.Collections.Generic.LinkedList<Block>();

				for (int listCounter = 0; listCounter < numberOfBlocksInTheList; listCounter++)
				{
					linkedList.AddFirst(new Block());
				}

				blockLists.Add(linkedList);
			}

			Board target = new Board()
			{
				BlockLists = blockLists
			};

			target.PushBlocks();

			Assert.AreEqual(++numberOfBlocksInTheList, target.BlockLists[0].Count);
		}
        /// <summary>Constructs a new SpriterAbstractPlayer object which is able to animate SpriterBone instances and SpriterObject instances.
        /// 	</summary>
        /// <remarks>Constructs a new SpriterAbstractPlayer object which is able to animate SpriterBone instances and SpriterObject instances.
        /// 	</remarks>
        /// <param name="loader">
        /// 
        /// <see cref="com.brashmonkey.spriter.file.FileLoader{I}">com.brashmonkey.spriter.file.FileLoader&lt;I&gt;
        /// 	</see>
        /// which you have to implement on your own.
        /// </param>
        /// <param name="keyframes">
        /// A list of SpriterKeyFrame arrays. See
        /// <see cref="com.brashmonkey.spriter.SpriterKeyFrameProvider.generateKeyFramePool(com.discobeard.spriter.dom.SpriterData, com.discobeard.spriter.dom.Entity)
        /// 	">com.brashmonkey.spriter.SpriterKeyFrameProvider.generateKeyFramePool(com.discobeard.spriter.dom.SpriterData, com.discobeard.spriter.dom.Entity)
        /// 	</see>
        /// to get the list.
        /// Generate these keyframes once to save memory.
        /// </param>
        public SpriterAbstractPlayer(com.brashmonkey.spriter.file.FileLoader loader,
            System.Collections.Generic.IList<com.brashmonkey.spriter.animation.SpriterAnimation
			> animations)
        {
            this.loader = loader;
            this.animations = animations;
            this.rootParent = new com.brashmonkey.spriter.objects.SpriterBone();
            this.tempParent = new com.brashmonkey.spriter.objects.SpriterBone();
            this.rootParent.setName("playerRoot");
            this.tempParent.setName("playerRoot");
            this.lastFrame = new com.brashmonkey.spriter.animation.SpriterKeyFrame();
            this.lastTempFrame = new com.brashmonkey.spriter.animation.SpriterKeyFrame();
            this.interpolator = com.brashmonkey.spriter.interpolation.SpriterLinearInterpolator
                .interpolator;
            this.players = new System.Collections.Generic.LinkedList<com.brashmonkey.spriter.player.SpriterAbstractPlayer>();
            rect = new com.brashmonkey.spriter.SpriterRectangle(0, 0, 0, 0);
        }
 public Searcher()
 {
     usedMaterials = new System.Collections.Generic.LinkedList<string>();
     materials = new System.Collections.Generic.LinkedList<string>();
     modelsWithoutMaterial = new System.Collections.Generic.LinkedList<string>();
 }
Example #40
0
 public SpriterBone()
 {
     this.childBones = new System.Collections.Generic.LinkedList<com.brashmonkey.spriter.objects.SpriterBone>();
     this.childObjects = new System.Collections.Generic.LinkedList<com.brashmonkey.spriter.objects.SpriterObject>();
     this.boundingBox = new com.brashmonkey.spriter.SpriterRectangle(0, 0, 0, 0);
 }