Rename MasterlistInfo to FileRevision

To reflect that it will soon be used to provide info for other
version-controlled files. Also rename its revision_id and
revision_date fields to remove the revision_ prefixes.
This commit is contained in:
Oliver Hamlet
2021-09-23 13:30:39 +01:00
parent be30bc500f
commit 08acdb9c65
10 changed files with 69 additions and 70 deletions
+2 -2
View File
@@ -33,7 +33,7 @@
#include "loot/metadata/group.h"
#include "loot/metadata/message.h"
#include "loot/metadata/plugin_metadata.h"
#include "loot/struct/masterlist_info.h"
#include "loot/struct/file_revision.h"
#include "loot/struct/simple_message.h"
namespace loot {
@@ -138,7 +138,7 @@ public:
* character hash will be outputted.
* @returns The revision data.
*/
virtual MasterlistInfo GetMasterlistRevision(
virtual FileRevision GetMasterlistRevision(
const std::filesystem::path& masterlist_path,
const bool get_short_id) const = 0;
@@ -21,33 +21,32 @@
along with LOOT. If not, see
<https://www.gnu.org/licenses/>.
*/
#ifndef LOOT_MASTERLIST_INFO
#define LOOT_MASTERLIST_INFO
#ifndef LOOT_FILE_REVISION
#define LOOT_FILE_REVISION
#include <string>
namespace loot {
/**
* @brief A structure that holds data about a masterlist's source control
* revision.
* @brief A structure that holds data about a file's source control revision.
*/
struct MasterlistInfo {
inline explicit MasterlistInfo() : is_modified(false) {}
struct FileRevision {
inline explicit FileRevision() : is_modified(false) {}
/**
* @brief The revision hash for the masterlist.
* @brief The revision hash for the file.
*/
std::string revision_id;
std::string id;
/**
* @brief A pointer to a string containing the ISO 8601 formatted revision
* date, ie. YYYY-MM-DD.
* @brief A string containing the ISO 8601 formatted revision date, ie.
* YYYY-MM-DD.
*/
std::string revision_date;
std::string date;
/**
* @brief `true` if the masterlist has been edited since the outputted
* revision, or `false` if it is at exactly the revision given.
* @brief `true` if the file has been edited since the revision identified by
* `id`, or `false` if it is at exactly the revision given.
*/
bool is_modified;
};