Struct DomainObjectID
A unique identifier assigned to each domain object within a state
Namespace: Unity.AI.Planner.DomainLanguage.TraitBased
Syntax
public struct DomainObjectID : IEquatable<DomainObjectID>
Fields
None
The reserved DomainObjectID value specifying a reference to no domain object
Declaration
public static DomainObjectID None
Field Value
| Type | Description |
|---|---|
| DomainObjectID |
Value
Declaration
public int Value
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
Equals(DomainObjectID)
Compares the DomainObjectID to another DomainObjectID
Declaration
public bool Equals(DomainObjectID other)
Parameters
| Type | Name | Description |
|---|---|---|
| DomainObjectID | other | The DomainObjectID for comparison |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the DomainObjectIDs are equal |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
System.ValueType.GetHashCode()
GetNext()
Provides a new DomainObjectID with an unassigned ID
Declaration
public static DomainObjectID GetNext()
Returns
| Type | Description |
|---|---|
| DomainObjectID | Returns a new DomainObjectID with an unassigned ID |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
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 |