Limo
A simple mod manager
Loading...
Searching...
No Matches
Tag Class Referenceabstract

Abstract base class for a tag assigned to a set of mods. More...

#include <tag.h>

Inheritance diagram for Tag:

Public Member Functions

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.
 

Protected Attributes

std::string name_
 Name of this tag.
 
std::vector< int > mods_ {}
 Contains ids of all mods to which this tag has been added.
 

Detailed Description

Abstract base class for a tag assigned to a set of mods.

Member Function Documentation

◆ 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
mod_idMod to be checked.
Returns
True if the given mod has this tag.

◆ setName()

void Tag::setName ( const std::string & name)

Setter for the tags name.

Parameters
nameThe new name.

◆ 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: