Перейти к основному содержанию

TagRegistry.TagGroup <T>

Index

Properties

readonlyname

name: string

Methods

addCommonObject

  • addCommonObject(obj: T, ...tags: string[]): void
  • Appends object to group to use in iterator and filtering functions like TagGroup.getAllWhere, etc.


    Parameters

    • obj: T
    • rest...tags: string[]

      primary tags to be added for object

    Returns void

addTagFactory

  • Tag factory determines additional tags, which should be added for specific object in group.


    Parameters

    Returns void

addTags

  • Fetches object tags and appends it to a present collection in fixed order: primary tags added via TagGroup.addTags, serialized tags from object _tags property, tags added from TagGroup.addTagFactory.


    Parameters

    • obj: T
    • tags: Collection<string>

      collection tor which tags applies

    Returns void

addTagsFor

  • addTagsFor(obj: T, ...tags: string[]): void
  • Appends primary tags for object; regardless of whether object is in group or not, tags will be added.


    Parameters

    • obj: T
    • rest...tags: string[]

      primary tags to be added for object

    Returns void

getAllWhere

getAllWithTag

  • getAllWithTag(tag: string): List<T>
  • Fetches objects which has presented tag.


    Parameters

    • tag: string

    Returns List<T>

getAllWithTags

  • Fetches objects which have all of presented tags.


    Parameters

    Returns List<T>

getTags

removeCommonObject

  • removeCommonObject(obj: T): void
  • Removes object from group, so it no longer can be fetched via TagGroup.getAllWhere, etc.


    Parameters

    • obj: T

    Returns void

removeTagsFor

  • removeTagsFor(obj: T, ...tags: string[]): void
  • Removes primary tags from object.


    Parameters

    • obj: T
    • rest...tags: string[]

      primary tags to be removed from object

    Returns void