Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GroupMask

A set of user group IDs. User groups are used to selectively enable several different properties of actors based on the memberships of the viewing user. All users not assigned a group are in the default group. See User.groups, Appearance.enabled.

Hierarchy

Implements

  • Iterable<string>

Index

Constructors

constructor

  • new GroupMask(context: Context, initialContents?: Iterable<string>): GroupMask
  • Create a new mask containing the given groups.

    Parameters

    • context: Context

      An active MRE app context

    • Default value initialContents: Iterable<string> = null

      A list of group names to be added to this GroupMask

    Returns GroupMask

Properties

[Symbol.toStringTag]

[Symbol.toStringTag]: string

size

size: number

Static ALL_PACKED

ALL_PACKED: number = ~0

Static NONE_PACKED

NONE_PACKED: 0 = 0

Static Set

Set: SetConstructor

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<string>
  • Iterates over values in the set.

    Returns IterableIterator<string>

add

  • add(item: string): this
  • Add a group to this mask

    Parameters

    • item: string

      The group to add

    Returns this

addAll

  • addAll(items: Iterable<string>): this
  • Add multiple groups to this mask

    Parameters

    • items: Iterable<string>

      The groups to add

    Returns this

clear

  • clear(): void

delete

  • delete(item: string): boolean
  • Remove a group from this mask

    Parameters

    • item: string

      The group to remove

    Returns boolean

    Whether the group was removed from this mask

entries

  • entries(): IterableIterator<[string, string]>
  • Returns an iterable of [v,v] pairs for every value v in the set.

    Returns IterableIterator<[string, string]>

forEach

  • forEach(callbackfn: (value: string, value2: string, set: Set<string>) => void, thisArg?: any): void
  • Parameters

    • callbackfn: (value: string, value2: string, set: Set<string>) => void
        • (value: string, value2: string, set: Set<string>): void
        • Parameters

          • value: string
          • value2: string
          • set: Set<string>

          Returns void

    • Optional thisArg: any

    Returns void

has

  • has(item: string): boolean
  • Check if a group is in this mask

    Parameters

    • item: string

      The group to check

    Returns boolean

    Whether the group is in this mask

invert

keys

  • keys(): IterableIterator<string>
  • Despite its name, returns an iterable of the values in the set,

    Returns IterableIterator<string>

set

  • set(items: Iterable<string>): void
  • Make this mask contain only the given groups

    Parameters

    • items: Iterable<string>

      The items to add

    Returns void

values

  • values(): IterableIterator<string>
  • Returns an iterable of values in the set.

    Returns IterableIterator<string>

Static All