Limo
A simple mod manager
Loading...
Searching...
No Matches
manualtag.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "tag.h"
9#include <json/json.h>
10#include <string>
11#include <vector>
12
13
17class ManualTag : public Tag
18{
19public:
24 ManualTag(std::string name);
31 ManualTag(const Json::Value& json);
32
37 void addMod(int mod_id);
42 void removeMod(int mod_id);
47 void setMods(const std::vector<int> mods);
52 Json::Value toJson() const;
58 bool operator==(const std::string& name) const;
64 bool operator==(const ManualTag& other) const;
65};
void addMod(int mod_id)
Adds this tag to the given mod.
Definition manualtag.cpp:25
void removeMod(int mod_id)
Removes this tag from the given mod.
Definition manualtag.cpp:32
Json::Value toJson() const
Serializes this tag to a json object.
Definition manualtag.cpp:44
bool operator==(const std::string &name) const
Compares this tag by name to the given name.
Definition manualtag.cpp:53
ManualTag(std::string name)
Constructs a new tag with the given name.
Definition manualtag.cpp:7
void setMods(const std::vector< int > mods)
Removes this tag from all mods and adds it only to the given mods.
Definition manualtag.cpp:39
Abstract base class for a tag assigned to a set of mods.
Definition tag.h:17
Header for the Tag class.