FrameIT
|
Base class for all FactComparer to be used in conjucntion with Stage.solution
Public Member Functions | |
FactComparer | SetSearchRight () |
Sets search_righthanded, so that parameter order of Equals(Fact, Fact) is effectively: (Compare(Fact, Fact).solution, Compare(Fact, Fact).fact), when a ICollection<Fact> is on the right hand side of an System.Linq operation More... | |
FactComparer | SetSearchLeft () |
Sets search_righthanded, so that parameter order of Equals(Fact, Fact) is effectively: (Compare(Fact, Fact).solution, Compare(Fact, Fact).fact), when a ICollection<Fact> is on the left hand side of an System.Linq operation More... | |
override bool | Equals (Fact left, Fact right) |
Called by System.Linq iff GetHashCode(Fact) returns same result for both parameters left and right . More... | |
override int | GetHashCode (Fact obj) |
Called by System.Linq to check for possible fulfillment of each parameter before calling Equals(Fact, Fact) iff both results are the same. More... | |
Protected Member Functions | |
abstract bool | Compare (Fact solution, Fact fact) |
Implements criteria, by which fact is beeing compared to solution More... | |
abstract void | Init () |
Called by SetSearchLeft and SetSearchRight to initate any class variables. More... | |
Protected Attributes | |
bool | search_righthanded |
defines parameter order for Equals(Fact, Fact) More... | |
Base class for all FactComparer to be used in conjucntion with Stage.solution
Implements criteria, by which fact is beeing compared to solution
solution | to be fulfilled |
fact | to be fulfilling |
true
iff fact is described by solutionImplemented in FactEquivalentsComparer, LineFactHightDirectionComparer, LineFactHightComparer, and LineSpanningOverRiverWorldComparer.
Called by System.Linq iff GetHashCode(Fact) returns same result for both parameters left and right .
Always set correct search order manually beforehand, so that Compare(Fact, Fact) can return correct results.
left | lefthand parameter |
right | righthand parameter |
search_righthanded ? Compare(left, right) : Compare(right, left);
override int FactComparer.GetHashCode | ( | Fact | obj | ) |
Called by System.Linq to check for possible fulfillment of each parameter before calling Equals(Fact, Fact) iff both results are the same.
Default implementation checks for sameness of runtime type, but may vary for subclasses.
obj | parameter of possible subsequent call of Equals(Fact, Fact) |
|
protectedpure virtual |
Called by SetSearchLeft and SetSearchRight to initate any class variables.
Implemented in FactEquivalentsComparer, LineFactHightDirectionComparer, LineFactHightComparer, and LineSpanningOverRiverWorldComparer.
FactComparer FactComparer.SetSearchLeft | ( | ) |
Sets search_righthanded, so that parameter order of Equals(Fact, Fact) is effectively: (Compare(Fact, Fact).solution, Compare(Fact, Fact).fact), when a ICollection<Fact> is on the left hand side of an System.Linq operation
this
object to be usedFactComparer FactComparer.SetSearchRight | ( | ) |
Sets search_righthanded, so that parameter order of Equals(Fact, Fact) is effectively: (Compare(Fact, Fact).solution, Compare(Fact, Fact).fact), when a ICollection<Fact> is on the right hand side of an System.Linq operation
this
object to be used
|
protected |
defines parameter order for Equals(Fact, Fact)