13MMIND_API_EXPORT std::string getApiVersionInfo();
29 Version(
int major,
int minor,
int patch) : _major(major), _minor(minor), _patch(patch) {}
52 return _major > other._major ||
53 (_major == other._major &&
54 (_minor > other._minor || (_minor == other._minor && _patch >= other._patch)));
74 snprintf(buff,
sizeof(buff),
"%d.%d.%d", _major, _minor, _patch);
83 std::regex rege(R
"((\d+).(\d+).(\d+))");
85 if (std::regex_search(version, result, rege)) {
86 _major = std::stoi(result.str(1));
87 _minor = std::stoi(result.str(2));
88 _patch = std::stoi(result.str(3));
Describes the version information.
Version(const std::string &version)
Constructor.
bool operator==(const Version &other) const
Overloads the == operator to determine if two Version objects are equal.
Version()=default
Default constructor.
void fromString(const std::string &version)
Converts a version in the string format to a Version object.
bool operator!=(const Version &other) const
Overloads the != operator to determine if two Version objects are unequal.
bool operator<=(const Version &other) const
Overloads the <= operator to determine if one Version object is smaller than or equal to the other.
bool operator>=(const Version &other) const
Overloads the >= operator to determine if one Version object is greater than or equal to the other.
std::string toString() const
Converts a Version object to a string.
bool operator<(const Version &other) const
Overloads the < operator to determine if one Version object is smaller than the other.
bool isEmpty() const
Checks if a Version object is empty.
Version(int major, int minor, int patch)
Constructor.