Script-facing module for generic tags and capabilities. 更多...
#include <Tags.h>
Public 成员函数 | |
| Module_REG (Tags) | |
| Tags () | |
| Constructs a Tags and publishes its store as world-state listeners. | |
| ~Tags () override | |
| Withdraws world-state listeners and releases Tags resources. | |
| bool | add (const std::string &subject, const std::string &tag) |
| Adds a tag to a subject. | |
| bool | remove (const std::string &subject, const std::string &tag) |
| Removes a tag from a subject. | |
| bool | has (const std::string &subject, const std::string &tag) const |
| Tests whether a subject has a tag. | |
| int | count (const std::string &subject) const |
| Gets a subject's tag count. | |
| std::string | at (const std::string &subject, int index) const |
| Gets a subject's tag by deterministic index, or an empty string. | |
| int | subjectCount (const std::string &tag) const |
| Gets the number of subjects carrying a tag. | |
| std::string | subjectAt (const std::string &tag, int index) const |
| Gets a subject carrying a tag by deterministic index, or an empty string. | |
| bool | addCapability (const std::string &subject, const std::string &capability) |
| Adds a capability to a subject. | |
| bool | removeCapability (const std::string &subject, const std::string &capability) |
| Removes a capability from a subject. | |
| bool | hasCapability (const std::string &subject, const std::string &capability) const |
| Tests whether a subject has a capability. | |
| int | capabilityCount (const std::string &subject) const |
| Gets a subject's capability count. | |
| std::string | capabilityAt (const std::string &subject, int index) const |
| Gets a capability by deterministic index, or an empty string. | |
| bool | removeSubject (const std::string &subject) |
| Removes every tag and capability belonging to a subject. | |
| void | clear () |
| Clears all state and resets event sequencing. | |
| int | eventCount () const |
| Gets queued change event count. | |
| int | eventSequence (int index) const |
| Gets event sequence by index, or zero. | |
| std::string | eventAction (int index) const |
| Gets event action by index, or an empty string. | |
| std::string | eventSubject (int index) const |
| Gets event subject by index, or an empty string. | |
| std::string | eventValue (int index) const |
| Gets event tag or capability by index, or an empty string. | |
| void | clearEvents () |
| Clears queued events without changing state. | |
| TagStore & | store () |
| Gives C++ callers direct access to the underlying store. | |
| GameplayTagRegistry & | registry () |
| Gives C++ callers owner-thread access to the canonical gameplay-tag registry. | |
| const GameplayTagRegistry & | registry () const |
| Gives C++ callers immutable owner-thread access to the canonical gameplay-tag registry. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
构造及析构函数说明
◆ Tags()
| eve::tags::Tags::Tags | ( | ) |
◆ ~Tags()
|
override |
成员函数说明
◆ add()
| bool eve::tags::Tags::add | ( | const std::string & | subject, |
| const std::string & | tag | ||
| ) |
Adds a tag to a subject.
引用了 eve::tags::TagStore::addTag(), subject , 以及 tag.
◆ addCapability()
| bool eve::tags::Tags::addCapability | ( | const std::string & | subject, |
| const std::string & | capability | ||
| ) |
Adds a capability to a subject.
引用了 eve::tags::TagStore::addCapability() , 以及 subject.
◆ at()
| std::string eve::tags::Tags::at | ( | const std::string & | subject, |
| int | index | ||
| ) | const |
Gets a subject's tag by deterministic index, or an empty string.
引用了 index, subject , 以及 eve::tags::TagStore::tagsOf().
◆ capabilityAt()
| std::string eve::tags::Tags::capabilityAt | ( | const std::string & | subject, |
| int | index | ||
| ) | const |
Gets a capability by deterministic index, or an empty string.
引用了 eve::tags::TagStore::capabilitiesOf(), index , 以及 subject.
◆ capabilityCount()
| int eve::tags::Tags::capabilityCount | ( | const std::string & | subject | ) | const |
Gets a subject's capability count.
引用了 eve::tags::TagStore::capabilitiesOf() , 以及 subject.
◆ clear()
| void eve::tags::Tags::clear | ( | ) |
Clears all state and resets event sequencing.
◆ clearEvents()
| void eve::tags::Tags::clearEvents | ( | ) |
Clears queued events without changing state.
◆ count()
| int eve::tags::Tags::count | ( | const std::string & | subject | ) | const |
◆ eventAction()
| std::string eve::tags::Tags::eventAction | ( | int | index | ) | const |
◆ eventCount()
| int eve::tags::Tags::eventCount | ( | ) | const |
◆ eventSequence()
| int eve::tags::Tags::eventSequence | ( | int | index | ) | const |
◆ eventSubject()
| std::string eve::tags::Tags::eventSubject | ( | int | index | ) | const |
◆ eventValue()
| std::string eve::tags::Tags::eventValue | ( | int | index | ) | const |
◆ has()
| bool eve::tags::Tags::has | ( | const std::string & | subject, |
| const std::string & | tag | ||
| ) | const |
Tests whether a subject has a tag.
引用了 eve::tags::TagStore::hasTag(), subject , 以及 tag.
◆ hasCapability()
| bool eve::tags::Tags::hasCapability | ( | const std::string & | subject, |
| const std::string & | capability | ||
| ) | const |
Tests whether a subject has a capability.
引用了 eve::tags::TagStore::hasCapability() , 以及 subject.
◆ Module_REG()
| eve::tags::Tags::Module_REG | ( | Tags | ) |
◆ registry() [1/2]
|
inline |
Gives C++ callers owner-thread access to the canonical gameplay-tag registry.
- 返回
- Borrowed mutable reference owned by this module. @lifetime Valid until this Tags module is destroyed; definitions returned by the registry are owning copies. @thread Owner-thread-only; no synchronization is performed. @reentrancy Does not invoke callbacks.
◆ registry() [2/2]
|
inline |
Gives C++ callers immutable owner-thread access to the canonical gameplay-tag registry.
- 返回
- Borrowed immutable reference owned by this module. @lifetime Valid until this Tags module is destroyed. @thread Owner-thread-only; no synchronization is performed. @reentrancy Does not invoke callbacks.
◆ remove()
| bool eve::tags::Tags::remove | ( | const std::string & | subject, |
| const std::string & | tag | ||
| ) |
Removes a tag from a subject.
引用了 eve::tags::TagStore::removeTag(), subject , 以及 tag.
◆ removeCapability()
| bool eve::tags::Tags::removeCapability | ( | const std::string & | subject, |
| const std::string & | capability | ||
| ) |
Removes a capability from a subject.
◆ removeSubject()
| bool eve::tags::Tags::removeSubject | ( | const std::string & | subject | ) |
Removes every tag and capability belonging to a subject.
引用了 eve::tags::TagStore::removeSubject() , 以及 subject.
◆ store()
|
inline |
◆ subjectAt()
| std::string eve::tags::Tags::subjectAt | ( | const std::string & | tag, |
| int | index | ||
| ) | const |
Gets a subject carrying a tag by deterministic index, or an empty string.
引用了 index, eve::tags::TagStore::subjectsWithTag() , 以及 tag.
◆ subjectCount()
| int eve::tags::Tags::subjectCount | ( | const std::string & | tag | ) | const |
Gets the number of subjects carrying a tag.
引用了 eve::tags::TagStore::subjectsWithTag() , 以及 tag.
该类的文档由以下文件生成:
Public 成员函数 继承自