Limo
A simple mod manager
Loading...
Searching...
No Matches
ChangelogEntry Class Reference

Contains data for a single change in the changelog. More...

#include <changelogentry.h>

Public Types

enum  ChangeType { new_feature = 0 , change = 1 , fix = 2 , no_type = 100 }
 Represents the type of change for a changelog entry.
 

Public Member Functions

 ChangelogEntry ()=default
 Default constructor.
 
 ChangelogEntry (const Json::Value &json)
 Deserializes a changelog entry from the given JSON object.
 
ChangeType getType () const
 Getter for the change type.
 
std::string getShortDescription () const
 Getter for the short description.
 
std::string getLongDescription () const
 Getter for the long description.
 
int getIssue () const
 Getter for the GitHub issue ID.
 
int getPullRequest () const
 Getter for the GitHub pull request ID.
 
bool operator< (const ChangelogEntry &other) const
 Compares this and other by their type.
 

Private Attributes

ChangeType type_
 Type of this change.
 
std::string short_description_
 Short description of the change.
 
std::string long_description_
 Optional: A more detailed description or an explanation.
 
int issue_ = -1
 GitHub issue addressed by this change, or -1 if not related to any issue.
 
int pull_request_ = -1
 GitHub pull request responsible for this change or -1 if not related to a PR.
 

Detailed Description

Contains data for a single change in the changelog.

Constructor & Destructor Documentation

◆ ChangelogEntry()

ChangelogEntry::ChangelogEntry ( const Json::Value & json)

Deserializes a changelog entry from the given JSON object.

Parameters
jsonJSON object containing the changelog entry.

Member Function Documentation

◆ getIssue()

int ChangelogEntry::getIssue ( ) const

Getter for the GitHub issue ID.

Returns
The issue ID.

◆ getLongDescription()

std::string ChangelogEntry::getLongDescription ( ) const

Getter for the long description.

Returns
The description.

◆ getPullRequest()

int ChangelogEntry::getPullRequest ( ) const

Getter for the GitHub pull request ID.

Returns
The pull request ID.

◆ getShortDescription()

std::string ChangelogEntry::getShortDescription ( ) const

Getter for the short description.

Returns
The description.

◆ getType()

ChangelogEntry::ChangeType ChangelogEntry::getType ( ) const

Getter for the change type.

Returns
The type.

◆ operator<()

bool ChangelogEntry::operator< ( const ChangelogEntry & other) const

Compares this and other by their type.

Parameters
otherChangelogEntry to compare to.
Returns
True if type of this is less than type of other.

The documentation for this class was generated from the following files: