28 void setName(
const std::string& name);
33 std::vector<int>
getMods()
const;
44 bool hasMod(
int mod_id)
const;
50 virtual Json::Value
toJson()
const = 0;
Abstract base class for a tag assigned to a set of mods.
Definition tag.h:17
void setName(const std::string &name)
Setter for the tags name.
Definition tag.cpp:11
std::vector< int > mods_
Contains ids of all mods to which this tag has been added.
Definition tag.h:56
std::string getName() const
Getter for the tags name.
Definition tag.cpp:6
virtual Json::Value toJson() const =0
Serializes this tag to a json object. This function must be implemented by derived classes.
int getNumMods() const
Returns the number of mods to which this tag has been added.
Definition tag.cpp:21
std::vector< int > getMods() const
Returns all mods to which this tag has been added.
Definition tag.cpp:16
std::string name_
Name of this tag.
Definition tag.h:54
bool hasMod(int mod_id) const
Checks if this tag has been added to the given mod.
Definition tag.cpp:26