ASTagSpec
Inherits:
RefCountedCollection of unique Tags.
Description
[ASTagSpec] manages a set of tags and provides methods for hierarchical matching.
Methods
| Return | Name |
|---|---|
bool | add_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. | |
void | clear( ) |
Removes all tags from the container. | |
StringName[] | get_all_tags(
)
const |
Returns all tags currently in this container. | |
bool | has_all_tags(
tags: StringName[], exact: bool = false)
const |
Returns true if the container has all of the specified tags. | |
bool | has_any_tags(
tags: StringName[], exact: bool = false)
const |
Returns true if the container has any of the specified tags. | |
bool | has_tag(
tag: StringName, exact: bool = false)
const |
Returns true if the container has the specified tag. | |
bool | remove_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). | |