28 #ifndef SEMVER_UTILS_VERSION_H
29 #define SEMVER_UTILS_VERSION_H
34 #pragma clang diagnostic push
35 #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
54 std::vector<unsigned int> versions;
55 std::string prerelease;
56 std::vector<std::string> prerelease_identifiers;
57 std::vector<bool> prerelease_is_identifier_number;
58 std::vector<unsigned long> prerelease_number;
61 void parse_prerelease();
90 version(
const std::vector<unsigned int> versions,
91 const std::string prerelease =
"",
92 const std::string metadata =
"");
99 std::string
str()
const;
114 unsigned int get_version(
unsigned int index)
const;
231 #endif // SEMVER_UTILS_VERSION_H
233 #pragma clang diagnostic pop
version bump_patch() const
Bumps the patch version component.
Definition: version.cpp:194
version strip_prerelease() const
Strips the prerelease component.
Definition: version.cpp:236
bool operator==(const version &rh) const
Checks two instances for equality.
Definition: version.cpp:251
version bump_major() const
Bumps the major version component.
Definition: version.cpp:184
static version from_string(std::string v)
Constructs a semver::version instance from a std::string.
Definition: version.cpp:91
bool operator<(const version &rh) const
Compares two instances.
Definition: version.cpp:256
std::string get_prerelease() const
Gets the prerelease string.
Definition: version.cpp:226
bool operator>(const version &rh) const
Compares two instances.
Definition: version.cpp:311
std::string str() const
Converts a version to its string representation.
Definition: version.cpp:159
version(const std::vector< unsigned int > versions, const std::string prerelease="", const std::string metadata="")
Constructs a semver::version instance with the specified parameters. The parameters must comply with ...
Definition: version.cpp:137
version bump_minor() const
Bumps the minor version component.
Definition: version.cpp:189
std::vector< unsigned int > get_version() const
Gets the version components.
Definition: version.cpp:221
version strip_metadata() const
Strips the metadata component.
Definition: version.cpp:241
std::string get_metadata() const
Gets the metadata string.
Definition: version.cpp:231
bool is_release() const
Checks whether the instance is a release version.
Definition: version.cpp:246
Class that represents a version number.
Definition: version.hpp:51
version bump(unsigned int index) const
Bumps the specified version component.
Definition: version.cpp:199
Main namespace of libsemver.
Definition: version.cpp:80