Skip to content

ASTagSpec

PT | EN
Inherits: RefCounted

Collection of unique Tags.

Description

[ASTagSpec] manages a set of tags and provides methods for hierarchical matching.

Methods

ReturnName
booladd_tag( tag: StringName)
Adds a tag to the container. If the tag already exists, increments its reference count. Returns true if this is the first reference to the tag.
voidclear( )
Removes all tags from the container.
StringName[]get_all_tags( ) const
Returns all tags currently in this container.
boolhas_all_tags( tags: StringName[], exact: bool = false) const
Returns true if the container has all of the specified tags.
boolhas_any_tags( tags: StringName[], exact: bool = false) const
Returns true if the container has any of the specified tags.
boolhas_tag( tag: StringName, exact: bool = false) const
Returns true if the container has the specified tag.
boolremove_tag( tag: StringName)
Decrements the reference count of a tag. If the count reaches zero, the tag is removed. Returns true if the tag was actually removed (reference count reached zero).