Abstract base class for a tag assigned to a set of mods.
More...
#include <tag.h>
|
std::string | getName () const |
| Getter for the tags name.
|
|
void | setName (const std::string &name) |
| Setter for the tags name.
|
|
std::vector< int > | getMods () const |
| Returns all mods to which this tag has been added.
|
|
int | getNumMods () const |
| Returns the number of mods to which this tag has been added.
|
|
bool | hasMod (int mod_id) const |
| Checks if this tag has been added to the given mod.
|
|
virtual Json::Value | toJson () const =0 |
| Serializes this tag to a json object. This function must be implemented by derived classes.
|
|
|
std::string | name_ |
| Name of this tag.
|
|
std::vector< int > | mods_ {} |
| Contains ids of all mods to which this tag has been added.
|
|
Abstract base class for a tag assigned to a set of mods.
◆ getMods()
std::vector< int > Tag::getMods |
( |
| ) |
const |
Returns all mods to which this tag has been added.
- Returns
- A vector of mods ids.
◆ getName()
std::string Tag::getName |
( |
| ) |
const |
Getter for the tags name.
- Returns
- The name.
◆ getNumMods()
int Tag::getNumMods |
( |
| ) |
const |
Returns the number of mods to which this tag has been added.
- Returns
- The number of mods.
◆ hasMod()
bool Tag::hasMod |
( |
int | mod_id | ) |
const |
Checks if this tag has been added to the given mod.
- Parameters
-
- Returns
- True if the given mod has this tag.
◆ setName()
void Tag::setName |
( |
const std::string & | name | ) |
|
Setter for the tags name.
- Parameters
-
◆ toJson()
virtual Json::Value Tag::toJson |
( |
| ) |
const |
|
pure virtual |
Serializes this tag to a json object. This function must be implemented by derived classes.
- Returns
- The json object.
Implemented in AutoTag, and ManualTag.
The documentation for this class was generated from the following files:
- src/core/tag.h
- src/core/tag.cpp