Limo
A simple mod manager
Loading...
Searching...
No Matches
versionchangelog.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "changelogentry.h"
9#include <chrono>
10#include <json/json.h>
11
12
17{
18public:
20 VersionChangelog() = default;
25 VersionChangelog(const Json::Value& json);
26
31 std::string getVersion() const;
36 std::time_t getDate() const;
41 std::string getTitle() const;
46 const std::vector<ChangelogEntry>& getChanges() const;
51 std::string versionAndDateString() const;
57 bool operator<(const VersionChangelog& other) const;
58
59private:
61 std::string version_;
63 std::time_t date_;
65 std::string title_;
67 std::vector<ChangelogEntry> changes_;
68};
Header for the ChangeLogEntry class.
std::time_t getDate() const
Getter for the publishing date of the version.
Definition versionchangelog.cpp:22
std::string getVersion() const
Getter for the version string.
Definition versionchangelog.cpp:17
std::string getTitle() const
Getter for the version title.
Definition versionchangelog.cpp:27
std::string version_
Version number of this changelog.
Definition versionchangelog.h:61
VersionChangelog()=default
Default constructor.
std::time_t date_
Publishing date for this version.
Definition versionchangelog.h:63
std::string versionAndDateString() const
Constructs a string from the version and the date timestamp.
Definition versionchangelog.cpp:37
std::string title_
Title for this version.
Definition versionchangelog.h:65
bool operator<(const VersionChangelog &other) const
Compares publishing time of this with other.
Definition versionchangelog.cpp:44
const std::vector< ChangelogEntry > & getChanges() const
Getter for the changes made in this version.
Definition versionchangelog.cpp:32
std::vector< ChangelogEntry > changes_
Contains all changes made in this version.
Definition versionchangelog.h:67