Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | Static Public Attributes | List of all members
Smooth.Compare.Finder Class Reference

Manages comparer registration and lookup for Smooth.Compare. More...

Static Public Member Functions

static IComparer< T > Comparer< T > ()
 Finds or creates a sort order comparer for type T. More...
 
static IEqualityComparer< T > EqualityComparer< T > ()
 Finds or creates an equality comparer for type T. More...
 
static void Register< T > (Comparison< T > comparison, DelegateFunc< T, T, bool > equals)
 Registers a sort order comparer with the specified comparison and an equality comparer with the specified equals function for type T. More...
 
static void Register< T > (Comparison< T > comparison, DelegateFunc< T, T, bool > equals, DelegateFunc< T, int > hashCode)
 Registers a sort order comparer with the specified comparison and an equality comparer with the specified equals and hashCode functions for type T. More...
 
static void Register< T > (IComparer< T > comparer, IEqualityComparer< T > equalityComparer)
 Registers the specified sort order comparer and equality comparer for type T. More...
 
static void Register< T > (Comparison< T > comparison)
 Registers a sort order comparer with the specified comparison for type T. More...
 
static void Register< T > (IComparer< T > comparer)
 Registers the specified sort order comparer for type T. More...
 
static void Register< T > (DelegateFunc< T, T, bool > equals)
 Registers an equality comparer with the specified equals function for type T. More...
 
static void Register< T > (DelegateFunc< T, T, bool > equals, DelegateFunc< T, int > hashCode)
 Registers an equality comparer with the specified equals and hashCode functions for type T. More...
 
static void Register< T > (IEqualityComparer< T > equalityComparer)
 Registers the specified equality comparer for type T. More...
 
static void RegisterIComparable< T > ()
 Registers a sort order comparer for type T where T implements IComparable<T>. More...
 
static void RegisterIComparableIEquatable< T > ()
 Registers sort order and equality comparers for type T where T implements IComparable<T> and IEquatable<T>. More...
 
static void RegisterIEquatable< T > ()
 Registers an equality comparer for type T where T implements IEquatable<T>. More...
 
static void RegisterKeyValuePair< K, V > ()
 Registers an equality comparer for type T where T is an enumeration. More...
 

Static Public Attributes

static GenericEvent
< ComparerType, EventType,
Type > 
OnEvent
 Wrapped caller / delegate for finder events. To subscribe, add a delegate to the enclosed Handle event. More...
 

Detailed Description

Manages comparer registration and lookup for Smooth.Compare.

Member Function Documentation

static IComparer<T> Smooth.Compare.Finder.Comparer< T > ( )
inlinestatic

Finds or creates a sort order comparer for type T.

Note: Do not call this method directly as it is part of the internal API and a new comparers may be created on every call. Use Smooth.Collections.Comparer<T>.Default to get the default sort order comparer.

static IEqualityComparer<T> Smooth.Compare.Finder.EqualityComparer< T > ( )
inlinestatic

Finds or creates an equality comparer for type T.

Note: Do not call this method directly as it is part of the internal API and a new comparers may be created on every call. Use Smooth.Collections.EqualityComparer<T>.Default to get the default equality comparer.

static void Smooth.Compare.Finder.Register< T > ( Comparison< T >  comparison,
DelegateFunc< T, T, bool >  equals 
)
inlinestatic

Registers a sort order comparer with the specified comparison and an equality comparer with the specified equals function for type T.

static void Smooth.Compare.Finder.Register< T > ( Comparison< T >  comparison,
DelegateFunc< T, T, bool >  equals,
DelegateFunc< T, int >  hashCode 
)
inlinestatic

Registers a sort order comparer with the specified comparison and an equality comparer with the specified equals and hashCode functions for type T.

static void Smooth.Compare.Finder.Register< T > ( IComparer< T >  comparer,
IEqualityComparer< T >  equalityComparer 
)
inlinestatic

Registers the specified sort order comparer and equality comparer for type T.

Note: On platforms without JIT compilation, the supplied comparers should respectively inherit from Smooth.Collections.Comparer<T> and Smooth.Collections.EqualityComparer<T> in order to force the AOT compiler to create the proper generic types.

static void Smooth.Compare.Finder.Register< T > ( Comparison< T >  comparison)
inlinestatic

Registers a sort order comparer with the specified comparison for type T.

static void Smooth.Compare.Finder.Register< T > ( IComparer< T >  comparer)
inlinestatic

Registers the specified sort order comparer for type T.

Note: On platforms without JIT compilation, the supplied comparer should inherit from Smooth.Collections.Comparer<T> in order to force the AOT compiler to create the proper generic types.

static void Smooth.Compare.Finder.Register< T > ( DelegateFunc< T, T, bool >  equals)
inlinestatic

Registers an equality comparer with the specified equals function for type T.

static void Smooth.Compare.Finder.Register< T > ( DelegateFunc< T, T, bool >  equals,
DelegateFunc< T, int >  hashCode 
)
inlinestatic

Registers an equality comparer with the specified equals and hashCode functions for type T.

static void Smooth.Compare.Finder.Register< T > ( IEqualityComparer< T >  equalityComparer)
inlinestatic

Registers the specified equality comparer for type T.

Note: On platforms without JIT compilation, the supplied comparer should inherit from Smooth.Collections.EqualityComparer<T> in order to force the AOT compiler to create the proper generic types.

static void Smooth.Compare.Finder.RegisterIComparable< T > ( )
inlinestatic

Registers a sort order comparer for type T where T implements IComparable<T>.

Used to circumvent potential JIT exceptions on platforms without JIT compilation.

Type Constraints
T :IComparable<T> 
static void Smooth.Compare.Finder.RegisterIComparableIEquatable< T > ( )
inlinestatic

Registers sort order and equality comparers for type T where T implements IComparable<T> and IEquatable<T>.

Used to circumvent potential JIT exceptions on platforms without JIT compilation.

Type Constraints
T :IComparable<T> 
T :IEquatable<T> 
static void Smooth.Compare.Finder.RegisterIEquatable< T > ( )
inlinestatic

Registers an equality comparer for type T where T implements IEquatable<T>.

Used to circumvent potential JIT exceptions on platforms without JIT compilation.

Type Constraints
T :IEquatable<T> 
static void Smooth.Compare.Finder.RegisterKeyValuePair< K, V > ( )
inlinestatic

Registers an equality comparer for type T where T is an enumeration.

Note: Enumerations are handled automatically and do not need to be registered when JIT is enabled.

Registers sort order and equality comparers for KeyValuePair<K, V>s.

Note: The comparison operations will rely on the comparers for K and V.

Note: KeyValuePair<,>s are handled automatically and do not need to be registered when JIT is enabled.

Member Data Documentation

GenericEvent<ComparerType, EventType, Type> Smooth.Compare.Finder.OnEvent
static

Wrapped caller / delegate for finder events. To subscribe, add a delegate to the enclosed Handle event.


The documentation for this class was generated from the following file: