GeoPathComponentId

Description

struct Tinman.Engine.Scenes.Data.GeoPathComponentId

An identifier for a geo path value.

The natural order of GeoPathComponentId values is the following:

  1. Sort ascending by ordinal of Type.

  2. Sort ascending by Name, using StringUtil.Compare.

  3. Sort ascending by ordinal of Flag.

Public / Constants

None


public static readonly attribute None → (GeoPathComponentId)

The identifier value for no component.

Public / Constructors

For

4 overloads


public static method For1 → (1)

value in : GeoPathValue

The well-defined geo path value type, see Type.

returns → GeoPathComponentId

The GeoPathComponentId value or None if value in is GeoPathValue.None or GeoPathValue.Custom.

Creates a new instance of GeoPathComponentId for the given well-known geo path value.

The Name field will have the special "any" value and Type will be set according to value in.


public static method For2 → (2)

name in : string

[not-null]
See Name.

flag opt : GeoPathFlag = GeoPathFlag.None

See Flag.

returns → GeoPathComponentId

The GeoPathComponentId value.

Creates a new instance of GeoPathComponentId for the given custom geo path component name.

The Type field will be set to GeoPathValue.Custom.


public static method For3 → ()
<TSample val>
<TTrait val : IGeoPathSampleTrait<TSample>>

Creates a GeoPathComponentId value for each geo path sample value.


public static method For4 → (1)
<TSample val>
<TTrait val : IGeoPathSampleTrait<TSample>>

index in : int32

The geo path value index.

returns → GeoPathComponentId

The GeoPathComponentId value.

Creates a GeoPathComponentId value for the given geo path sample value.

Geo­Path­Component­Id


public constructor GeoPathComponentId → (3)

type in : GeoPathValue

The value for Type.

name in : string

The value for Name.

flag in : GeoPathFlag

The value for Flag. Will be ignored if type in is not GeoPathValue.None.

Creates a new instance of GeoPathComponentId.

If applicable, please use one of the For factory methods to clearly distinguish between well-known and custom geo path values and those derived from a geo path sample trait.

Public / Methods

Merge


[Pure]
public method Merge → (1)

other in : GeoPathComponentId

The other geo path component identifier.

returns → GeoPathComponentId

The merged geo path component identifier or None if not mergeable.

Merges this geo patch component identifier with the given other in one, if possible.

Merging identifiers will replace special "any" values of Type and Name (in that order) with the specific ones. If two identifiers have conflicting "non-any" field values, merging will fail.

Resolve


[Pure]
public method Resolve → (2)

identifiers in : IBagConst<GeoPathComponentId>

The identifiers to merge with.

existing out : GeoPathComponentId

The identifier in identifiers in this identifier has been merged with.

returns → GeoPathComponentId

The resulting identifier.

Tries to resolve this identifier by merging it with the first matching one in identifiers in.

If this identifier can be merged with

Public / Attributes

Flag


public readonly attribute Flag → (GeoPathFlag)

The data flag to use for processing geo path component values.

If Type is not GeoPathValue.None, the data flag will always be the one that is defined for the well-known geo path value.

Is­None


public attribute IsNone → (get)

value : bool

true if this is the None identifier,
false if this is a regular identifier.

Is this GeoPathComponentId value equal to None?

Name


public readonly attribute Name → (string)

The name of the geo path value or null for any.

Type


public readonly attribute Type → (GeoPathValue)

The well-known type of the geo path value or GeoPathValue.None for any.

If GeoPathValue.Custom, the application must use Name to distinguish between its custom geo path values.