Skip to content

EntityTypeEditor

huggins edited this page Apr 10, 2025 · 2 revisions

Entity Type Editor

Used to allow DIS Entity Types to be shown in the Unity Inspector panel. Houses variables contained in a DIS Entity Type.

public class EntityTypeEditor

Includes

Back to Top


Members

Access Type Name Description
Public byte category This field shall specify the main category that describes the entity. The enumerations of category depend upon both the Kind and Domain.
Public ushort country This field shall specify the country to which the design of the entity is attributed. This field shall be represented by a 16-bit enumeration.
Public const string DELIMITER_PERIOD Constant field that contains a the "." character.
Public byte domain This field shall specify the domain in which the equipment operates except for munition entities. For Munition entities this field shall specify the domain of the target.
Public byte entityKind This field shall identify the Kind of Entity.
Public byte extra This field shall specify extra information required to describe a particular entity. The contents of this field shall depend on the type of entity represented.
Public byte specific This field shall specify specific information about an entity based upon the subcategory field to which it belongs.
Public byte subcategory This field shall specify a particular subcategory to which the entity belongs based on the category and the country.
Public bool UseSpecific_Category If the category should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.
Public bool UseSpecific_Country If the country should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.
Public bool UseSpecific_Domain If the domain should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.
Public bool UseSpecific_EntityKind If the entity kind should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.
Public bool UseSpecific_Extra If the extra should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.
Public bool UseSpecific_Specific If the specific should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.
Public bool UseSpecific_Subcategory If the subcategory should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


Constructors

Name Description
EntityTypeEditor() Default constructor
EntityTypeEditor(EntityType EntityTypeIn) Constructor that takes in the OpenDIS EntityType struct

Functions

Access Return Name Description
Public EntityTypeEditor DeepCopyEntityType() Creates a copy of this EntityTypeEditor.
Public void fromEntityType(EntityType EntityTypeIn) Converts the DIS Entity Type to an EntityTypeEditor.
Public bool EntityTypeFieldEqualTo(ushort lhs, ushort rhs, bool lhsUseSpecific, bool rhsUseSpecific) Utilized for determining if an entity type field is equivalent to another. Takes wildcards into account.
Public bool EntityTypeFieldGreaterThan(ushort lhs, ushort rhs, bool lhsUseSpecific, bool rhsUseSpecific) Utilized for determining if an entity type field is greater than another. Takes wildcards into account.
Public bool EntityTypeFieldLessThan(ushort lhs, ushort rhs, bool lhsUseSpecific, bool rhsUseSpecific) Utilized for determining if an entity type field is less than another. Takes wildcards into account.
Public EntityTypeEditor FillWildcards(EntityTypeEditor WildcardFiller) Utilized for wildcard Entity Types. Replaces wildcard placeholders with actual values.
Public override int GetHashCode() Converts an EntityTypeEditor to be usable as a hash.
Public bool HasWildcards() Utilized for determining if an entity type has any wildcard values in it.
Public bool Equals(EntityTypeEditor Other) Checks if the given EntityTypeEditor is equal to this.
Public bool LessThan(EntityTypeEditor Other) Checks if the given EntityTypeEditor is less than this.
Public EntityType toEntityType() Converts the EntityTypeEditor to a DIS Entity Type.
Public override string ToString() Converts the EntityTypeEditor to a string.

Operator Overloads

Return Name Description
bool operator==(const EntityTypeEditor Other) Overloads the == operator. Compares two Entity Types to see if they are equal.
bool operator!=(const EntityTypeEditor Other) Overloads the != operator. Compares two Entity Types to see if they are not equal.
bool operator<(const EntityTypeEditor Other) Overloads the < operator. Compares two Entity Types to see if this Entity Type is less than the passed Entity Type.
bool operator>(const EntityTypeEditor Other) Overloads the > operator. Compares two Entity Types to see if this Entity Type is greater than the passed Entity Type.
bool operator<=(const EntityTypeEditor Other) Overloads the <= operator. Compares two Entity Types to see if this Entity Type is less than or equal to the passed Entity Type.
bool operator>=(const EntityTypeEditor Other) Overloads the >= operator. Compares two Entity Types to see if this Entity Type is greater than or equal to the passed Entity Type.

Back to Top


Details

Category

byte Category

This field shall specify the main category that describes the entity. The enumerations of category depend upon both the Kind and Domain.

Back to Top


Country

ushort Country

This field shall specify the country to which the design of the entity is attributed. This field shall be represented by a 16-bit enumeration.

Back to Top


DELIMITER_PERIOD

public const string DELIMITER_PERIOD = "."

Constant field that contains a the "." character.

Back to Top


Domain

byte Domain

This field shall specify the domain in which the equipment operates except for munition entities. For Munition entities this field shall specify the domain of the target.

Back to Top


EntityKind

byte EntityKind

This field shall identify the Kind of Entity.

Back to Top


Extra

byte Extra

This field shall specify extra information required to describe a particular entity. The contents of this field shall depend on the type of entity represented.

Back to Top


Specific

byte Specific

This field shall specify specific information about an entity based upon the subcategory field to which it belongs.

Back to Top


Subcategory

byte Subcategory

This field shall specify a particular subcategory to which the entity belongs based on the category and the country.

Back to Top


UseSpecific_Category

bool UseSpecific_Category

If the category should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


UseSpecific_Country

bool UseSpecific_Country

If the country should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


UseSpecific_Domain

bool UseSpecific_Domain

If the domain should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


UseSpecific_EntityKind

bool UseSpecific_EntityKind

If the entity kind should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


UseSpecific_Extra

bool UseSpecific_Extra

If the extra should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


UseSpecific_Specific

bool UseSpecific_Specific

If the specific should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


UseSpecific_Subcategory

bool UseSpecific_Subcategory

If the subcategory should be represented by a specific value or a wildcard. If field is true, a specific value is used. If field is false, a wildcard will be used.

Back to Top


EntityTypeEditor

EntityTypeEditor()

Default constructor

Back to Top


EntityTypeEditor

EntityTypeEditor(
    EntityType EntityTypeIn
)

Constructor that takes in the OpenDIS EntityType struct.

Parameter Description
EntityType The OpenDIS EntityType struct to convert to an EntityType struct.

Back to Top


DeepCopyEntityType

public EntityTypeEditor DeepCopyEntityType()

Creates a copy of this EntityTypeEditor.

Returns
The copy of this EntityTypeEditor.

Back to Top


FromEntityType

public void fromEntityType
(
    EntityType EntityTypeIn
)

Converts the DIS Entity Type to an EntityTypeEditor.

Parameter Description
EntityTypeIn The DIS Entity Type to convert.

Back to Top


EntityTypeFieldEqualTo

bool EntityTypeFieldEqualTo(
    ushort lhs,
    ushort rhs,
    bool lhsUseSpecific,
    bool rhsUseSpecific
)

Utilized for determining if an entity type field is equivalent to another. Takes wildcards into account.

Parameter Description
lhs The entity type field to act as the left hand side in the comparison.
rhs The entity type field to act as the right hand side in the comparison.
lhsUseSpecific Whether the left hand side field is acting as a specific value or a wildcard.
rhsUseSpecific Whether the right hand side field is acting as a specific value or a wildcard.
Returns
A boolean specifying whether or not the lhs is equal to the rhs.

Back to Top


EntityTypeFieldGreaterThan

bool EntityTypeFieldGreaterThan(
    ushort lhs,
    ushort rhs,
    bool lhsUseSpecific,
    bool rhsUseSpecific
)

Utilized for determining if an entity type field is greater than another. Takes wildcards into account.

Parameter Description
lhs The entity type field to act as the left hand side in the comparison.
rhs The entity type field to act as the right hand side in the comparison.
lhsUseSpecific Whether the left hand side field is acting as a specific value or a wildcard.
rhsUseSpecific Whether the right hand side field is acting as a specific value or a wildcard.
Returns
A boolean specifying whether or not the lhs is greater than the rhs.

Back to Top


EntityTypeFieldLessThan

bool EntityTypeFieldLessThan(
    ushort lhs,
    ushort rhs,
    bool lhsUseSpecific,
    bool rhsUseSpecific
)

Utilized for determining if an entity type field is less than another. Takes wildcards into account.

Parameter Description
lhs The entity type field to act as the left hand side in the comparison.
rhs The entity type field to act as the right hand side in the comparison.
lhsUseSpecific Whether the left hand side field is acting as a specific value or a wildcard.
rhsUseSpecific Whether the right hand side field is acting as a specific value or a wildcard.
Returns
A boolean specifying whether or not the lhs is less than the rhs.

Back to Top


FillWildcards

public EntityTypeEditor FillWildcards(
    EntityTypeEditor WildcardFiller
)

Utilized for wildcard Entity Types. Replaces wildcard placeholders with actual values.

Parameter Description
WildcardFiller The EntityTypeEditor to use to replace the wildcard placeholders.
Returns
An EntityTypeEditor without and wildcard placeholders.

Back to Top


GetHashCode

public override int GetHashCode()

Converts an Entity Type to be usable as a hash

Returns
The int hash of this EntityTypeEditor.

Back to Top


HasWildcards

public bool HasWildcards()

Utilized for determining if an entity type has any wildcard values in it.

Returns
A boolean specifying whether or not the entity type has any wildcards values in it.

Back to Top


Equals

public bool Equals(
    EntityTypeEditor Other
)

Checks if the given EntityTypeEditor is equal to this.

Parameter Description
Other The EntityTypeEditor to check for equivalence.
Returns
Whether or not the given EntityTypeEditor is equal to this.

Back to Top


LessThan

public bool LessThan(
    EntityTypeEditor Other
)

Checks if this is less than the given EntityTypeEditor.

Parameter Description
Other The EntityTypeEditor to check.
Returns
Whether or not this is less than the given EntityTypeEditor.

Back to Top


ToEntityType

public EntityType toEntityType()

Converts the EntityTypeEditor to a DIS Entity Type.

Returns
The DIS Entity Type representation of the Entity Type Editor.

Back to Top


ToString

public override string ToString()

Converts the EntityTypeEditor to a string.

Returns
The string representation of the Entity Type Editor.

Back to Top


operator==

public static bool operator ==
(
    EntityTypeEditor lhs,
    EntityTypeEditor rhs
)

Overloads the == operator. Compares two Entity Types to see if they are equal.

Parameter Description
lhs The EntityTypeEditor to have on the left hand side of the comparison.
rhs The EntityTypeEditor to have on the right hand side of the comparison.
Returns
Whether or not the two passed EntityTypeEditors are equivalent.

Back to Top


operator!=

public static bool operator !=
(
    EntityTypeEditor lhs,
    EntityTypeEditor rhs
)

Overloads the != operator. Compares two Entity Types to see if they are not equal.

Parameter Description
lhs The EntityTypeEditor to have on the left hand side of the comparison.
rhs The EntityTypeEditor to have on the right hand side of the comparison.
Returns
Whether or not the two passed EntityTypeEditors are not equivalent.

Back to Top


operator<

public static bool operator <
(
    EntityTypeEditor lhs,
    EntityTypeEditor rhs
)

Overloads the < operator. Compares two Entity Types to see if this Entity Type is less than the passed Entity Type.

Parameter Description
lhs The EntityTypeEditor to have on the left hand side of the comparison.
rhs The EntityTypeEditor to have on the right hand side of the comparison.
Returns
Whether or not the lhs EntityTypeEditor is less than the rhs EntityTypeEditor.

Back to Top


operator>

public static bool operator >
(
    EntityTypeEditor lhs,
    EntityTypeEditor rhs
)

Overloads the > operator. Compares two Entity Types to see if this Entity Type is greater than the passed Entity Type.

Parameter Description
lhs The EntityTypeEditor to have on the left hand side of the comparison.
rhs The EntityTypeEditor to have on the right hand side of the comparison.
Returns
Whether or not the lhs EntityTypeEditor is greater than the rhs EntityTypeEditor.

Back to Top


operator<=

public static bool operator <=
(
    EntityTypeEditor lhs,
    EntityTypeEditor rhs
)

Overloads the <= operator. Compares two Entity Types to see if this Entity Type is less than or equal to the passed Entity Type.

Parameter Description
lhs The EntityTypeEditor to have on the left hand side of the comparison.
rhs The EntityTypeEditor to have on the right hand side of the comparison.
Returns
Whether or not the lhs EntityTypeEditor is less than or equal to the rhs EntityTypeEditor.

Back to Top


operator>=

public static bool operator >=
(
    EntityTypeEditor lhs,
    EntityTypeEditor rhs
)

Overloads the >= operator. Compares two Entity Types to see if this Entity Type is greater than or equal to the passed Entity Type.

Parameter Description
lhs The EntityTypeEditor to have on the left hand side of the comparison.
rhs The EntityTypeEditor to have on the right hand side of the comparison.
Returns
Whether or not the lhs EntityTypeEditor is greater than or equal to the rhs EntityTypeEditor.

Back to Top


Clone this wiki locally