Skip to content

Game.Simulation.Flow.CutElementFlags

Assembly: Assembly-CSharp
Namespace: Game.Simulation.Flow

Type: enum

Base: System.Int32

Summary:
A bitmask (flags) enumeration used by the Flow simulation to represent the state(s) of a "cut element" (an element that has been created, modified, marked admissible, or deleted) during simulation processing. The enum is decorated with [Flags], so multiple values can be combined. Typical use is to set, test, and clear state bits for elements as they move through simulation stages.


Fields

  • None = 0
    Represents no flags set. Default state.

  • Created = 1
    Indicates the element was created during the current processing step.

  • Admissible = 2
    Marks the element as admissible (eligible for some subsequent processing or acceptance criteria).

  • Changed = 4
    Indicates the element has changed (modified) since the previous step.

  • Deleted = 8
    Marks the element as deleted (scheduled for removal or already removed).

Properties

  • This enum type does not define custom properties. Use standard enum behavior and bitwise operations to query or modify values.

Constructors

  • Enums do not expose constructors in useable form. The implicit default value is None (0). Individual named values correspond to the integer constants listed above.

Methods

  • No custom methods are defined on this enum. Use built-in enum operations:
  • System.Enum.ToString() for textual representation.
  • Enum.HasFlag for readable flag checks (note: HasFlag is less performant than bitwise checks).
  • Bitwise operators (&, |, ~) to combine, test, and clear flags.

Usage Example

// Combine flags
CutElementFlags flags = CutElementFlags.Created | CutElementFlags.Admissible;

// Test using HasFlag (clearer, but slightly slower)
if (flags.HasFlag(CutElementFlags.Created))
{
    // handle created element
}

// Test using bitwise AND (recommended for performance-sensitive code)
if ((flags & CutElementFlags.Deleted) != 0)
{
    // handle deleted element
}

// Add a flag
flags |= CutElementFlags.Changed;

// Remove a flag
flags &= ~CutElementFlags.Admissible;