public Entity AddCurrentTurnNode(System.Collections.Generic.LinkedListNode <Entitas.Entity> newValue) { var component = CreateComponent <CurrentTurnNodeComponent>(ComponentIds.CurrentTurnNode); component.value = newValue; return(AddComponent(ComponentIds.CurrentTurnNode, component)); }
public LinkedCollectionChangedEventArgs(LinkedCollectionChangedAction action, #if !WinCopies3 System.Collections.Generic.LinkedListNode #else ILinkedListNode #endif <T> addedBefore,
/** 隙間を埋める。使用リストの順序に合わせてバッファを入れ替える。 */ 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; } } }
/** 更新。 */ private void Main() { try{ if (this.playerloop_flag == true) { //追加。 { System.Collections.Generic.LinkedListNode <WorkItem> t_node = this.work_add.Last; while (t_node != null) { this.work_add.Remove(t_node); this.work_list.AddLast(t_node); t_node = this.work_add.Last; } } //更新。 { System.Collections.Generic.LinkedListNode <WorkItem> t_node = this.work_list.First; while (t_node != null) { System.Collections.Generic.LinkedListNode <WorkItem> t_node_next = t_node.Next; if (t_node.Value.Main() == true) { this.work_list.Remove(t_node); this.work_pool.Free(t_node); } t_node = t_node_next; } } } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } }
private static void IndicateNode(System.Collections.Generic.LinkedListNode <string> node, string test) { Console.WriteLine(test); if (node.List == null) { Console.WriteLine("Node '{0}' is not in the list.\n", node.Value); return; } System.Text.StringBuilder result = new System.Text.StringBuilder("(" + node.Value + ")"); System.Collections.Generic.LinkedListNode <string> nodeP = node.Previous; while (nodeP != null) { result.Insert(0, nodeP.Value + " "); nodeP = nodeP.Previous; } node = node.Next; while (node != null) { result.Append(" " + node.Value); node = node.Next; } Console.WriteLine(result); Console.WriteLine(); }
bool check(LinkedCollectionChangedAction _action, #if !WinCopies3 System.Collections.Generic.LinkedListNode #else ILinkedListNode #endif <T> parameter) => (_action == action && parameter == null) || !(_action == action || parameter == null);
public void Enqueue(T value) { if (_list.Count == 0) { _list.AddLast(value); } else { System.Collections.Generic.LinkedListNode <T> temp = _list.First; while (temp != null && temp.Value.CompareTo(value) > 0) { temp = temp.Next; } if (temp == null) { _list.AddLast(value); } else { _list.AddBefore(temp, value); } } }
public void ReplaceCurrentActor(System.Collections.Generic.LinkedListNode <GameEntity> newValue) { var index = GameComponentsLookup.CurrentActor; var component = CreateComponent <CurrentActorComponent>(index); component.value = newValue; ReplaceComponent(index, component); }
public void ReplaceCurrentTurnNode(System.Collections.Generic.LinkedListNode <PoolEntity> newValue) { var index = PoolComponentsLookup.CurrentTurnNode; var component = CreateComponent <CurrentTurnNodeComponent>(index); component.value = newValue; ReplaceComponent(index, component); }
/** ロードアセットバンドルアイテム。プレハブファイル。 * * ロード済みのアセットバンドルアイテムからプレハブファイルをロード。 * */ public Item RequestLoadAssetBundleItemPrefabFile(string a_assetbundle_name, string a_asset_name) { System.Collections.Generic.LinkedListNode <WorkItem> t_work_node = this.work_pool.Alloc(); t_work_node.Value.Reset(); t_work_node.Value.RequestLoadAssetBundleItemPrefabFile(a_assetbundle_name, a_asset_name); this.work_add.AddLast(t_work_node); return(t_work_node.Value.GetItem()); }
/** リクエスト。複合化。パス。 */ public Item RequestDecryptPass(byte[] a_binary, int a_index, int a_length, string a_pass, string a_salt) { System.Collections.Generic.LinkedListNode <WorkItem> t_work_node = this.work_pool.Alloc(); t_work_node.Value.Reset(); t_work_node.Value.RequestDecryptPass(a_binary, a_index, a_length, a_pass, a_salt); this.work_add.AddLast(t_work_node); return(t_work_node.Value.GetItem()); }
/** リクエスト。ロードローカル。パック。 * * 管理ファイルを直接ロード。 * */ public Item RequestLoadLocalPack(Fee.File.Path a_relative_path) { System.Collections.Generic.LinkedListNode <WorkItem> t_work_node = this.work_pool.Alloc(); t_work_node.Value.Reset(); t_work_node.Value.RequestLoadLocalPack(a_relative_path); this.work_add.AddLast(t_work_node); return(t_work_node.Value.GetItem()); }
/** リクエスト。証明書検証。パブリックキー。 */ public Item RequestVerifySignaturePublicKey(byte[] a_binary, byte[] a_signature_binary, string a_key) { System.Collections.Generic.LinkedListNode <WorkItem> t_work_node = this.work_pool.Alloc(); t_work_node.Value.Reset(); t_work_node.Value.RequestVerifySignaturePublicKey(a_binary, a_signature_binary, a_key); this.work_add.AddLast(t_work_node); return(t_work_node.Value.GetItem()); }
/** 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; } }
/** Free */ public void Free(System.Collections.Generic.LinkedListNode <NODE> a_item) { if (a_item != null) { this.list.AddLast(a_item); } else { Tool.Assert(false); } }
/** Alloc */ public System.Collections.Generic.LinkedListNode <NODE> Alloc() { System.Collections.Generic.LinkedListNode <NODE> t_node = this.list_free.Last; if (t_node != null) { this.list_free.Remove(t_node); this.list_use.AddLast(t_node); return(t_node); } return(null); }
/** 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); } }
/** リクエスト。ロードストリーミングアセット。パック。 * * ロード後ローカルセーブ。 * */ public Item RequestLoadStreamingAssetsPack(Fee.File.Path a_relative_path, uint a_data_version) { System.Collections.Generic.LinkedListNode <WorkItem> t_work_node = this.work_pool.Alloc(); t_work_node.Value.Reset(); t_work_node.Value.RequestLoadStreamingAssetsPack(a_relative_path, a_data_version); this.work_add.AddLast(t_work_node); return(t_work_node.Value.GetItem()); }
/** リクエスト。ロードURL。パック。 * * ロード後ローカルセーブ。 * */ public Item RequestLoadUrlPack(File.Path a_path, System.Collections.Generic.List <UnityEngine.Networking.IMultipartFormSection> a_post_data, Fee.File.CustomCertificateHandler a_certificate_handler, uint a_data_version) { System.Collections.Generic.LinkedListNode <WorkItem> t_work_node = this.work_pool.Alloc(); t_work_node.Value.Reset(); t_work_node.Value.RequestLoadUrlBinaryFile(a_path, a_post_data, a_certificate_handler, a_data_version); this.work_add.AddLast(t_work_node); return(t_work_node.Value.GetItem()); }
public PoolEntity SetCurrentTurnNode(System.Collections.Generic.LinkedListNode <PoolEntity> newValue) { if (hasCurrentTurnNode) { throw new Entitas.EntitasException("Could not set CurrentTurnNode!\n" + this + " already has an entity with CurrentTurnNodeComponent!", "You should check if the context already has a currentTurnNodeEntity before setting it or use context.ReplaceCurrentTurnNode()."); } var entity = CreateEntity(); entity.AddCurrentTurnNode(newValue); return(entity); }
public void ReplaceCurrentTurnNode(System.Collections.Generic.LinkedListNode <PoolEntity> newValue) { var entity = currentTurnNodeEntity; if (entity == null) { entity = SetCurrentTurnNode(newValue); } else { entity.ReplaceCurrentTurnNode(newValue); } }
/** バッファをスワップする。 */ private static void SwapBuffer(System.Collections.Generic.LinkedListNode <NODE> a_node_a, System.Collections.Generic.LinkedListNode <NODE> a_node_b, BUFFER[] a_buffer) { int t_index_a = a_node_a.Value.GetBufferIndex(); int t_index_b = a_node_b.Value.GetBufferIndex(); BUFFER t_temp = a_buffer[t_index_a]; a_buffer[t_index_a] = a_buffer[t_index_b]; a_buffer[t_index_b] = t_temp; a_node_a.Value.SetBufferIndex(t_index_b); a_node_b.Value.SetBufferIndex(t_index_a); }
public void ReplaceCurrentActor(System.Collections.Generic.LinkedListNode <GameEntity> newValue) { var entity = currentActorEntity; if (entity == null) { entity = SetCurrentActor(newValue); } else { entity.ReplaceCurrentActor(newValue); } }
static StackObject *get_Previous_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Collections.Generic.LinkedListNode <System.String> instance_of_this_method = (System.Collections.Generic.LinkedListNode <System.String>) typeof(System.Collections.Generic.LinkedListNode <System.String>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.Previous; return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
public Entity ReplaceCurrentTurnNode(System.Collections.Generic.LinkedListNode <Entitas.Entity> newValue) { var entity = currentTurnNodeEntity; if (entity == null) { entity = SetCurrentTurnNode(newValue); } else { entity.ReplaceCurrentTurnNode(newValue); } return(entity); }
/** a_index以下の、ノードを検索。 * * a_node : 検索開始ノード。 * */ public static System.Collections.Generic.LinkedListNode <NODE> FindLessEequalIndexNode(System.Collections.Generic.LinkedListNode <NODE> a_node, int a_index) { System.Collections.Generic.LinkedListNode <NODE> t_node = a_node; do { if (t_node.Value.GetBufferIndex() <= a_index) { return(t_node); } t_node = t_node.Next; }while(t_node != null); return(null); }
public Bitmap Redo() { if (_current == null) { return(null); } if (_current.Next == null) { return(null); } _current = _current.Next; return(_current.Value); }
public Bitmap Undo() { if (_current == null) { return(null); } if (_current.Previous == null) { return(null); } _current = _current.Previous; return(_current.Value); }
/** Alloc */ public System.Collections.Generic.LinkedListNode <NODE> Alloc() { { System.Collections.Generic.LinkedListNode <NODE> t_node = this.list.Last; if (t_node != null) { this.list.Remove(t_node); return(t_node); } } { Tool.Assert(false); NODE t_raw = new NODE(); return(new System.Collections.Generic.LinkedListNode <NODE>(t_raw)); } }
public static void Demo() { Console.WriteLine("LinkedList......"); string[] words = { "the", "actor", "jumped", "over", "the", "director" }; System.Collections.Generic.LinkedList <string> sentence = new System.Collections.Generic.LinkedList <string>(words); Display(sentence, "The linked list values:"); sentence.AddFirst("today"); Display(sentence, "Test 1: Add 'today' to beginning of the list:"); System.Collections.Generic.LinkedListNode <string> mark1 = sentence.First; sentence.RemoveFirst(); sentence.AddLast(mark1); Display(sentence, "Test 2: Move first node to be last node:"); sentence.RemoveLast(); sentence.AddLast("yesterday"); Display(sentence, "Test 3: Change the last node to 'yesterday':"); mark1 = sentence.Last; sentence.RemoveLast(); sentence.AddFirst(mark1); Display(sentence, "Test 4: Move last node to be first node:"); sentence.RemoveFirst(); System.Collections.Generic.LinkedListNode <string> current = sentence.FindLast("the"); IndicateNode(current, "Test 5: Indicate last occurence of 'the':"); sentence.AddAfter(current, "old"); sentence.AddAfter(current, "lazy"); IndicateNode(current, "Test 6: Add 'lazy' and 'old' after 'the':"); current = sentence.Find("actor"); IndicateNode(current, "Test 7: Indicate the 'actor' node:"); sentence.AddBefore(current, "quick"); sentence.AddBefore(current, "skinny"); IndicateNode(current, "Test 8: Add 'quick' and 'skinny' before 'actor':"); Console.WriteLine("End of LinkedList"); }