Stores information about an installed mod.
More...
#include <mod.h>
|
| Mod (int id, const std::string &name, const std::string &version, const std::time_t &time, const std::filesystem::path &source_l, const std::string &source_r, const std::time_t &time_r, unsigned long size, const std::time_t &suppress_time) |
| Constructor. Simply initializes members.
|
|
| Mod (const Json::Value &json) |
| Initializes all members from a JSON object.
|
|
Json::Value | toJson () const |
|
bool | operator== (const Mod &other) const |
| Compares to another mod by id.
|
|
bool | operator< (const Mod &other) const |
| Compares mods by their id.
|
|
|
int | id |
| The mod's id.
|
|
std::string | name |
| The mod's name.
|
|
std::string | version |
| The mod's version.
|
|
std::time_t | install_time |
| The mod's installation time.
|
|
std::filesystem::path | local_source |
| Path to the local archive or directory used to install this mod.
|
|
std::string | remote_source |
| URL from where the mod was downloaded.
|
|
std::time_t | remote_update_time |
| Timestamp for when the mod was updated at the remote source.
|
|
unsigned long | size_on_disk |
| Total size of the installed mod on disk.
|
|
std::time_t | suppress_update_time |
| Timestamp for when the user requested to suppress current update notifications.
|
|
Stores information about an installed mod.
◆ Mod() [1/2]
Mod::Mod |
( |
int | id, |
|
|
const std::string & | name, |
|
|
const std::string & | version, |
|
|
const std::time_t & | time, |
|
|
const std::filesystem::path & | source_l, |
|
|
const std::string & | source_r, |
|
|
const std::time_t & | time_r, |
|
|
unsigned long | size, |
|
|
const std::time_t & | suppress_time ) |
Constructor. Simply initializes members.
- Parameters
-
id | The mod's id. |
name | The mod's name. |
version | The mod's version. |
time | The mod's installation time. |
source_l | Path to the local archive or directory used to install this mod. |
source_r | URL from where the mod was downloaded. |
time_r | Timestamp for when the mod was updated at the remote source. |
size | Total size of the installed mod on disk. |
suppress_time | Timestamp for when the user requested to suppress current update notifications. |
◆ Mod() [2/2]
Mod::Mod |
( |
const Json::Value & | json | ) |
|
Initializes all members from a JSON object.
- Parameters
-
json | The source for member values. |
◆ operator<()
bool Mod::operator< |
( |
const Mod & | other | ) |
const |
Compares mods by their id.
- Parameters
-
- Returns
- True only if this.id < other.id
◆ operator==()
bool Mod::operator== |
( |
const Mod & | other | ) |
const |
Compares to another mod by id.
- Parameters
-
- Returns
- True if both share the same id, else false.
The documentation for this struct was generated from the following files:
- src/core/mod.h
- src/core/mod.cpp
- src/core/nexus/mod.cpp