Photon Fusion 1.1.12

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OrderSorter Class Reference

This sorting class is meant to be released and garbage collected after use. More...

Public Member Functions

void GenerateInitialNodeList (List< Type > types)
 
void InsertDefaultOrderNodes ()
 
OrderNode RegisterNode (Type type)
 Create the node without searching for attributes yet. More...
 
OrderNode[] Run ()
 Returns sorted list of Types. More...
 
OrderNode[] RunConversion (List< Type > group)
 Orders a list of types based on SortOrder attributes and returns an array of OrderNode structs. More...
 

Static Public Member Functions

static void InsertAfter (OrderNode existing, OrderNode insert, ref OrderNode lastNode)
 
static void InsertBefore (OrderNode insert, OrderNode existing, ref OrderNode firstNode)
 
static bool MergeChains (List< OrderNode > unorderedNodes)
 Merge Before and Afters based on the logic: If A is Before B, and B is Before C, then A is Before C... etc This allows obvious conflicts to be quickly spotted. More...
 
static void Remove (OrderNode node, ref OrderNode firstNode, ref OrderNode lastNode)
 
static bool ResortNode (OrderNode node, ref OrderNode firstNode, ref OrderNode lastNode)
 
static void Sort (List< OrderNode > unorderedNodes, ref OrderNode firstNode, ref OrderNode lastNode)
 

Public Attributes

OrderNode FirstNode
 
Dictionary< Type, OrderNode > NodeLookup = new Dictionary<Type, OrderNode>()
 
OrderNode[] SortedNodes
 

Detailed Description

This sorting class is meant to be released and garbage collected after use.

Member Function Documentation

◆ MergeChains()

static bool MergeChains ( List< OrderNode >  unorderedNodes)
static

Merge Before and Afters based on the logic: If A is Before B, and B is Before C, then A is Before C... etc This allows obvious conflicts to be quickly spotted.

Returns

◆ RegisterNode()

OrderNode RegisterNode ( Type  type)

Create the node without searching for attributes yet.

◆ Run()

OrderNode [] Run ( )

Returns sorted list of Types.

Returns

◆ RunConversion()

OrderNode [] RunConversion ( List< Type >  group)

Orders a list of types based on SortOrder attributes and returns an array of OrderNode structs.