C# Class UnityAI.Core.Planning.Predicate

Inheritance: IComparable
Afficher le fichier Open project: unityai/unityai-core Class Usage Examples

Méthodes publiques

Méthode Description
CalculateHashCode ( string name, bool isNegative, IEnumerable parameters ) : int

Calculates a hashcode for a predicate's parameters

Written separately so that it can be used for calculating hashes on predicat caching

CompareTo ( object obj ) : int
Create ( string name ) : Predicate

Create a Predicate

Create ( string name, bool isNegative ) : Predicate

Create a Predicate

Equals ( object obj ) : bool

Is this predicate Equal to another Predicate?

FindPredicate ( string name, bool isNegative ) : Predicate

Find the Predicate in the Cache

GetHashCode ( ) : int

Calculates the predicate's hashcode

IsComplimentOf ( Predicate predicate ) : bool

Are the Predicates Negatives of Eachother

ToString ( ) : string

String Representation of the Predicate

Validate ( ) : void

Marks the predicate as current

Méthodes protégées

Méthode Description
AddPredicate ( Predicate predicate ) : void

Adds a Predicate to the current cache

CalculateHashCode ( Predicate predicate ) : int

Calculates a hashcode for a predicate

Written separately so that it can be used for calculating hashes on predicat caching

Predicate ( string name ) : System

Construct a Predicate ie At(Monster,Location)

Predicate ( string name, bool isNegative ) : System

Construct a Predicate ie At(Monster,Location)

Private Methods

Méthode Description
InitializeCache ( ) : void

Initialize the Predicate Cache

Predicate ( ) : System

Static Constructor

Method Details

AddPredicate() protected static méthode

Adds a Predicate to the current cache
protected static AddPredicate ( Predicate predicate ) : void
predicate Predicate Predicate to add
Résultat void

CalculateHashCode() protected static méthode

Calculates a hashcode for a predicate
Written separately so that it can be used for calculating hashes on predicat caching
protected static CalculateHashCode ( Predicate predicate ) : int
predicate Predicate Predicate to evaluate
Résultat int

CalculateHashCode() public static méthode

Calculates a hashcode for a predicate's parameters
Written separately so that it can be used for calculating hashes on predicat caching
public static CalculateHashCode ( string name, bool isNegative, IEnumerable parameters ) : int
name string Predicate name
isNegative bool Is the predicate negative?
parameters IEnumerable Predicate parameters
Résultat int

CompareTo() public méthode

public CompareTo ( object obj ) : int
obj object
Résultat int

Create() public static méthode

Create a Predicate
public static Create ( string name ) : Predicate
name string Name of Predicate
Résultat Predicate

Create() public static méthode

Create a Predicate
public static Create ( string name, bool isNegative ) : Predicate
name string Name of Predicate
isNegative bool Is Negative?
Résultat Predicate

Equals() public méthode

Is this predicate Equal to another Predicate?
public Equals ( object obj ) : bool
obj object
Résultat bool

FindPredicate() public static méthode

Find the Predicate in the Cache
public static FindPredicate ( string name, bool isNegative ) : Predicate
name string Name of the Predicate
isNegative bool Is Negated
Résultat Predicate

GetHashCode() public méthode

Calculates the predicate's hashcode
public GetHashCode ( ) : int
Résultat int

IsComplimentOf() public méthode

Are the Predicates Negatives of Eachother
public IsComplimentOf ( Predicate predicate ) : bool
predicate Predicate Predicate to Compare
Résultat bool

Predicate() protected méthode

Construct a Predicate ie At(Monster,Location)
protected Predicate ( string name ) : System
name string Name of the Predicate
Résultat System

Predicate() protected méthode

Construct a Predicate ie At(Monster,Location)
protected Predicate ( string name, bool isNegative ) : System
name string Name of the Predicate
isNegative bool Is Negated?
Résultat System

ToString() public méthode

String Representation of the Predicate
public ToString ( ) : string
Résultat string

Validate() public méthode

Marks the predicate as current
public Validate ( ) : void
Résultat void