Struct DomainObjectID
The trait denoting that an entity represents a domain object
Namespace: Unity.AI.Planner.DomainLanguage.TraitBased
Syntax
public struct DomainObjectID : ITrait, IBufferElementData, IEquatable<DomainObjectID>
Fields
ID
A unique ObjectID assigned to the domain object
Declaration
public ObjectID ID
Field Value
| Type | Description |
|---|---|
| ObjectID |
Methods
Equals(Object)
Test for equality
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | Other DomainObjectID |
Returns
| Type | Description |
|---|---|
| System.Boolean | Result of equality test |
Overrides
System.ValueType.Equals(System.Object)
Equals(DomainObjectID)
Test for equality
Declaration
public bool Equals(DomainObjectID other)
Parameters
| Type | Name | Description |
|---|---|---|
| DomainObjectID | other | Other DomainObjectID |
Returns
| Type | Description |
|---|---|
| System.Boolean | Result of equality test |
GetHashCode()
Get the hash code
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code |
Overrides
System.ValueType.GetHashCode()
GetNext()
Provides a new DomainObjectTrait with a unique DomainObjectID
Declaration
public static DomainObjectID GetNext()
Returns
| Type | Description |
|---|---|
| DomainObjectID | Returns a new DomainObjectTrait with an new unique DomainObjectID |
SetField(String, Object)
Set the value of a field
Declaration
public void SetField(string fieldName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fieldName | Name of field |
| System.Object | value | Value |
Implements
ToString()
Returns a string that represents the DomainObjectID
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string that represents the DomainObjectID |
Overrides
System.ValueType.ToString()
Operators
Equality(DomainObjectID, DomainObjectID)
Compares two given DomainObjectIDs
Declaration
public static bool operator ==(DomainObjectID x, DomainObjectID y)
Parameters
| Type | Name | Description |
|---|---|---|
| DomainObjectID | x | A DomainObjectID |
| DomainObjectID | y | A DomainObjectID |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns if two DomainObjectIDs are equal |
Inequality(DomainObjectID, DomainObjectID)
Compares two given DomainObjectIDs
Declaration
public static bool operator !=(DomainObjectID x, DomainObjectID y)
Parameters
| Type | Name | Description |
|---|---|---|
| DomainObjectID | x | A DomainObjectID |
| DomainObjectID | y | A DomainObjectID |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns if two DomainObjectIDs are not equal |