ScriptId

ScriptId Struct

Encapsulates an Script Id.

Syntax

public struct ScriptId : IComparable, IComparable<ScriptId>

Remarks

Script Ids are unique per running scene.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from ValueType.

Public Fields

static readonly
AllScripts ScriptId . The invalid id script.
static readonly
Invalid ScriptId . The invalid id script.

Public Properties

[read-only]
IsValid bool . Gets the valid state for this ScriptId.

Public Methods

  CompareTo (ScriptId) : int
Compares another instance to this scriptId.
  CompareTo (object) : int
Compares another instance to this scriptId.
override
Equals (object) : bool
Value comparison for ScriptId.
override
GetHashCode () : int
Retrieves the hash code for this instance.
override
ToString () : string
Converts the id to a hexadecimal string representation.

Public Operators

static
Equality (ScriptId, ScriptId) ScriptId equality operator.
static
Inequality (ScriptId, ScriptId) ScriptId inequality operator.
static
Conversion to System.UInt32 (Implicit) Convert a ScriptId to a uint.

Member Details

AllScripts Field

The invalid id script.

Syntax

public static readonly ScriptId AllScripts

Remarks

This value is used by certain APIs to represent all scripts.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

CompareTo Method

Compares another instance to this scriptId.

Syntax

public int CompareTo (ScriptId other)

Parameters

other
The scriptId to compare with this instance.

Returns

Returns -1 if this scriptId comes before the specified instance, 1 if this script id comes after the specified instance, 0 otherwise.

Remarks

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

CompareTo Method

Compares another instance to this scriptId.

Syntax

public int CompareTo (object other)

Parameters

other
The scriptId to compare with this instance.

Returns

Returns -1 if this scriptId comes before the specified instance, 1 if this script id comes after the specified instance, 0 otherwise. Returns 2 if the object is not a scriptId.

Remarks

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Equals Method

Value comparison for ScriptId.

Syntax

public override bool Equals (object obj)

Parameters

obj
The script to compare.

Returns

true if the argument is an ScriptId and has the same value.

Remarks

This method overrides ValueType.Equals.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

GetHashCode Method

Retrieves the hash code for this instance.

Syntax

public override int GetHashCode ()

Returns

The hash code for this instance.

Remarks

This method overrides ValueType.GetHashCode.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Invalid Field

The invalid id script.

Syntax

public static readonly ScriptId Invalid

Remarks

This value is used by certain APIs to represent an invalid ScriptId.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

IsValid Property

Gets the valid state for this ScriptId.

Syntax

public bool IsValid { get; }

Value

True if this id is a valid ScriptId.

Remarks

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

op_Equality Method

ScriptId equality operator.

Syntax

public static bool operator== (ScriptId a, ScriptId b)

Parameters

a
First ScriptId to compare.
b
Second ScriptId to compare.

Returns

true if the ScriptIds have the same value.

Remarks

This is a value comparison.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Conversion Method

Convert a ScriptId to a uint.

Syntax

public static implicit operator uint (ScriptId id)

Parameters

id
The Script id to convert.

Returns

Remarks

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

op_Inequality Method

ScriptId inequality operator.

Syntax

public static bool operator!= (ScriptId a, ScriptId b)

Parameters

a
First ScriptId to compare.
b
Second ScriptId to compare.

Returns

true if the ScriptIds have a different value.

Remarks

This is a value comparison.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

ToString Method

Converts the id to a hexadecimal string representation.

Syntax

public override string ToString ()

Returns

The hexadecimal string representation.

Remarks

This method overrides Script.ToString.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.